{"action":"created","comment":{"url":"https://api.github.com/repos/RT-Thread-packages/rt-robot/pulls/comments/326857805","pull_request_review_id":291462903,"id":326857805,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDMyNjg1NzgwNQ==","diff_hunk":"@@ -102,6 +105,8 @@ rt_err_t wheel_reset(wheel_t whl)\n }\r\n \r\n /** speed = rpm x 60 x 2 x PI x radius **/\r\n+/** so : rpm = speed x 1.0f / (radius x 60 x 2 x PT) */\r\n+/** then : rpm = speed * speed_to_rpm_transform --> precomputed */\r\n rt_err_t wheel_set_speed(wheel_t whl, double speed)\r\n {\r\n     RT_ASSERT(whl != RT_NULL);\r","path":"wheel/wheel.c","position":18,"original_position":18,"commit_id":"707d95ae97ac17d1c070935e8001e29280b06b04","original_commit_id":"707d95ae97ac17d1c070935e8001e29280b06b04","user":{"login":"uLipe","id":5991413,"node_id":"MDQ6VXNlcjU5OTE0MTM=","avatar_url":"https://avatars0.githubusercontent.com/u/5991413?v=4","gravatar_id":"","url":"https://api.github.com/users/uLipe","html_url":"https://github.com/uLipe","followers_url":"https://api.github.com/users/uLipe/followers","following_url":"https://api.github.com/users/uLipe/following{/other_user}","gists_url":"https://api.github.com/users/uLipe/gists{/gist_id}","starred_url":"https://api.github.com/users/uLipe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uLipe/subscriptions","organizations_url":"https://api.github.com/users/uLipe/orgs","repos_url":"https://api.github.com/users/uLipe/repos","events_url":"https://api.github.com/users/uLipe/events{/privacy}","received_events_url":"https://api.github.com/users/uLipe/received_events","type":"User","site_admin":false},"body":"Ooops, you're right this was caused by error during my rebase with master, I'll fix that.\r\n\r\nThank you :)","created_at":"2019-09-21T12:04:18Z","updated_at":"2019-09-21T12:04:18Z","html_url":"https://github.com/RT-Thread-packages/rt-robot/pull/28#discussion_r326857805","pull_request_url":"https://api.github.com/repos/RT-Thread-packages/rt-robot/pulls/28","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/RT-Thread-packages/rt-robot/pulls/comments/326857805"},"html":{"href":"https://github.com/RT-Thread-packages/rt-robot/pull/28#discussion_r326857805"},"pull_request":{"href":"https://api.github.com/repos/RT-Thread-packages/rt-robot/pulls/28"}},"in_reply_to_id":326842403},"pull_request":{"url":"https://api.github.com/repos/RT-Thread-packages/rt-robot/pulls/28","id":318772357,"node_id":"MDExOlB1bGxSZXF1ZXN0MzE4NzcyMzU3","html_url":"https://github.com/RT-Thread-packages/rt-robot/pull/28","diff_url":"https://github.com/RT-Thread-packages/rt-robot/pull/28.diff","patch_url":"https://github.com/RT-Thread-packages/rt-robot/pull/28.patch","issue_url":"https://api.github.com/repos/RT-Thread-packages/rt-robot/issues/28","number":28,"state":"open","locked":false,"title":"wheel: improved rpm calculation for wheels","user":{"login":"uLipe","id":5991413,"node_id":"MDQ6VXNlcjU5OTE0MTM=","avatar_url":"https://avatars0.githubusercontent.com/u/5991413?v=4","gravatar_id":"","url":"https://api.github.com/users/uLipe","html_url":"https://github.com/uLipe","followers_url":"https://api.github.com/users/uLipe/followers","following_url":"https://api.github.com/users/uLipe/following{/other_user}","gists_url":"https://api.github.com/users/uLipe/gists{/gist_id}","starred_url":"https://api.github.com/users/uLipe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uLipe/subscriptions","organizations_url":"https://api.github.com/users/uLipe/orgs","repos_url":"https://api.github.com/users/uLipe/repos","events_url":"https://api.github.com/users/uLipe/events{/privacy}","received_events_url":"https://api.github.com/users/uLipe/received_events","type":"User","site_admin":false},"body":"I improved the wheel speed to rpm calculations by replacing the division to a pre-computed expression, then a reciprocal multiply was added. Using this scheme we gain speed in two perspectives:\r\n\r\n1 - the speed to rpm constant is calculated only once, that is it when the wheel object is allocated;\r\n2 - typical microcontrollers (and processors) have a single / two cycle multiplication instruction and its divistion instruction is non-deterministic, so where allowed I replaced the division by a reciprocal multiplication, this will hints the compiler to remove the division and add a simple multiplication in place speeding up the result and adding determinism to that.\r\n\r\nPlease let me know your thoughts.","created_at":"2019-09-18T11:52:38Z","updated_at":"2019-09-21T12:04:18Z","closed_at":null,"merged_at":null,"merge_commit_sha":"60f52a8b39a3ad4252c32ef4aab7b4db4423961e","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/RT-Thread-packages/rt-robot/pulls/28/commits","review_comments_url":"https://api.github.com/repos/RT-Thread-packages/rt-robot/pulls/28/comments","review_comment_url":"https://api.github.com/repos/RT-Thread-packages/rt-robot/pulls/comments{/number}","comments_url":"https://api.github.com/repos/RT-Thread-packages/rt-robot/issues/28/comments","statuses_url":"https://api.github.com/repos/RT-Thread-packages/rt-robot/statuses/707d95ae97ac17d1c070935e8001e29280b06b04","head":{"label":"uLipe:uLipe/better_wheel_calc","ref":"uLipe/better_wheel_calc","sha":"707d95ae97ac17d1c070935e8001e29280b06b04","user":{"login":"uLipe","id":5991413,"node_id":"MDQ6VXNlcjU5OTE0MTM=","avatar_url":"https://avatars0.githubusercontent.com/u/5991413?v=4","gravatar_id":"","url":"https://api.github.com/users/uLipe","html_url":"https://github.com/uLipe","followers_url":"https://api.github.com/users/uLipe/followers","following_url":"https://api.github.com/users/uLipe/following{/other_user}","gists_url":"https://api.github.com/users/uLipe/gists{/gist_id}","starred_url":"https://api.github.com/users/uLipe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uLipe/subscriptions","organizations_url":"https://api.github.com/users/uLipe/orgs","repos_url":"https://api.github.com/users/uLipe/repos","events_url":"https://api.github.com/users/uLipe/events{/privacy}","received_events_url":"https://api.github.com/users/uLipe/received_events","type":"User","site_admin":false},"repo":{"id":198879795,"node_id":"MDEwOlJlcG9zaXRvcnkxOTg4Nzk3OTU=","name":"rt-robot","full_name":"uLipe/rt-robot","private":false,"owner":{"login":"uLipe","id":5991413,"node_id":"MDQ6VXNlcjU5OTE0MTM=","avatar_url":"https://avatars0.githubusercontent.com/u/5991413?v=4","gravatar_id":"","url":"https://api.github.com/users/uLipe","html_url":"https://github.com/uLipe","followers_url":"https://api.github.com/users/uLipe/followers","following_url":"https://api.github.com/users/uLipe/following{/other_user}","gists_url":"https://api.github.com/users/uLipe/gists{/gist_id}","starred_url":"https://api.github.com/users/uLipe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uLipe/subscriptions","organizations_url":"https://api.github.com/users/uLipe/orgs","repos_url":"https://api.github.com/users/uLipe/repos","events_url":"https://api.github.com/users/uLipe/events{/privacy}","received_events_url":"https://api.github.com/users/uLipe/received_events","type":"User","site_admin":false},"html_url":"https://github.com/uLipe/rt-robot","description":"a platform in creating new exciting robots","fork":true,"url":"https://api.github.com/repos/uLipe/rt-robot","forks_url":"https://api.github.com/repos/uLipe/rt-robot/forks","keys_url":"https://api.github.com/repos/uLipe/rt-robot/keys{/key_id}","collaborators_url":"https://api.github.com/repos/uLipe/rt-robot/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/uLipe/rt-robot/teams","hooks_url":"https://api.github.com/repos/uLipe/rt-robot/hooks","issue_events_url":"https://api.github.com/repos/uLipe/rt-robot/issues/events{/number}","events_url":"https://api.github.com/repos/uLipe/rt-robot/events","assignees_url":"https://api.github.com/repos/uLipe/rt-robot/assignees{/user}","branches_url":"https://api.github.com/repos/uLipe/rt-robot/branches{/branch}","tags_url":"https://api.github.com/repos/uLipe/rt-robot/tags","blobs_url":"https://api.github.com/repos/uLipe/rt-robot/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/uLipe/rt-robot/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/uLipe/rt-robot/git/refs{/sha}","trees_url":"https://api.github.com/repos/uLipe/rt-robot/git/trees{/sha}","statuses_url":"https://api.github.com/repos/uLipe/rt-robot/statuses/{sha}","languages_url":"https://api.github.com/repos/uLipe/rt-robot/languages","stargazers_url":"https://api.github.com/repos/uLipe/rt-robot/stargazers","contributors_url":"https://api.github.com/repos/uLipe/rt-robot/contributors","subscribers_url":"https://api.github.com/repos/uLipe/rt-robot/subscribers","subscription_url":"https://api.github.com/repos/uLipe/rt-robot/subscription","commits_url":"https://api.github.com/repos/uLipe/rt-robot/commits{/sha}","git_commits_url":"https://api.github.com/repos/uLipe/rt-robot/git/commits{/sha}","comments_url":"https://api.github.com/repos/uLipe/rt-robot/comments{/number}","issue_comment_url":"https://api.github.com/repos/uLipe/rt-robot/issues/comments{/number}","contents_url":"https://api.github.com/repos/uLipe/rt-robot/contents/{+path}","compare_url":"https://api.github.com/repos/uLipe/rt-robot/compare/{base}...{head}","merges_url":"https://api.github.com/repos/uLipe/rt-robot/merges","archive_url":"https://api.github.com/repos/uLipe/rt-robot/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/uLipe/rt-robot/downloads","issues_url":"https://api.github.com/repos/uLipe/rt-robot/issues{/number}","pulls_url":"https://api.github.com/repos/uLipe/rt-robot/pulls{/number}","milestones_url":"https://api.github.com/repos/uLipe/rt-robot/milestones{/number}","notifications_url":"https://api.github.com/repos/uLipe/rt-robot/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/uLipe/rt-robot/labels{/name}","releases_url":"https://api.github.com/repos/uLipe/rt-robot/releases{/id}","deployments_url":"https://api.github.com/repos/uLipe/rt-robot/deployments","created_at":"2019-07-25T18:06:51Z","updated_at":"2019-07-25T18:06:54Z","pushed_at":"2019-09-18T11:58:37Z","git_url":"git://github.com/uLipe/rt-robot.git","ssh_url":"git@github.com:uLipe/rt-robot.git","clone_url":"https://github.com/uLipe/rt-robot.git","svn_url":"https://github.com/uLipe/rt-robot","homepage":null,"size":1486,"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":0,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"RT-Thread-packages:master","ref":"master","sha":"f9fe203d40c1ca8519dc8c5aeac601752ff1285a","user":{"login":"RT-Thread-packages","id":32235141,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMyMjM1MTQx","avatar_url":"https://avatars3.githubusercontent.com/u/32235141?v=4","gravatar_id":"","url":"https://api.github.com/users/RT-Thread-packages","html_url":"https://github.com/RT-Thread-packages","followers_url":"https://api.github.com/users/RT-Thread-packages/followers","following_url":"https://api.github.com/users/RT-Thread-packages/following{/other_user}","gists_url":"https://api.github.com/users/RT-Thread-packages/gists{/gist_id}","starred_url":"https://api.github.com/users/RT-Thread-packages/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RT-Thread-packages/subscriptions","organizations_url":"https://api.github.com/users/RT-Thread-packages/orgs","repos_url":"https://api.github.com/users/RT-Thread-packages/repos","events_url":"https://api.github.com/users/RT-Thread-packages/events{/privacy}","received_events_url":"https://api.github.com/users/RT-Thread-packages/received_events","type":"Organization","site_admin":false},"repo":{"id":197105459,"node_id":"MDEwOlJlcG9zaXRvcnkxOTcxMDU0NTk=","name":"rt-robot","full_name":"RT-Thread-packages/rt-robot","private":false,"owner":{"login":"RT-Thread-packages","id":32235141,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMyMjM1MTQx","avatar_url":"https://avatars3.githubusercontent.com/u/32235141?v=4","gravatar_id":"","url":"https://api.github.com/users/RT-Thread-packages","html_url":"https://github.com/RT-Thread-packages","followers_url":"https://api.github.com/users/RT-Thread-packages/followers","following_url":"https://api.github.com/users/RT-Thread-packages/following{/other_user}","gists_url":"https://api.github.com/users/RT-Thread-packages/gists{/gist_id}","starred_url":"https://api.github.com/users/RT-Thread-packages/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RT-Thread-packages/subscriptions","organizations_url":"https://api.github.com/users/RT-Thread-packages/orgs","repos_url":"https://api.github.com/users/RT-Thread-packages/repos","events_url":"https://api.github.com/users/RT-Thread-packages/events{/privacy}","received_events_url":"https://api.github.com/users/RT-Thread-packages/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/RT-Thread-packages/rt-robot","description":"a platform in creating new exciting robots","fork":false,"url":"https://api.github.com/repos/RT-Thread-packages/rt-robot","forks_url":"https://api.github.com/repos/RT-Thread-packages/rt-robot/forks","keys_url":"https://api.github.com/repos/RT-Thread-packages/rt-robot/keys{/key_id}","collaborators_url":"https://api.github.com/repos/RT-Thread-packages/rt-robot/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/RT-Thread-packages/rt-robot/teams","hooks_url":"https://api.github.com/repos/RT-Thread-packages/rt-robot/hooks","issue_events_url":"https://api.github.com/repos/RT-Thread-packages/rt-robot/issues/events{/number}","events_url":"https://api.github.com/repos/RT-Thread-packages/rt-robot/events","assignees_url":"https://api.github.com/repos/RT-Thread-packages/rt-robot/assignees{/user}","branches_url":"https://api.github.com/repos/RT-Thread-packages/rt-robot/branches{/branch}","tags_url":"https://api.github.com/repos/RT-Thread-packages/rt-robot/tags","blobs_url":"https://api.github.com/repos/RT-Thread-packages/rt-robot/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/RT-Thread-packages/rt-robot/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/RT-Thread-packages/rt-robot/git/refs{/sha}","trees_url":"https://api.github.com/repos/RT-Thread-packages/rt-robot/git/trees{/sha}","statuses_url":"https://api.github.com/repos/RT-Thread-packages/rt-robot/statuses/{sha}","languages_url":"https://api.github.com/repos/RT-Thread-packages/rt-robot/languages","stargazers_url":"https://api.github.com/repos/RT-Thread-packages/rt-robot/stargazers","contributors_url":"https://api.github.com/repos/RT-Thread-packages/rt-robot/contributors","subscribers_url":"https://api.github.com/repos/RT-Thread-packages/rt-robot/subscribers","subscription_url":"https://api.github.com/repos/RT-Thread-packages/rt-robot/subscription","commits_url":"https://api.github.com/repos/RT-Thread-packages/rt-robot/commits{/sha}","git_commits_url":"https://api.github.com/repos/RT-Thread-packages/rt-robot/git/commits{/sha}","comments_url":"https://api.github.com/repos/RT-Thread-packages/rt-robot/comments{/number}","issue_comment_url":"https://api.github.com/repos/RT-Thread-packages/rt-robot/issues/comments{/number}","contents_url":"https://api.github.com/repos/RT-Thread-packages/rt-robot/contents/{+path}","compare_url":"https://api.github.com/repos/RT-Thread-packages/rt-robot/compare/{base}...{head}","merges_url":"https://api.github.com/repos/RT-Thread-packages/rt-robot/merges","archive_url":"https://api.github.com/repos/RT-Thread-packages/rt-robot/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/RT-Thread-packages/rt-robot/downloads","issues_url":"https://api.github.com/repos/RT-Thread-packages/rt-robot/issues{/number}","pulls_url":"https://api.github.com/repos/RT-Thread-packages/rt-robot/pulls{/number}","milestones_url":"https://api.github.com/repos/RT-Thread-packages/rt-robot/milestones{/number}","notifications_url":"https://api.github.com/repos/RT-Thread-packages/rt-robot/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/RT-Thread-packages/rt-robot/labels{/name}","releases_url":"https://api.github.com/repos/RT-Thread-packages/rt-robot/releases{/id}","deployments_url":"https://api.github.com/repos/RT-Thread-packages/rt-robot/deployments","created_at":"2019-07-16T02:25:37Z","updated_at":"2019-09-21T04:34:33Z","pushed_at":"2019-09-18T11:58:38Z","git_url":"git://github.com/RT-Thread-packages/rt-robot.git","ssh_url":"git@github.com:RT-Thread-packages/rt-robot.git","clone_url":"https://github.com/RT-Thread-packages/rt-robot.git","svn_url":"https://github.com/RT-Thread-packages/rt-robot","homepage":null,"size":1497,"stargazers_count":47,"watchers_count":47,"language":"C","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":23,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":3,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":23,"open_issues":3,"watchers":47,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/RT-Thread-packages/rt-robot/pulls/28"},"html":{"href":"https://github.com/RT-Thread-packages/rt-robot/pull/28"},"issue":{"href":"https://api.github.com/repos/RT-Thread-packages/rt-robot/issues/28"},"comments":{"href":"https://api.github.com/repos/RT-Thread-packages/rt-robot/issues/28/comments"},"review_comments":{"href":"https://api.github.com/repos/RT-Thread-packages/rt-robot/pulls/28/comments"},"review_comment":{"href":"https://api.github.com/repos/RT-Thread-packages/rt-robot/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/RT-Thread-packages/rt-robot/pulls/28/commits"},"statuses":{"href":"https://api.github.com/repos/RT-Thread-packages/rt-robot/statuses/707d95ae97ac17d1c070935e8001e29280b06b04"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"uLipe"}}