{"action":"created","comment":{"url":"https://api.github.com/repos/robotadasufsc/Antonico-Line-Follower/pulls/comments/68153848","id":68153848,"diff_hunk":"@@ -81,23 +80,23 @@ ISR(TIMER1_COMPA_vect)\n {\n     // Calculo das velocidades dos motores\n \n-    float arcRight = ((float(pulsosDir))/3200.0)*M_PI;\n-    float arcLeft = ((float(pulsosEsq))/3200.0)*M_PI;\n+    float rightAngularDelta = ((float)right.read()/ENCODER_RESOLUTION)*M_PI;\n+    float leftAngularDelta = ((float)left.read()/ENCODER_RESOLUTION)*M_PI;\n \n-    wEsq = arcLeft*freq;\n-    wDir = arcRight*freq;\n+    float rightAngularSpeed = rightAngularDelta*freq;\n+    float leftAngularSpeed = leftAngularDelta*freq;\n \n-    posDir+=arcRight;\n-    posEsq+=arcLeft;\n+    rightAngPos += rightAngularDelta;\n+    leftAngPos += leftAngularDelta;\n \n-    pulsosDir = 0;\n-    pulsosEsq = 0;\n+    left.write(0);\n+    right.write(0);\n \n-    float u_esq = controle_esq.update(refEsq, wEsq);\n-    float u_dir = controle_dir.update(refDir, wDir);\n+    float u_esq = controle_esq.update(refEsq, leftAngularSpeed);\n+    float u_dir = controle_dir.update(refDir, rightAngularSpeed);\n \n     HBridge* bridge = &HBridge::self();\n-    bridge->setWheelPWM(bridge->LEFT,(int)floor(u_dir*51));\n-    bridge->setWheelPWM(bridge->RIGHT,(int)floor(u_esq*51));\n+    bridge->setWheelPWM(bridge->LEFT,(int)floor(u_esq*51));\n+    bridge->setWheelPWM(bridge->RIGHT,(int)floor(u_dir*51));","path":"Firmware/ControladorRobo/ControladorRobo.ino","position":79,"original_position":69,"commit_id":"1e98a604748891889b2d2b03f7cec136292fcc8f","original_commit_id":"b5f6a8907b3d6c5b786eaf0b4a4f52bd4f2e40f7","user":{"login":"Williangalvani","id":4013804,"avatar_url":"https://avatars.githubusercontent.com/u/4013804?v=3","gravatar_id":"","url":"https://api.github.com/users/Williangalvani","html_url":"https://github.com/Williangalvani","followers_url":"https://api.github.com/users/Williangalvani/followers","following_url":"https://api.github.com/users/Williangalvani/following{/other_user}","gists_url":"https://api.github.com/users/Williangalvani/gists{/gist_id}","starred_url":"https://api.github.com/users/Williangalvani/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Williangalvani/subscriptions","organizations_url":"https://api.github.com/users/Williangalvani/orgs","repos_url":"https://api.github.com/users/Williangalvani/repos","events_url":"https://api.github.com/users/Williangalvani/events{/privacy}","received_events_url":"https://api.github.com/users/Williangalvani/received_events","type":"User","site_admin":false},"body":"This turns the 0-5 controller output into 0-255 number for the H-bridge.\r\nBut it's a \"xunxo\" and needs to be done properly","created_at":"2016-06-22T23:30:17Z","updated_at":"2016-06-22T23:30:17Z","html_url":"https://github.com/robotadasufsc/Antonico-Line-Follower/pull/6#discussion_r68153848","pull_request_url":"https://api.github.com/repos/robotadasufsc/Antonico-Line-Follower/pulls/6","_links":{"self":{"href":"https://api.github.com/repos/robotadasufsc/Antonico-Line-Follower/pulls/comments/68153848"},"html":{"href":"https://github.com/robotadasufsc/Antonico-Line-Follower/pull/6#discussion_r68153848"},"pull_request":{"href":"https://api.github.com/repos/robotadasufsc/Antonico-Line-Follower/pulls/6"}}},"pull_request":{"url":"https://api.github.com/repos/robotadasufsc/Antonico-Line-Follower/pulls/6","id":74861212,"html_url":"https://github.com/robotadasufsc/Antonico-Line-Follower/pull/6","diff_url":"https://github.com/robotadasufsc/Antonico-Line-Follower/pull/6.diff","patch_url":"https://github.com/robotadasufsc/Antonico-Line-Follower/pull/6.patch","issue_url":"https://api.github.com/repos/robotadasufsc/Antonico-Line-Follower/issues/6","number":6,"state":"open","locked":false,"title":"New Encoder Lib, some bugfixes","user":{"login":"Williangalvani","id":4013804,"avatar_url":"https://avatars.githubusercontent.com/u/4013804?v=3","gravatar_id":"","url":"https://api.github.com/users/Williangalvani","html_url":"https://github.com/Williangalvani","followers_url":"https://api.github.com/users/Williangalvani/followers","following_url":"https://api.github.com/users/Williangalvani/following{/other_user}","gists_url":"https://api.github.com/users/Williangalvani/gists{/gist_id}","starred_url":"https://api.github.com/users/Williangalvani/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Williangalvani/subscriptions","organizations_url":"https://api.github.com/users/Williangalvani/orgs","repos_url":"https://api.github.com/users/Williangalvani/repos","events_url":"https://api.github.com/users/Williangalvani/events{/privacy}","received_events_url":"https://api.github.com/users/Williangalvani/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-06-22T21:31:03Z","updated_at":"2016-06-22T23:30:17Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e1d4c7cf271151f901f4d611d82abe44f7804ec6","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/robotadasufsc/Antonico-Line-Follower/pulls/6/commits","review_comments_url":"https://api.github.com/repos/robotadasufsc/Antonico-Line-Follower/pulls/6/comments","review_comment_url":"https://api.github.com/repos/robotadasufsc/Antonico-Line-Follower/pulls/comments{/number}","comments_url":"https://api.github.com/repos/robotadasufsc/Antonico-Line-Follower/issues/6/comments","statuses_url":"https://api.github.com/repos/robotadasufsc/Antonico-Line-Follower/statuses/1e98a604748891889b2d2b03f7cec136292fcc8f","head":{"label":"Williangalvani:rework","ref":"rework","sha":"1e98a604748891889b2d2b03f7cec136292fcc8f","user":{"login":"Williangalvani","id":4013804,"avatar_url":"https://avatars.githubusercontent.com/u/4013804?v=3","gravatar_id":"","url":"https://api.github.com/users/Williangalvani","html_url":"https://github.com/Williangalvani","followers_url":"https://api.github.com/users/Williangalvani/followers","following_url":"https://api.github.com/users/Williangalvani/following{/other_user}","gists_url":"https://api.github.com/users/Williangalvani/gists{/gist_id}","starred_url":"https://api.github.com/users/Williangalvani/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Williangalvani/subscriptions","organizations_url":"https://api.github.com/users/Williangalvani/orgs","repos_url":"https://api.github.com/users/Williangalvani/repos","events_url":"https://api.github.com/users/Williangalvani/events{/privacy}","received_events_url":"https://api.github.com/users/Williangalvani/received_events","type":"User","site_admin":false},"repo":{"id":61492960,"name":"Antonico-Line-Follower","full_name":"Williangalvani/Antonico-Line-Follower","owner":{"login":"Williangalvani","id":4013804,"avatar_url":"https://avatars.githubusercontent.com/u/4013804?v=3","gravatar_id":"","url":"https://api.github.com/users/Williangalvani","html_url":"https://github.com/Williangalvani","followers_url":"https://api.github.com/users/Williangalvani/followers","following_url":"https://api.github.com/users/Williangalvani/following{/other_user}","gists_url":"https://api.github.com/users/Williangalvani/gists{/gist_id}","starred_url":"https://api.github.com/users/Williangalvani/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Williangalvani/subscriptions","organizations_url":"https://api.github.com/users/Williangalvani/orgs","repos_url":"https://api.github.com/users/Williangalvani/repos","events_url":"https://api.github.com/users/Williangalvani/events{/privacy}","received_events_url":"https://api.github.com/users/Williangalvani/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Williangalvani/Antonico-Line-Follower","description":"A line follower robot designed and built mostly by the new members of the Robota mobile robotics groups.","fork":true,"url":"https://api.github.com/repos/Williangalvani/Antonico-Line-Follower","forks_url":"https://api.github.com/repos/Williangalvani/Antonico-Line-Follower/forks","keys_url":"https://api.github.com/repos/Williangalvani/Antonico-Line-Follower/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Williangalvani/Antonico-Line-Follower/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Williangalvani/Antonico-Line-Follower/teams","hooks_url":"https://api.github.com/repos/Williangalvani/Antonico-Line-Follower/hooks","issue_events_url":"https://api.github.com/repos/Williangalvani/Antonico-Line-Follower/issues/events{/number}","events_url":"https://api.github.com/repos/Williangalvani/Antonico-Line-Follower/events","assignees_url":"https://api.github.com/repos/Williangalvani/Antonico-Line-Follower/assignees{/user}","branches_url":"https://api.github.com/repos/Williangalvani/Antonico-Line-Follower/branches{/branch}","tags_url":"https://api.github.com/repos/Williangalvani/Antonico-Line-Follower/tags","blobs_url":"https://api.github.com/repos/Williangalvani/Antonico-Line-Follower/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Williangalvani/Antonico-Line-Follower/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Williangalvani/Antonico-Line-Follower/git/refs{/sha}","trees_url":"https://api.github.com/repos/Williangalvani/Antonico-Line-Follower/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Williangalvani/Antonico-Line-Follower/statuses/{sha}","languages_url":"https://api.github.com/repos/Williangalvani/Antonico-Line-Follower/languages","stargazers_url":"https://api.github.com/repos/Williangalvani/Antonico-Line-Follower/stargazers","contributors_url":"https://api.github.com/repos/Williangalvani/Antonico-Line-Follower/contributors","subscribers_url":"https://api.github.com/repos/Williangalvani/Antonico-Line-Follower/subscribers","subscription_url":"https://api.github.com/repos/Williangalvani/Antonico-Line-Follower/subscription","commits_url":"https://api.github.com/repos/Williangalvani/Antonico-Line-Follower/commits{/sha}","git_commits_url":"https://api.github.com/repos/Williangalvani/Antonico-Line-Follower/git/commits{/sha}","comments_url":"https://api.github.com/repos/Williangalvani/Antonico-Line-Follower/comments{/number}","issue_comment_url":"https://api.github.com/repos/Williangalvani/Antonico-Line-Follower/issues/comments{/number}","contents_url":"https://api.github.com/repos/Williangalvani/Antonico-Line-Follower/contents/{+path}","compare_url":"https://api.github.com/repos/Williangalvani/Antonico-Line-Follower/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Williangalvani/Antonico-Line-Follower/merges","archive_url":"https://api.github.com/repos/Williangalvani/Antonico-Line-Follower/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Williangalvani/Antonico-Line-Follower/downloads","issues_url":"https://api.github.com/repos/Williangalvani/Antonico-Line-Follower/issues{/number}","pulls_url":"https://api.github.com/repos/Williangalvani/Antonico-Line-Follower/pulls{/number}","milestones_url":"https://api.github.com/repos/Williangalvani/Antonico-Line-Follower/milestones{/number}","notifications_url":"https://api.github.com/repos/Williangalvani/Antonico-Line-Follower/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Williangalvani/Antonico-Line-Follower/labels{/name}","releases_url":"https://api.github.com/repos/Williangalvani/Antonico-Line-Follower/releases{/id}","deployments_url":"https://api.github.com/repos/Williangalvani/Antonico-Line-Follower/deployments","created_at":"2016-06-19T17:58:28Z","updated_at":"2016-06-19T17:58:30Z","pushed_at":"2016-06-22T21:28:48Z","git_url":"git://github.com/Williangalvani/Antonico-Line-Follower.git","ssh_url":"git@github.com:Williangalvani/Antonico-Line-Follower.git","clone_url":"https://github.com/Williangalvani/Antonico-Line-Follower.git","svn_url":"https://github.com/Williangalvani/Antonico-Line-Follower","homepage":null,"size":2624,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"robotadasufsc:rework","ref":"rework","sha":"4e5b6c1e6c2b15293b12afca0af7f61e7eea5dc7","user":{"login":"robotadasufsc","id":8619891,"avatar_url":"https://avatars.githubusercontent.com/u/8619891?v=3","gravatar_id":"","url":"https://api.github.com/users/robotadasufsc","html_url":"https://github.com/robotadasufsc","followers_url":"https://api.github.com/users/robotadasufsc/followers","following_url":"https://api.github.com/users/robotadasufsc/following{/other_user}","gists_url":"https://api.github.com/users/robotadasufsc/gists{/gist_id}","starred_url":"https://api.github.com/users/robotadasufsc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robotadasufsc/subscriptions","organizations_url":"https://api.github.com/users/robotadasufsc/orgs","repos_url":"https://api.github.com/users/robotadasufsc/repos","events_url":"https://api.github.com/users/robotadasufsc/events{/privacy}","received_events_url":"https://api.github.com/users/robotadasufsc/received_events","type":"Organization","site_admin":false},"repo":{"id":61251927,"name":"Antonico-Line-Follower","full_name":"robotadasufsc/Antonico-Line-Follower","owner":{"login":"robotadasufsc","id":8619891,"avatar_url":"https://avatars.githubusercontent.com/u/8619891?v=3","gravatar_id":"","url":"https://api.github.com/users/robotadasufsc","html_url":"https://github.com/robotadasufsc","followers_url":"https://api.github.com/users/robotadasufsc/followers","following_url":"https://api.github.com/users/robotadasufsc/following{/other_user}","gists_url":"https://api.github.com/users/robotadasufsc/gists{/gist_id}","starred_url":"https://api.github.com/users/robotadasufsc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robotadasufsc/subscriptions","organizations_url":"https://api.github.com/users/robotadasufsc/orgs","repos_url":"https://api.github.com/users/robotadasufsc/repos","events_url":"https://api.github.com/users/robotadasufsc/events{/privacy}","received_events_url":"https://api.github.com/users/robotadasufsc/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/robotadasufsc/Antonico-Line-Follower","description":"A line follower robot designed and built mostly by the new members of the Robota mobile robotics groups.","fork":false,"url":"https://api.github.com/repos/robotadasufsc/Antonico-Line-Follower","forks_url":"https://api.github.com/repos/robotadasufsc/Antonico-Line-Follower/forks","keys_url":"https://api.github.com/repos/robotadasufsc/Antonico-Line-Follower/keys{/key_id}","collaborators_url":"https://api.github.com/repos/robotadasufsc/Antonico-Line-Follower/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/robotadasufsc/Antonico-Line-Follower/teams","hooks_url":"https://api.github.com/repos/robotadasufsc/Antonico-Line-Follower/hooks","issue_events_url":"https://api.github.com/repos/robotadasufsc/Antonico-Line-Follower/issues/events{/number}","events_url":"https://api.github.com/repos/robotadasufsc/Antonico-Line-Follower/events","assignees_url":"https://api.github.com/repos/robotadasufsc/Antonico-Line-Follower/assignees{/user}","branches_url":"https://api.github.com/repos/robotadasufsc/Antonico-Line-Follower/branches{/branch}","tags_url":"https://api.github.com/repos/robotadasufsc/Antonico-Line-Follower/tags","blobs_url":"https://api.github.com/repos/robotadasufsc/Antonico-Line-Follower/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/robotadasufsc/Antonico-Line-Follower/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/robotadasufsc/Antonico-Line-Follower/git/refs{/sha}","trees_url":"https://api.github.com/repos/robotadasufsc/Antonico-Line-Follower/git/trees{/sha}","statuses_url":"https://api.github.com/repos/robotadasufsc/Antonico-Line-Follower/statuses/{sha}","languages_url":"https://api.github.com/repos/robotadasufsc/Antonico-Line-Follower/languages","stargazers_url":"https://api.github.com/repos/robotadasufsc/Antonico-Line-Follower/stargazers","contributors_url":"https://api.github.com/repos/robotadasufsc/Antonico-Line-Follower/contributors","subscribers_url":"https://api.github.com/repos/robotadasufsc/Antonico-Line-Follower/subscribers","subscription_url":"https://api.github.com/repos/robotadasufsc/Antonico-Line-Follower/subscription","commits_url":"https://api.github.com/repos/robotadasufsc/Antonico-Line-Follower/commits{/sha}","git_commits_url":"https://api.github.com/repos/robotadasufsc/Antonico-Line-Follower/git/commits{/sha}","comments_url":"https://api.github.com/repos/robotadasufsc/Antonico-Line-Follower/comments{/number}","issue_comment_url":"https://api.github.com/repos/robotadasufsc/Antonico-Line-Follower/issues/comments{/number}","contents_url":"https://api.github.com/repos/robotadasufsc/Antonico-Line-Follower/contents/{+path}","compare_url":"https://api.github.com/repos/robotadasufsc/Antonico-Line-Follower/compare/{base}...{head}","merges_url":"https://api.github.com/repos/robotadasufsc/Antonico-Line-Follower/merges","archive_url":"https://api.github.com/repos/robotadasufsc/Antonico-Line-Follower/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/robotadasufsc/Antonico-Line-Follower/downloads","issues_url":"https://api.github.com/repos/robotadasufsc/Antonico-Line-Follower/issues{/number}","pulls_url":"https://api.github.com/repos/robotadasufsc/Antonico-Line-Follower/pulls{/number}","milestones_url":"https://api.github.com/repos/robotadasufsc/Antonico-Line-Follower/milestones{/number}","notifications_url":"https://api.github.com/repos/robotadasufsc/Antonico-Line-Follower/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/robotadasufsc/Antonico-Line-Follower/labels{/name}","releases_url":"https://api.github.com/repos/robotadasufsc/Antonico-Line-Follower/releases{/id}","deployments_url":"https://api.github.com/repos/robotadasufsc/Antonico-Line-Follower/deployments","created_at":"2016-06-16T01:15:42Z","updated_at":"2016-06-19T17:10:01Z","pushed_at":"2016-06-22T21:31:03Z","git_url":"git://github.com/robotadasufsc/Antonico-Line-Follower.git","ssh_url":"git@github.com:robotadasufsc/Antonico-Line-Follower.git","clone_url":"https://github.com/robotadasufsc/Antonico-Line-Follower.git","svn_url":"https://github.com/robotadasufsc/Antonico-Line-Follower","homepage":null,"size":2618,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":6,"forks":2,"open_issues":6,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/robotadasufsc/Antonico-Line-Follower/pulls/6"},"html":{"href":"https://github.com/robotadasufsc/Antonico-Line-Follower/pull/6"},"issue":{"href":"https://api.github.com/repos/robotadasufsc/Antonico-Line-Follower/issues/6"},"comments":{"href":"https://api.github.com/repos/robotadasufsc/Antonico-Line-Follower/issues/6/comments"},"review_comments":{"href":"https://api.github.com/repos/robotadasufsc/Antonico-Line-Follower/pulls/6/comments"},"review_comment":{"href":"https://api.github.com/repos/robotadasufsc/Antonico-Line-Follower/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/robotadasufsc/Antonico-Line-Follower/pulls/6/commits"},"statuses":{"href":"https://api.github.com/repos/robotadasufsc/Antonico-Line-Follower/statuses/1e98a604748891889b2d2b03f7cec136292fcc8f"}}}}
{"actor":{"display_login":"Williangalvani"}}