{"action":"created","comment":{"url":"https://api.github.com/repos/FRC1076/FRC1076-2016-Competition/pulls/comments/57532603","id":57532603,"diff_hunk":"@@ -72,36 +79,87 @@ public void testVaribleSpeed() {\n \t\n \t@Test\n \tpublic void testRepeatedMotion() {\n-\t\tencoder.reset();\n-\t\t\n \t\tDistanceAutonomous auto = new DistanceAutonomous(1.5, 1, encoder);\n \t\tauto.init();\n \t\tauto.driveTrainSpeed();\n \t\tassertEquals(false, auto.shouldChange());\n-\t\tencoder.distance = 1.5;\n+\t\tencoder.distance += 1.5;\n \t\tassertEquals(true, auto.shouldChange());\n \t\t\n \t\tauto = new DistanceAutonomous(1.5, 1, encoder);\n \t\tauto.init();\n \t\tauto.driveTrainSpeed();\n \t\tassertEquals(false, auto.shouldChange());\n-\t\tencoder.distance = 3;\n+\t\tencoder.distance += 1.5;\n \t\tauto.driveTrainSpeed();\n \t\tassertEquals(true, auto.shouldChange());\n \t}\n \t\n \t@Test\n \tpublic void testNoArmMotion() {\n-\t\tencoder.reset();\n \t\tAutoState auto = new DistanceAutonomous(100, 10, encoder);\n \t\tassertEquals(0, auto.armSpeed(), EPSILON);\n \t}\n \t\n \t@Test\n \tpublic void testNoIntakeMotion() {\n-\t\tencoder.reset();\n \t\tAutoState auto = new DistanceAutonomous(100, 10, encoder);\n \t\tassertEquals(0, auto.intakeSpeed(), EPSILON);\n \t}\n-\n+\t\n+\t// DistanceEncoder tests.\n+\t\n+\t@Test\n+\tpublic void testHighGear() {\n+\t\tgear.shiftHigh(robot);\n+\t\tAutoState auto = new DistanceAutonomous(120, 10, distanceEncoder);\n+\t\tencoder.rawCount += 120 * 34.0/40.0 * 4096 * 6 * Math.PI;\n+\t\tdistanceEncoder.updateDistance();\n+\t\t\n+\t\tauto.driveTrainSpeed();\n+\t\tassertTrue(auto.shouldChange());\n+\t}\n+\t\n+\t@Test\n+\tpublic void testLowGear() {\n+\t\tgear.shiftLow(robot);\n+\t\tAutoState auto = new DistanceAutonomous(110, 10, distanceEncoder);\n+\t\tencoder.rawCount += 110 * 14.0/60.0 * 4096 * 6 * Math.PI;","path":"FRC1076-2016-Competition/test/org/usfirst/frc/team1076/test/controller/DistanceAutonomousTest.java","position":109,"original_position":109,"commit_id":"c7ff5a40befd0258abd0b1938dae4c237fe125d2","original_commit_id":"34ea3dc543354bbe8dc8b831493d398ea05b30fc","user":{"login":"porglezomp","id":1690225,"avatar_url":"https://avatars.githubusercontent.com/u/1690225?v=3","gravatar_id":"","url":"https://api.github.com/users/porglezomp","html_url":"https://github.com/porglezomp","followers_url":"https://api.github.com/users/porglezomp/followers","following_url":"https://api.github.com/users/porglezomp/following{/other_user}","gists_url":"https://api.github.com/users/porglezomp/gists{/gist_id}","starred_url":"https://api.github.com/users/porglezomp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/porglezomp/subscriptions","organizations_url":"https://api.github.com/users/porglezomp/orgs","repos_url":"https://api.github.com/users/porglezomp/repos","events_url":"https://api.github.com/users/porglezomp/events{/privacy}","received_events_url":"https://api.github.com/users/porglezomp/received_events","type":"User","site_admin":false},"body":"assert that it should initially not change, so that we're sure that it's actually because it moved.","created_at":"2016-03-27T18:10:05Z","updated_at":"2016-03-27T18:10:05Z","html_url":"https://github.com/FRC1076/FRC1076-2016-Competition/pull/27#discussion_r57532603","pull_request_url":"https://api.github.com/repos/FRC1076/FRC1076-2016-Competition/pulls/27","_links":{"self":{"href":"https://api.github.com/repos/FRC1076/FRC1076-2016-Competition/pulls/comments/57532603"},"html":{"href":"https://github.com/FRC1076/FRC1076-2016-Competition/pull/27#discussion_r57532603"},"pull_request":{"href":"https://api.github.com/repos/FRC1076/FRC1076-2016-Competition/pulls/27"}}},"pull_request":{"url":"https://api.github.com/repos/FRC1076/FRC1076-2016-Competition/pulls/27","id":63820587,"html_url":"https://github.com/FRC1076/FRC1076-2016-Competition/pull/27","diff_url":"https://github.com/FRC1076/FRC1076-2016-Competition/pull/27.diff","patch_url":"https://github.com/FRC1076/FRC1076-2016-Competition/pull/27.patch","issue_url":"https://api.github.com/repos/FRC1076/FRC1076-2016-Competition/issues/27","number":27,"state":"open","locked":false,"title":"Make RobotEncoder return a real distance.","user":{"login":"a2aaron","id":15718048,"avatar_url":"https://avatars.githubusercontent.com/u/15718048?v=3","gravatar_id":"","url":"https://api.github.com/users/a2aaron","html_url":"https://github.com/a2aaron","followers_url":"https://api.github.com/users/a2aaron/followers","following_url":"https://api.github.com/users/a2aaron/following{/other_user}","gists_url":"https://api.github.com/users/a2aaron/gists{/gist_id}","starred_url":"https://api.github.com/users/a2aaron/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/a2aaron/subscriptions","organizations_url":"https://api.github.com/users/a2aaron/orgs","repos_url":"https://api.github.com/users/a2aaron/repos","events_url":"https://api.github.com/users/a2aaron/events{/privacy}","received_events_url":"https://api.github.com/users/a2aaron/received_events","type":"User","site_admin":false},"body":"RobotEncoder now returns a real distance (in inches) when getDistance() is called.\r\n\r\nAlso, GearShifter now has a getGearState() method.","created_at":"2016-03-23T01:52:21Z","updated_at":"2016-03-27T18:10:05Z","closed_at":null,"merged_at":null,"merge_commit_sha":"125844133077bf8340193129223c11b37fbff79e","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/FRC1076/FRC1076-2016-Competition/pulls/27/commits","review_comments_url":"https://api.github.com/repos/FRC1076/FRC1076-2016-Competition/pulls/27/comments","review_comment_url":"https://api.github.com/repos/FRC1076/FRC1076-2016-Competition/pulls/comments{/number}","comments_url":"https://api.github.com/repos/FRC1076/FRC1076-2016-Competition/issues/27/comments","statuses_url":"https://api.github.com/repos/FRC1076/FRC1076-2016-Competition/statuses/c7ff5a40befd0258abd0b1938dae4c237fe125d2","head":{"label":"a2aaron:feature/distance-calibration","ref":"feature/distance-calibration","sha":"c7ff5a40befd0258abd0b1938dae4c237fe125d2","user":{"login":"a2aaron","id":15718048,"avatar_url":"https://avatars.githubusercontent.com/u/15718048?v=3","gravatar_id":"","url":"https://api.github.com/users/a2aaron","html_url":"https://github.com/a2aaron","followers_url":"https://api.github.com/users/a2aaron/followers","following_url":"https://api.github.com/users/a2aaron/following{/other_user}","gists_url":"https://api.github.com/users/a2aaron/gists{/gist_id}","starred_url":"https://api.github.com/users/a2aaron/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/a2aaron/subscriptions","organizations_url":"https://api.github.com/users/a2aaron/orgs","repos_url":"https://api.github.com/users/a2aaron/repos","events_url":"https://api.github.com/users/a2aaron/events{/privacy}","received_events_url":"https://api.github.com/users/a2aaron/received_events","type":"User","site_admin":false},"repo":{"id":51661622,"name":"FRC1076-2016-Competition","full_name":"a2aaron/FRC1076-2016-Competition","owner":{"login":"a2aaron","id":15718048,"avatar_url":"https://avatars.githubusercontent.com/u/15718048?v=3","gravatar_id":"","url":"https://api.github.com/users/a2aaron","html_url":"https://github.com/a2aaron","followers_url":"https://api.github.com/users/a2aaron/followers","following_url":"https://api.github.com/users/a2aaron/following{/other_user}","gists_url":"https://api.github.com/users/a2aaron/gists{/gist_id}","starred_url":"https://api.github.com/users/a2aaron/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/a2aaron/subscriptions","organizations_url":"https://api.github.com/users/a2aaron/orgs","repos_url":"https://api.github.com/users/a2aaron/repos","events_url":"https://api.github.com/users/a2aaron/events{/privacy}","received_events_url":"https://api.github.com/users/a2aaron/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/a2aaron/FRC1076-2016-Competition","description":"The code for the 2016 competition robot","fork":true,"url":"https://api.github.com/repos/a2aaron/FRC1076-2016-Competition","forks_url":"https://api.github.com/repos/a2aaron/FRC1076-2016-Competition/forks","keys_url":"https://api.github.com/repos/a2aaron/FRC1076-2016-Competition/keys{/key_id}","collaborators_url":"https://api.github.com/repos/a2aaron/FRC1076-2016-Competition/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/a2aaron/FRC1076-2016-Competition/teams","hooks_url":"https://api.github.com/repos/a2aaron/FRC1076-2016-Competition/hooks","issue_events_url":"https://api.github.com/repos/a2aaron/FRC1076-2016-Competition/issues/events{/number}","events_url":"https://api.github.com/repos/a2aaron/FRC1076-2016-Competition/events","assignees_url":"https://api.github.com/repos/a2aaron/FRC1076-2016-Competition/assignees{/user}","branches_url":"https://api.github.com/repos/a2aaron/FRC1076-2016-Competition/branches{/branch}","tags_url":"https://api.github.com/repos/a2aaron/FRC1076-2016-Competition/tags","blobs_url":"https://api.github.com/repos/a2aaron/FRC1076-2016-Competition/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/a2aaron/FRC1076-2016-Competition/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/a2aaron/FRC1076-2016-Competition/git/refs{/sha}","trees_url":"https://api.github.com/repos/a2aaron/FRC1076-2016-Competition/git/trees{/sha}","statuses_url":"https://api.github.com/repos/a2aaron/FRC1076-2016-Competition/statuses/{sha}","languages_url":"https://api.github.com/repos/a2aaron/FRC1076-2016-Competition/languages","stargazers_url":"https://api.github.com/repos/a2aaron/FRC1076-2016-Competition/stargazers","contributors_url":"https://api.github.com/repos/a2aaron/FRC1076-2016-Competition/contributors","subscribers_url":"https://api.github.com/repos/a2aaron/FRC1076-2016-Competition/subscribers","subscription_url":"https://api.github.com/repos/a2aaron/FRC1076-2016-Competition/subscription","commits_url":"https://api.github.com/repos/a2aaron/FRC1076-2016-Competition/commits{/sha}","git_commits_url":"https://api.github.com/repos/a2aaron/FRC1076-2016-Competition/git/commits{/sha}","comments_url":"https://api.github.com/repos/a2aaron/FRC1076-2016-Competition/comments{/number}","issue_comment_url":"https://api.github.com/repos/a2aaron/FRC1076-2016-Competition/issues/comments{/number}","contents_url":"https://api.github.com/repos/a2aaron/FRC1076-2016-Competition/contents/{+path}","compare_url":"https://api.github.com/repos/a2aaron/FRC1076-2016-Competition/compare/{base}...{head}","merges_url":"https://api.github.com/repos/a2aaron/FRC1076-2016-Competition/merges","archive_url":"https://api.github.com/repos/a2aaron/FRC1076-2016-Competition/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/a2aaron/FRC1076-2016-Competition/downloads","issues_url":"https://api.github.com/repos/a2aaron/FRC1076-2016-Competition/issues{/number}","pulls_url":"https://api.github.com/repos/a2aaron/FRC1076-2016-Competition/pulls{/number}","milestones_url":"https://api.github.com/repos/a2aaron/FRC1076-2016-Competition/milestones{/number}","notifications_url":"https://api.github.com/repos/a2aaron/FRC1076-2016-Competition/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/a2aaron/FRC1076-2016-Competition/labels{/name}","releases_url":"https://api.github.com/repos/a2aaron/FRC1076-2016-Competition/releases{/id}","deployments_url":"https://api.github.com/repos/a2aaron/FRC1076-2016-Competition/deployments","created_at":"2016-02-13T19:23:52Z","updated_at":"2016-02-13T19:23:53Z","pushed_at":"2016-03-27T00:25:05Z","git_url":"git://github.com/a2aaron/FRC1076-2016-Competition.git","ssh_url":"git@github.com:a2aaron/FRC1076-2016-Competition.git","clone_url":"https://github.com/a2aaron/FRC1076-2016-Competition.git","svn_url":"https://github.com/a2aaron/FRC1076-2016-Competition","homepage":null,"size":565,"stargazers_count":0,"watchers_count":0,"language":"Java","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":"FRC1076:develop","ref":"develop","sha":"1d16daf0f325fd934efc0ef58e18f2e619ed743a","user":{"login":"FRC1076","id":9311430,"avatar_url":"https://avatars.githubusercontent.com/u/9311430?v=3","gravatar_id":"","url":"https://api.github.com/users/FRC1076","html_url":"https://github.com/FRC1076","followers_url":"https://api.github.com/users/FRC1076/followers","following_url":"https://api.github.com/users/FRC1076/following{/other_user}","gists_url":"https://api.github.com/users/FRC1076/gists{/gist_id}","starred_url":"https://api.github.com/users/FRC1076/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FRC1076/subscriptions","organizations_url":"https://api.github.com/users/FRC1076/orgs","repos_url":"https://api.github.com/users/FRC1076/repos","events_url":"https://api.github.com/users/FRC1076/events{/privacy}","received_events_url":"https://api.github.com/users/FRC1076/received_events","type":"Organization","site_admin":false},"repo":{"id":51269149,"name":"FRC1076-2016-Competition","full_name":"FRC1076/FRC1076-2016-Competition","owner":{"login":"FRC1076","id":9311430,"avatar_url":"https://avatars.githubusercontent.com/u/9311430?v=3","gravatar_id":"","url":"https://api.github.com/users/FRC1076","html_url":"https://github.com/FRC1076","followers_url":"https://api.github.com/users/FRC1076/followers","following_url":"https://api.github.com/users/FRC1076/following{/other_user}","gists_url":"https://api.github.com/users/FRC1076/gists{/gist_id}","starred_url":"https://api.github.com/users/FRC1076/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FRC1076/subscriptions","organizations_url":"https://api.github.com/users/FRC1076/orgs","repos_url":"https://api.github.com/users/FRC1076/repos","events_url":"https://api.github.com/users/FRC1076/events{/privacy}","received_events_url":"https://api.github.com/users/FRC1076/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/FRC1076/FRC1076-2016-Competition","description":"The code for the 2016 competition robot","fork":false,"url":"https://api.github.com/repos/FRC1076/FRC1076-2016-Competition","forks_url":"https://api.github.com/repos/FRC1076/FRC1076-2016-Competition/forks","keys_url":"https://api.github.com/repos/FRC1076/FRC1076-2016-Competition/keys{/key_id}","collaborators_url":"https://api.github.com/repos/FRC1076/FRC1076-2016-Competition/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/FRC1076/FRC1076-2016-Competition/teams","hooks_url":"https://api.github.com/repos/FRC1076/FRC1076-2016-Competition/hooks","issue_events_url":"https://api.github.com/repos/FRC1076/FRC1076-2016-Competition/issues/events{/number}","events_url":"https://api.github.com/repos/FRC1076/FRC1076-2016-Competition/events","assignees_url":"https://api.github.com/repos/FRC1076/FRC1076-2016-Competition/assignees{/user}","branches_url":"https://api.github.com/repos/FRC1076/FRC1076-2016-Competition/branches{/branch}","tags_url":"https://api.github.com/repos/FRC1076/FRC1076-2016-Competition/tags","blobs_url":"https://api.github.com/repos/FRC1076/FRC1076-2016-Competition/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/FRC1076/FRC1076-2016-Competition/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/FRC1076/FRC1076-2016-Competition/git/refs{/sha}","trees_url":"https://api.github.com/repos/FRC1076/FRC1076-2016-Competition/git/trees{/sha}","statuses_url":"https://api.github.com/repos/FRC1076/FRC1076-2016-Competition/statuses/{sha}","languages_url":"https://api.github.com/repos/FRC1076/FRC1076-2016-Competition/languages","stargazers_url":"https://api.github.com/repos/FRC1076/FRC1076-2016-Competition/stargazers","contributors_url":"https://api.github.com/repos/FRC1076/FRC1076-2016-Competition/contributors","subscribers_url":"https://api.github.com/repos/FRC1076/FRC1076-2016-Competition/subscribers","subscription_url":"https://api.github.com/repos/FRC1076/FRC1076-2016-Competition/subscription","commits_url":"https://api.github.com/repos/FRC1076/FRC1076-2016-Competition/commits{/sha}","git_commits_url":"https://api.github.com/repos/FRC1076/FRC1076-2016-Competition/git/commits{/sha}","comments_url":"https://api.github.com/repos/FRC1076/FRC1076-2016-Competition/comments{/number}","issue_comment_url":"https://api.github.com/repos/FRC1076/FRC1076-2016-Competition/issues/comments{/number}","contents_url":"https://api.github.com/repos/FRC1076/FRC1076-2016-Competition/contents/{+path}","compare_url":"https://api.github.com/repos/FRC1076/FRC1076-2016-Competition/compare/{base}...{head}","merges_url":"https://api.github.com/repos/FRC1076/FRC1076-2016-Competition/merges","archive_url":"https://api.github.com/repos/FRC1076/FRC1076-2016-Competition/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/FRC1076/FRC1076-2016-Competition/downloads","issues_url":"https://api.github.com/repos/FRC1076/FRC1076-2016-Competition/issues{/number}","pulls_url":"https://api.github.com/repos/FRC1076/FRC1076-2016-Competition/pulls{/number}","milestones_url":"https://api.github.com/repos/FRC1076/FRC1076-2016-Competition/milestones{/number}","notifications_url":"https://api.github.com/repos/FRC1076/FRC1076-2016-Competition/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/FRC1076/FRC1076-2016-Competition/labels{/name}","releases_url":"https://api.github.com/repos/FRC1076/FRC1076-2016-Competition/releases{/id}","deployments_url":"https://api.github.com/repos/FRC1076/FRC1076-2016-Competition/deployments","created_at":"2016-02-07T22:16:48Z","updated_at":"2016-02-07T22:17:53Z","pushed_at":"2016-03-27T00:25:06Z","git_url":"git://github.com/FRC1076/FRC1076-2016-Competition.git","ssh_url":"git@github.com:FRC1076/FRC1076-2016-Competition.git","clone_url":"https://github.com/FRC1076/FRC1076-2016-Competition.git","svn_url":"https://github.com/FRC1076/FRC1076-2016-Competition","homepage":null,"size":566,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":3,"forks":3,"open_issues":3,"watchers":0,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/FRC1076/FRC1076-2016-Competition/pulls/27"},"html":{"href":"https://github.com/FRC1076/FRC1076-2016-Competition/pull/27"},"issue":{"href":"https://api.github.com/repos/FRC1076/FRC1076-2016-Competition/issues/27"},"comments":{"href":"https://api.github.com/repos/FRC1076/FRC1076-2016-Competition/issues/27/comments"},"review_comments":{"href":"https://api.github.com/repos/FRC1076/FRC1076-2016-Competition/pulls/27/comments"},"review_comment":{"href":"https://api.github.com/repos/FRC1076/FRC1076-2016-Competition/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/FRC1076/FRC1076-2016-Competition/pulls/27/commits"},"statuses":{"href":"https://api.github.com/repos/FRC1076/FRC1076-2016-Competition/statuses/c7ff5a40befd0258abd0b1938dae4c237fe125d2"}}}}