{"action":"created","comment":{"url":"https://api.github.com/repos/RIOT-OS/RIOT/pulls/comments/124546164","pull_request_review_id":46842514,"id":124546164,"diff_hunk":"@@ -179,29 +179,31 @@ size_t fmt_s16_dec(char *out, int16_t val);\n  * @brief Convert 16-bit fixed point number to a decimal string\n  *\n  * The input for this function is a signed 16-bit integer holding the fixed\n- * point value as well as an unsigned integer defining the position of the\n- * decimal point, so this value defines the number of decimal digits after the\n- * decimal point.\n- *\n- * The resulting string will always be patted with zeros after the decimal point.\n- *\n- * For example: if @p val is -3548 and @p fp_digits is 2, the resulting string\n- * will be \"-35.48\". For @p val := 12010 and @p fp_digits := 3 the result will\n- * be \"12.010\".\n+ * point value as well as an integer defining the position of the decimal point.\n+ * This function can be used both to express fixed point numbers that have\n+ * digits after the decimal point (negative @p fp_digits value), as well as\n+ * numbers that have additional zeros before the decimal points (positive\n+ * @p fp_digits value).\n  *\n  * Will add a leading \"-\" if @p val is negative.\n  *\n  * If @p out is NULL, will only return the number of bytes that would have\n  * been written.\n  *\n+ * For example: if @p val is -3548 and @p fp_digits is -2, the resulting string\n+ * will be \"-35.48\". For @p val := 12010 and @p fp_digits := -3 the result will\n+ * be \"12.010\". Passing @p val := 12345 and @p fp_digits := 3 will result in\n+ * \"12345000\".\n+ *\n  * @param[out] out          Pointer to the output buffer, or NULL\n- * @param[in]  val          Fixed point value, MUST be <= 4\n- * @param[in]  fp_digits    Number of digits after the decimal point\n+ * @param[in]  val          Fixed point value, MUST be >-32768","path":"sys/include/fmt.h","position":32,"original_position":32,"commit_id":"c3519872da0c8de7674c6a2156e71396abb1e37d","original_commit_id":"c3519872da0c8de7674c6a2156e71396abb1e37d","user":{"login":"kaspar030","id":4679640,"avatar_url":"https://avatars3.githubusercontent.com/u/4679640?v=3","gravatar_id":"","url":"https://api.github.com/users/kaspar030","html_url":"https://github.com/kaspar030","followers_url":"https://api.github.com/users/kaspar030/followers","following_url":"https://api.github.com/users/kaspar030/following{/other_user}","gists_url":"https://api.github.com/users/kaspar030/gists{/gist_id}","starred_url":"https://api.github.com/users/kaspar030/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kaspar030/subscriptions","organizations_url":"https://api.github.com/users/kaspar030/orgs","repos_url":"https://api.github.com/users/kaspar030/repos","events_url":"https://api.github.com/users/kaspar030/events{/privacy}","received_events_url":"https://api.github.com/users/kaspar030/received_events","type":"User","site_admin":false},"body":"why?","created_at":"2017-06-28T13:49:56Z","updated_at":"2017-06-28T13:52:01Z","html_url":"https://github.com/RIOT-OS/RIOT/pull/7263#discussion_r124546164","pull_request_url":"https://api.github.com/repos/RIOT-OS/RIOT/pulls/7263","_links":{"self":{"href":"https://api.github.com/repos/RIOT-OS/RIOT/pulls/comments/124546164"},"html":{"href":"https://github.com/RIOT-OS/RIOT/pull/7263#discussion_r124546164"},"pull_request":{"href":"https://api.github.com/repos/RIOT-OS/RIOT/pulls/7263"}}},"pull_request":{"url":"https://api.github.com/repos/RIOT-OS/RIOT/pulls/7263","id":127894320,"html_url":"https://github.com/RIOT-OS/RIOT/pull/7263","diff_url":"https://github.com/RIOT-OS/RIOT/pull/7263.diff","patch_url":"https://github.com/RIOT-OS/RIOT/pull/7263.patch","issue_url":"https://api.github.com/repos/RIOT-OS/RIOT/issues/7263","number":7263,"state":"open","locked":false,"title":"sys/fmt: extended fmt_s16_dfp to handle scales","user":{"login":"haukepetersen","id":620834,"avatar_url":"https://avatars0.githubusercontent.com/u/620834?v=3","gravatar_id":"","url":"https://api.github.com/users/haukepetersen","html_url":"https://github.com/haukepetersen","followers_url":"https://api.github.com/users/haukepetersen/followers","following_url":"https://api.github.com/users/haukepetersen/following{/other_user}","gists_url":"https://api.github.com/users/haukepetersen/gists{/gist_id}","starred_url":"https://api.github.com/users/haukepetersen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/haukepetersen/subscriptions","organizations_url":"https://api.github.com/users/haukepetersen/orgs","repos_url":"https://api.github.com/users/haukepetersen/repos","events_url":"https://api.github.com/users/haukepetersen/events{/privacy}","received_events_url":"https://api.github.com/users/haukepetersen/received_events","type":"User","site_admin":false},"body":"- it is not possible to format FP numbers with a positive scaling\r\n  factor, e.g. 23*10^2 := \"2300\" (-> fp_s16_dfp(buf, 23, 2))\r\n- the semantic of the @p fp_digits parameter changed: @p fp_digits\r\n  can now be negative and positive\r\n- adapted existing usages of this function\r\n- fixed bugs when calling the function with @p out := NULL\r\n- adapted unittests\r\n- added unittests for case @ fp_digits > 0\r\n\r\nIn the current form, the PR increases the code size (~90byte, `default` @ `iotlab-m3`). Reasons are:\r\n- added functionality for positive fp_digit values -> ~30byte\r\n- removal of `pwr()` and use of the exiting `_tenmapm[]` array -> ~50byte. This does however yield runtime advantages and saves size in the case `fmt_flaot` and `fmt_s16_dfp` are used concurrently (though that scenario is not very likely?)","created_at":"2017-06-28T10:51:18Z","updated_at":"2017-06-28T13:52:01Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c51eea3b550cd9b42a084c9e6fa4b137fdd92d2d","assignee":{"login":"kaspar030","id":4679640,"avatar_url":"https://avatars3.githubusercontent.com/u/4679640?v=3","gravatar_id":"","url":"https://api.github.com/users/kaspar030","html_url":"https://github.com/kaspar030","followers_url":"https://api.github.com/users/kaspar030/followers","following_url":"https://api.github.com/users/kaspar030/following{/other_user}","gists_url":"https://api.github.com/users/kaspar030/gists{/gist_id}","starred_url":"https://api.github.com/users/kaspar030/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kaspar030/subscriptions","organizations_url":"https://api.github.com/users/kaspar030/orgs","repos_url":"https://api.github.com/users/kaspar030/repos","events_url":"https://api.github.com/users/kaspar030/events{/privacy}","received_events_url":"https://api.github.com/users/kaspar030/received_events","type":"User","site_admin":false},"assignees":[{"login":"kaspar030","id":4679640,"avatar_url":"https://avatars3.githubusercontent.com/u/4679640?v=3","gravatar_id":"","url":"https://api.github.com/users/kaspar030","html_url":"https://github.com/kaspar030","followers_url":"https://api.github.com/users/kaspar030/followers","following_url":"https://api.github.com/users/kaspar030/following{/other_user}","gists_url":"https://api.github.com/users/kaspar030/gists{/gist_id}","starred_url":"https://api.github.com/users/kaspar030/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kaspar030/subscriptions","organizations_url":"https://api.github.com/users/kaspar030/orgs","repos_url":"https://api.github.com/users/kaspar030/repos","events_url":"https://api.github.com/users/kaspar030/events{/privacy}","received_events_url":"https://api.github.com/users/kaspar030/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"milestone":{"url":"https://api.github.com/repos/RIOT-OS/RIOT/milestones/19","html_url":"https://github.com/RIOT-OS/RIOT/milestone/19","labels_url":"https://api.github.com/repos/RIOT-OS/RIOT/milestones/19/labels","id":2471521,"number":19,"title":"Release 2017.07","description":"","creator":{"login":"kaspar030","id":4679640,"avatar_url":"https://avatars3.githubusercontent.com/u/4679640?v=3","gravatar_id":"","url":"https://api.github.com/users/kaspar030","html_url":"https://github.com/kaspar030","followers_url":"https://api.github.com/users/kaspar030/followers","following_url":"https://api.github.com/users/kaspar030/following{/other_user}","gists_url":"https://api.github.com/users/kaspar030/gists{/gist_id}","starred_url":"https://api.github.com/users/kaspar030/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kaspar030/subscriptions","organizations_url":"https://api.github.com/users/kaspar030/orgs","repos_url":"https://api.github.com/users/kaspar030/repos","events_url":"https://api.github.com/users/kaspar030/events{/privacy}","received_events_url":"https://api.github.com/users/kaspar030/received_events","type":"User","site_admin":false},"open_issues":320,"closed_issues":176,"state":"open","created_at":"2017-04-21T08:04:23Z","updated_at":"2017-06-28T12:45:42Z","due_on":"2017-07-31T07:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/RIOT-OS/RIOT/pulls/7263/commits","review_comments_url":"https://api.github.com/repos/RIOT-OS/RIOT/pulls/7263/comments","review_comment_url":"https://api.github.com/repos/RIOT-OS/RIOT/pulls/comments{/number}","comments_url":"https://api.github.com/repos/RIOT-OS/RIOT/issues/7263/comments","statuses_url":"https://api.github.com/repos/RIOT-OS/RIOT/statuses/c3519872da0c8de7674c6a2156e71396abb1e37d","head":{"label":"haukepetersen:opt_fmt_s16dfp_pos","ref":"opt_fmt_s16dfp_pos","sha":"c3519872da0c8de7674c6a2156e71396abb1e37d","user":{"login":"haukepetersen","id":620834,"avatar_url":"https://avatars0.githubusercontent.com/u/620834?v=3","gravatar_id":"","url":"https://api.github.com/users/haukepetersen","html_url":"https://github.com/haukepetersen","followers_url":"https://api.github.com/users/haukepetersen/followers","following_url":"https://api.github.com/users/haukepetersen/following{/other_user}","gists_url":"https://api.github.com/users/haukepetersen/gists{/gist_id}","starred_url":"https://api.github.com/users/haukepetersen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/haukepetersen/subscriptions","organizations_url":"https://api.github.com/users/haukepetersen/orgs","repos_url":"https://api.github.com/users/haukepetersen/repos","events_url":"https://api.github.com/users/haukepetersen/events{/privacy}","received_events_url":"https://api.github.com/users/haukepetersen/received_events","type":"User","site_admin":false},"repo":{"id":13741766,"name":"RIOT","full_name":"haukepetersen/RIOT","owner":{"login":"haukepetersen","id":620834,"avatar_url":"https://avatars0.githubusercontent.com/u/620834?v=3","gravatar_id":"","url":"https://api.github.com/users/haukepetersen","html_url":"https://github.com/haukepetersen","followers_url":"https://api.github.com/users/haukepetersen/followers","following_url":"https://api.github.com/users/haukepetersen/following{/other_user}","gists_url":"https://api.github.com/users/haukepetersen/gists{/gist_id}","starred_url":"https://api.github.com/users/haukepetersen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/haukepetersen/subscriptions","organizations_url":"https://api.github.com/users/haukepetersen/orgs","repos_url":"https://api.github.com/users/haukepetersen/repos","events_url":"https://api.github.com/users/haukepetersen/events{/privacy}","received_events_url":"https://api.github.com/users/haukepetersen/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/haukepetersen/RIOT","description":"RIOT OS -  The revolutionary IoT OS","fork":true,"url":"https://api.github.com/repos/haukepetersen/RIOT","forks_url":"https://api.github.com/repos/haukepetersen/RIOT/forks","keys_url":"https://api.github.com/repos/haukepetersen/RIOT/keys{/key_id}","collaborators_url":"https://api.github.com/repos/haukepetersen/RIOT/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/haukepetersen/RIOT/teams","hooks_url":"https://api.github.com/repos/haukepetersen/RIOT/hooks","issue_events_url":"https://api.github.com/repos/haukepetersen/RIOT/issues/events{/number}","events_url":"https://api.github.com/repos/haukepetersen/RIOT/events","assignees_url":"https://api.github.com/repos/haukepetersen/RIOT/assignees{/user}","branches_url":"https://api.github.com/repos/haukepetersen/RIOT/branches{/branch}","tags_url":"https://api.github.com/repos/haukepetersen/RIOT/tags","blobs_url":"https://api.github.com/repos/haukepetersen/RIOT/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/haukepetersen/RIOT/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/haukepetersen/RIOT/git/refs{/sha}","trees_url":"https://api.github.com/repos/haukepetersen/RIOT/git/trees{/sha}","statuses_url":"https://api.github.com/repos/haukepetersen/RIOT/statuses/{sha}","languages_url":"https://api.github.com/repos/haukepetersen/RIOT/languages","stargazers_url":"https://api.github.com/repos/haukepetersen/RIOT/stargazers","contributors_url":"https://api.github.com/repos/haukepetersen/RIOT/contributors","subscribers_url":"https://api.github.com/repos/haukepetersen/RIOT/subscribers","subscription_url":"https://api.github.com/repos/haukepetersen/RIOT/subscription","commits_url":"https://api.github.com/repos/haukepetersen/RIOT/commits{/sha}","git_commits_url":"https://api.github.com/repos/haukepetersen/RIOT/git/commits{/sha}","comments_url":"https://api.github.com/repos/haukepetersen/RIOT/comments{/number}","issue_comment_url":"https://api.github.com/repos/haukepetersen/RIOT/issues/comments{/number}","contents_url":"https://api.github.com/repos/haukepetersen/RIOT/contents/{+path}","compare_url":"https://api.github.com/repos/haukepetersen/RIOT/compare/{base}...{head}","merges_url":"https://api.github.com/repos/haukepetersen/RIOT/merges","archive_url":"https://api.github.com/repos/haukepetersen/RIOT/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/haukepetersen/RIOT/downloads","issues_url":"https://api.github.com/repos/haukepetersen/RIOT/issues{/number}","pulls_url":"https://api.github.com/repos/haukepetersen/RIOT/pulls{/number}","milestones_url":"https://api.github.com/repos/haukepetersen/RIOT/milestones{/number}","notifications_url":"https://api.github.com/repos/haukepetersen/RIOT/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/haukepetersen/RIOT/labels{/name}","releases_url":"https://api.github.com/repos/haukepetersen/RIOT/releases{/id}","deployments_url":"https://api.github.com/repos/haukepetersen/RIOT/deployments","created_at":"2013-10-21T12:31:38Z","updated_at":"2015-03-02T09:15:38Z","pushed_at":"2017-06-28T10:58:26Z","git_url":"git://github.com/haukepetersen/RIOT.git","ssh_url":"git@github.com:haukepetersen/RIOT.git","clone_url":"https://github.com/haukepetersen/RIOT.git","svn_url":"https://github.com/haukepetersen/RIOT","homepage":"https://github.com/RIOT-OS/RIOT/wiki","size":41802,"stargazers_count":0,"watchers_count":0,"language":"C","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":0,"forks":2,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"RIOT-OS:master","ref":"master","sha":"96b90645ba4903dfa523e21fdb0b0c403f15bae9","user":{"login":"RIOT-OS","id":3079480,"avatar_url":"https://avatars1.githubusercontent.com/u/3079480?v=3","gravatar_id":"","url":"https://api.github.com/users/RIOT-OS","html_url":"https://github.com/RIOT-OS","followers_url":"https://api.github.com/users/RIOT-OS/followers","following_url":"https://api.github.com/users/RIOT-OS/following{/other_user}","gists_url":"https://api.github.com/users/RIOT-OS/gists{/gist_id}","starred_url":"https://api.github.com/users/RIOT-OS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RIOT-OS/subscriptions","organizations_url":"https://api.github.com/users/RIOT-OS/orgs","repos_url":"https://api.github.com/users/RIOT-OS/repos","events_url":"https://api.github.com/users/RIOT-OS/events{/privacy}","received_events_url":"https://api.github.com/users/RIOT-OS/received_events","type":"Organization","site_admin":false},"repo":{"id":7370241,"name":"RIOT","full_name":"RIOT-OS/RIOT","owner":{"login":"RIOT-OS","id":3079480,"avatar_url":"https://avatars1.githubusercontent.com/u/3079480?v=3","gravatar_id":"","url":"https://api.github.com/users/RIOT-OS","html_url":"https://github.com/RIOT-OS","followers_url":"https://api.github.com/users/RIOT-OS/followers","following_url":"https://api.github.com/users/RIOT-OS/following{/other_user}","gists_url":"https://api.github.com/users/RIOT-OS/gists{/gist_id}","starred_url":"https://api.github.com/users/RIOT-OS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RIOT-OS/subscriptions","organizations_url":"https://api.github.com/users/RIOT-OS/orgs","repos_url":"https://api.github.com/users/RIOT-OS/repos","events_url":"https://api.github.com/users/RIOT-OS/events{/privacy}","received_events_url":"https://api.github.com/users/RIOT-OS/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/RIOT-OS/RIOT","description":"RIOT -  The friendly OS for IoT","fork":false,"url":"https://api.github.com/repos/RIOT-OS/RIOT","forks_url":"https://api.github.com/repos/RIOT-OS/RIOT/forks","keys_url":"https://api.github.com/repos/RIOT-OS/RIOT/keys{/key_id}","collaborators_url":"https://api.github.com/repos/RIOT-OS/RIOT/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/RIOT-OS/RIOT/teams","hooks_url":"https://api.github.com/repos/RIOT-OS/RIOT/hooks","issue_events_url":"https://api.github.com/repos/RIOT-OS/RIOT/issues/events{/number}","events_url":"https://api.github.com/repos/RIOT-OS/RIOT/events","assignees_url":"https://api.github.com/repos/RIOT-OS/RIOT/assignees{/user}","branches_url":"https://api.github.com/repos/RIOT-OS/RIOT/branches{/branch}","tags_url":"https://api.github.com/repos/RIOT-OS/RIOT/tags","blobs_url":"https://api.github.com/repos/RIOT-OS/RIOT/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/RIOT-OS/RIOT/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/RIOT-OS/RIOT/git/refs{/sha}","trees_url":"https://api.github.com/repos/RIOT-OS/RIOT/git/trees{/sha}","statuses_url":"https://api.github.com/repos/RIOT-OS/RIOT/statuses/{sha}","languages_url":"https://api.github.com/repos/RIOT-OS/RIOT/languages","stargazers_url":"https://api.github.com/repos/RIOT-OS/RIOT/stargazers","contributors_url":"https://api.github.com/repos/RIOT-OS/RIOT/contributors","subscribers_url":"https://api.github.com/repos/RIOT-OS/RIOT/subscribers","subscription_url":"https://api.github.com/repos/RIOT-OS/RIOT/subscription","commits_url":"https://api.github.com/repos/RIOT-OS/RIOT/commits{/sha}","git_commits_url":"https://api.github.com/repos/RIOT-OS/RIOT/git/commits{/sha}","comments_url":"https://api.github.com/repos/RIOT-OS/RIOT/comments{/number}","issue_comment_url":"https://api.github.com/repos/RIOT-OS/RIOT/issues/comments{/number}","contents_url":"https://api.github.com/repos/RIOT-OS/RIOT/contents/{+path}","compare_url":"https://api.github.com/repos/RIOT-OS/RIOT/compare/{base}...{head}","merges_url":"https://api.github.com/repos/RIOT-OS/RIOT/merges","archive_url":"https://api.github.com/repos/RIOT-OS/RIOT/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/RIOT-OS/RIOT/downloads","issues_url":"https://api.github.com/repos/RIOT-OS/RIOT/issues{/number}","pulls_url":"https://api.github.com/repos/RIOT-OS/RIOT/pulls{/number}","milestones_url":"https://api.github.com/repos/RIOT-OS/RIOT/milestones{/number}","notifications_url":"https://api.github.com/repos/RIOT-OS/RIOT/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/RIOT-OS/RIOT/labels{/name}","releases_url":"https://api.github.com/repos/RIOT-OS/RIOT/releases{/id}","deployments_url":"https://api.github.com/repos/RIOT-OS/RIOT/deployments","created_at":"2012-12-29T20:38:40Z","updated_at":"2017-06-26T14:46:23Z","pushed_at":"2017-06-28T13:34:34Z","git_url":"git://github.com/RIOT-OS/RIOT.git","ssh_url":"git@github.com:RIOT-OS/RIOT.git","clone_url":"https://github.com/RIOT-OS/RIOT.git","svn_url":"https://github.com/RIOT-OS/RIOT","homepage":"https://github.com/RIOT-OS/RIOT/wiki","size":40860,"stargazers_count":1320,"watchers_count":1320,"language":"C","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":796,"mirror_url":null,"open_issues_count":585,"forks":796,"open_issues":585,"watchers":1320,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/RIOT-OS/RIOT/pulls/7263"},"html":{"href":"https://github.com/RIOT-OS/RIOT/pull/7263"},"issue":{"href":"https://api.github.com/repos/RIOT-OS/RIOT/issues/7263"},"comments":{"href":"https://api.github.com/repos/RIOT-OS/RIOT/issues/7263/comments"},"review_comments":{"href":"https://api.github.com/repos/RIOT-OS/RIOT/pulls/7263/comments"},"review_comment":{"href":"https://api.github.com/repos/RIOT-OS/RIOT/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/RIOT-OS/RIOT/pulls/7263/commits"},"statuses":{"href":"https://api.github.com/repos/RIOT-OS/RIOT/statuses/c3519872da0c8de7674c6a2156e71396abb1e37d"}}}}
{"actor":{"display_login":"kaspar030"}}