{"action":"created","comment":{"url":"https://api.github.com/repos/TeamCautionRobotics/2018-FRC-robot/pulls/comments/168327068","pull_request_review_id":96677000,"id":168327068,"diff_hunk":"@@ -0,0 +1,161 @@\n+package com.teamcautionrobotics.robot2018;\n+\n+import edu.wpi.first.wpilibj.Encoder;\n+import edu.wpi.first.wpilibj.VictorSP;\n+import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard;\n+import edu.wpi.first.wpilibj.PIDController;\n+import edu.wpi.first.wpilibj.PIDOutput;\n+import edu.wpi.first.wpilibj.PIDSource;\n+import edu.wpi.first.wpilibj.PIDSourceType;\n+\n+public class Lift implements PIDOutput, PIDSource {\n+\n+    enum LiftLevel {\n+        GROUND(0), SWITCH(19), LOW_SCALE(48), HIGH_SCALE(76);\n+\n+        private static LiftLevel[] values = values();\n+\n+        double height;\n+\n+        private LiftLevel(double height) {\n+            this.height = height;\n+        }\n+\n+        public LiftLevel next() {\n+            if (this.ordinal() == values.length - 1) {\n+                return values[this.ordinal()];\n+            } else {\n+                return values[this.ordinal() + 1];\n+            }\n+        }\n+\n+        public LiftLevel previous() {\n+            if (this.ordinal() == 0) {\n+                return values[this.ordinal()];","path":"src/com/teamcautionrobotics/robot2018/Lift.java","position":34,"original_position":34,"commit_id":"2e93d359f79842c6c795fe928a37837a617c4083","original_commit_id":"2e93d359f79842c6c795fe928a37837a617c4083","user":{"login":"docprofsky","id":6558271,"avatar_url":"https://avatars3.githubusercontent.com/u/6558271?v=4","gravatar_id":"","url":"https://api.github.com/users/docprofsky","html_url":"https://github.com/docprofsky","followers_url":"https://api.github.com/users/docprofsky/followers","following_url":"https://api.github.com/users/docprofsky/following{/other_user}","gists_url":"https://api.github.com/users/docprofsky/gists{/gist_id}","starred_url":"https://api.github.com/users/docprofsky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/docprofsky/subscriptions","organizations_url":"https://api.github.com/users/docprofsky/orgs","repos_url":"https://api.github.com/users/docprofsky/repos","events_url":"https://api.github.com/users/docprofsky/events{/privacy}","received_events_url":"https://api.github.com/users/docprofsky/received_events","type":"User","site_admin":false},"body":"Change to `return this;`","created_at":"2018-02-14T22:13:34Z","updated_at":"2018-02-14T22:44:09Z","html_url":"https://github.com/TeamCautionRobotics/2018-FRC-robot/pull/14#discussion_r168327068","pull_request_url":"https://api.github.com/repos/TeamCautionRobotics/2018-FRC-robot/pulls/14","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/TeamCautionRobotics/2018-FRC-robot/pulls/comments/168327068"},"html":{"href":"https://github.com/TeamCautionRobotics/2018-FRC-robot/pull/14#discussion_r168327068"},"pull_request":{"href":"https://api.github.com/repos/TeamCautionRobotics/2018-FRC-robot/pulls/14"}}},"pull_request":{"url":"https://api.github.com/repos/TeamCautionRobotics/2018-FRC-robot/pulls/14","id":168498660,"html_url":"https://github.com/TeamCautionRobotics/2018-FRC-robot/pull/14","diff_url":"https://github.com/TeamCautionRobotics/2018-FRC-robot/pull/14.diff","patch_url":"https://github.com/TeamCautionRobotics/2018-FRC-robot/pull/14.patch","issue_url":"https://api.github.com/repos/TeamCautionRobotics/2018-FRC-robot/issues/14","number":14,"state":"open","locked":false,"title":"Lift stages","user":{"login":"TaeSeanDo","id":16858299,"avatar_url":"https://avatars2.githubusercontent.com/u/16858299?v=4","gravatar_id":"","url":"https://api.github.com/users/TaeSeanDo","html_url":"https://github.com/TaeSeanDo","followers_url":"https://api.github.com/users/TaeSeanDo/followers","following_url":"https://api.github.com/users/TaeSeanDo/following{/other_user}","gists_url":"https://api.github.com/users/TaeSeanDo/gists{/gist_id}","starred_url":"https://api.github.com/users/TaeSeanDo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TaeSeanDo/subscriptions","organizations_url":"https://api.github.com/users/TaeSeanDo/orgs","repos_url":"https://api.github.com/users/TaeSeanDo/repos","events_url":"https://api.github.com/users/TaeSeanDo/events{/privacy}","received_events_url":"https://api.github.com/users/TaeSeanDo/received_events","type":"User","site_admin":false},"body":"Code for auto-setting tower to different stages: GROUND, SWITCH, LOW_SCALE, HIGH_SCALE using PID. Single/double/triple clicks of A/Y to change level. Right thumbstick for manual control. Untested.","created_at":"2018-02-12T04:34:16Z","updated_at":"2018-02-14T22:44:10Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/TeamCautionRobotics/2018-FRC-robot/pulls/14/commits","review_comments_url":"https://api.github.com/repos/TeamCautionRobotics/2018-FRC-robot/pulls/14/comments","review_comment_url":"https://api.github.com/repos/TeamCautionRobotics/2018-FRC-robot/pulls/comments{/number}","comments_url":"https://api.github.com/repos/TeamCautionRobotics/2018-FRC-robot/issues/14/comments","statuses_url":"https://api.github.com/repos/TeamCautionRobotics/2018-FRC-robot/statuses/2e93d359f79842c6c795fe928a37837a617c4083","head":{"label":"TeamCautionRobotics:Lift-Stages","ref":"Lift-Stages","sha":"2e93d359f79842c6c795fe928a37837a617c4083","user":{"login":"TeamCautionRobotics","id":6562594,"avatar_url":"https://avatars0.githubusercontent.com/u/6562594?v=4","gravatar_id":"","url":"https://api.github.com/users/TeamCautionRobotics","html_url":"https://github.com/TeamCautionRobotics","followers_url":"https://api.github.com/users/TeamCautionRobotics/followers","following_url":"https://api.github.com/users/TeamCautionRobotics/following{/other_user}","gists_url":"https://api.github.com/users/TeamCautionRobotics/gists{/gist_id}","starred_url":"https://api.github.com/users/TeamCautionRobotics/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TeamCautionRobotics/subscriptions","organizations_url":"https://api.github.com/users/TeamCautionRobotics/orgs","repos_url":"https://api.github.com/users/TeamCautionRobotics/repos","events_url":"https://api.github.com/users/TeamCautionRobotics/events{/privacy}","received_events_url":"https://api.github.com/users/TeamCautionRobotics/received_events","type":"Organization","site_admin":false},"repo":{"id":117364111,"name":"2018-FRC-robot","full_name":"TeamCautionRobotics/2018-FRC-robot","owner":{"login":"TeamCautionRobotics","id":6562594,"avatar_url":"https://avatars0.githubusercontent.com/u/6562594?v=4","gravatar_id":"","url":"https://api.github.com/users/TeamCautionRobotics","html_url":"https://github.com/TeamCautionRobotics","followers_url":"https://api.github.com/users/TeamCautionRobotics/followers","following_url":"https://api.github.com/users/TeamCautionRobotics/following{/other_user}","gists_url":"https://api.github.com/users/TeamCautionRobotics/gists{/gist_id}","starred_url":"https://api.github.com/users/TeamCautionRobotics/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TeamCautionRobotics/subscriptions","organizations_url":"https://api.github.com/users/TeamCautionRobotics/orgs","repos_url":"https://api.github.com/users/TeamCautionRobotics/repos","events_url":"https://api.github.com/users/TeamCautionRobotics/events{/privacy}","received_events_url":"https://api.github.com/users/TeamCautionRobotics/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/TeamCautionRobotics/2018-FRC-robot","description":null,"fork":false,"url":"https://api.github.com/repos/TeamCautionRobotics/2018-FRC-robot","forks_url":"https://api.github.com/repos/TeamCautionRobotics/2018-FRC-robot/forks","keys_url":"https://api.github.com/repos/TeamCautionRobotics/2018-FRC-robot/keys{/key_id}","collaborators_url":"https://api.github.com/repos/TeamCautionRobotics/2018-FRC-robot/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/TeamCautionRobotics/2018-FRC-robot/teams","hooks_url":"https://api.github.com/repos/TeamCautionRobotics/2018-FRC-robot/hooks","issue_events_url":"https://api.github.com/repos/TeamCautionRobotics/2018-FRC-robot/issues/events{/number}","events_url":"https://api.github.com/repos/TeamCautionRobotics/2018-FRC-robot/events","assignees_url":"https://api.github.com/repos/TeamCautionRobotics/2018-FRC-robot/assignees{/user}","branches_url":"https://api.github.com/repos/TeamCautionRobotics/2018-FRC-robot/branches{/branch}","tags_url":"https://api.github.com/repos/TeamCautionRobotics/2018-FRC-robot/tags","blobs_url":"https://api.github.com/repos/TeamCautionRobotics/2018-FRC-robot/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/TeamCautionRobotics/2018-FRC-robot/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/TeamCautionRobotics/2018-FRC-robot/git/refs{/sha}","trees_url":"https://api.github.com/repos/TeamCautionRobotics/2018-FRC-robot/git/trees{/sha}","statuses_url":"https://api.github.com/repos/TeamCautionRobotics/2018-FRC-robot/statuses/{sha}","languages_url":"https://api.github.com/repos/TeamCautionRobotics/2018-FRC-robot/languages","stargazers_url":"https://api.github.com/repos/TeamCautionRobotics/2018-FRC-robot/stargazers","contributors_url":"https://api.github.com/repos/TeamCautionRobotics/2018-FRC-robot/contributors","subscribers_url":"https://api.github.com/repos/TeamCautionRobotics/2018-FRC-robot/subscribers","subscription_url":"https://api.github.com/repos/TeamCautionRobotics/2018-FRC-robot/subscription","commits_url":"https://api.github.com/repos/TeamCautionRobotics/2018-FRC-robot/commits{/sha}","git_commits_url":"https://api.github.com/repos/TeamCautionRobotics/2018-FRC-robot/git/commits{/sha}","comments_url":"https://api.github.com/repos/TeamCautionRobotics/2018-FRC-robot/comments{/number}","issue_comment_url":"https://api.github.com/repos/TeamCautionRobotics/2018-FRC-robot/issues/comments{/number}","contents_url":"https://api.github.com/repos/TeamCautionRobotics/2018-FRC-robot/contents/{+path}","compare_url":"https://api.github.com/repos/TeamCautionRobotics/2018-FRC-robot/compare/{base}...{head}","merges_url":"https://api.github.com/repos/TeamCautionRobotics/2018-FRC-robot/merges","archive_url":"https://api.github.com/repos/TeamCautionRobotics/2018-FRC-robot/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/TeamCautionRobotics/2018-FRC-robot/downloads","issues_url":"https://api.github.com/repos/TeamCautionRobotics/2018-FRC-robot/issues{/number}","pulls_url":"https://api.github.com/repos/TeamCautionRobotics/2018-FRC-robot/pulls{/number}","milestones_url":"https://api.github.com/repos/TeamCautionRobotics/2018-FRC-robot/milestones{/number}","notifications_url":"https://api.github.com/repos/TeamCautionRobotics/2018-FRC-robot/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/TeamCautionRobotics/2018-FRC-robot/labels{/name}","releases_url":"https://api.github.com/repos/TeamCautionRobotics/2018-FRC-robot/releases{/id}","deployments_url":"https://api.github.com/repos/TeamCautionRobotics/2018-FRC-robot/deployments","created_at":"2018-01-13T17:37:14Z","updated_at":"2018-01-13T17:38:25Z","pushed_at":"2018-02-14T05:59:28Z","git_url":"git://github.com/TeamCautionRobotics/2018-FRC-robot.git","ssh_url":"git@github.com:TeamCautionRobotics/2018-FRC-robot.git","clone_url":"https://github.com/TeamCautionRobotics/2018-FRC-robot.git","svn_url":"https://github.com/TeamCautionRobotics/2018-FRC-robot","homepage":null,"size":69,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":4,"license":null,"forks":0,"open_issues":4,"watchers":0,"default_branch":"master"}},"base":{"label":"TeamCautionRobotics:master","ref":"master","sha":"880eed0a91605af96eba24de335ecacf5be3b48a","user":{"login":"TeamCautionRobotics","id":6562594,"avatar_url":"https://avatars0.githubusercontent.com/u/6562594?v=4","gravatar_id":"","url":"https://api.github.com/users/TeamCautionRobotics","html_url":"https://github.com/TeamCautionRobotics","followers_url":"https://api.github.com/users/TeamCautionRobotics/followers","following_url":"https://api.github.com/users/TeamCautionRobotics/following{/other_user}","gists_url":"https://api.github.com/users/TeamCautionRobotics/gists{/gist_id}","starred_url":"https://api.github.com/users/TeamCautionRobotics/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TeamCautionRobotics/subscriptions","organizations_url":"https://api.github.com/users/TeamCautionRobotics/orgs","repos_url":"https://api.github.com/users/TeamCautionRobotics/repos","events_url":"https://api.github.com/users/TeamCautionRobotics/events{/privacy}","received_events_url":"https://api.github.com/users/TeamCautionRobotics/received_events","type":"Organization","site_admin":false},"repo":{"id":117364111,"name":"2018-FRC-robot","full_name":"TeamCautionRobotics/2018-FRC-robot","owner":{"login":"TeamCautionRobotics","id":6562594,"avatar_url":"https://avatars0.githubusercontent.com/u/6562594?v=4","gravatar_id":"","url":"https://api.github.com/users/TeamCautionRobotics","html_url":"https://github.com/TeamCautionRobotics","followers_url":"https://api.github.com/users/TeamCautionRobotics/followers","following_url":"https://api.github.com/users/TeamCautionRobotics/following{/other_user}","gists_url":"https://api.github.com/users/TeamCautionRobotics/gists{/gist_id}","starred_url":"https://api.github.com/users/TeamCautionRobotics/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TeamCautionRobotics/subscriptions","organizations_url":"https://api.github.com/users/TeamCautionRobotics/orgs","repos_url":"https://api.github.com/users/TeamCautionRobotics/repos","events_url":"https://api.github.com/users/TeamCautionRobotics/events{/privacy}","received_events_url":"https://api.github.com/users/TeamCautionRobotics/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/TeamCautionRobotics/2018-FRC-robot","description":null,"fork":false,"url":"https://api.github.com/repos/TeamCautionRobotics/2018-FRC-robot","forks_url":"https://api.github.com/repos/TeamCautionRobotics/2018-FRC-robot/forks","keys_url":"https://api.github.com/repos/TeamCautionRobotics/2018-FRC-robot/keys{/key_id}","collaborators_url":"https://api.github.com/repos/TeamCautionRobotics/2018-FRC-robot/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/TeamCautionRobotics/2018-FRC-robot/teams","hooks_url":"https://api.github.com/repos/TeamCautionRobotics/2018-FRC-robot/hooks","issue_events_url":"https://api.github.com/repos/TeamCautionRobotics/2018-FRC-robot/issues/events{/number}","events_url":"https://api.github.com/repos/TeamCautionRobotics/2018-FRC-robot/events","assignees_url":"https://api.github.com/repos/TeamCautionRobotics/2018-FRC-robot/assignees{/user}","branches_url":"https://api.github.com/repos/TeamCautionRobotics/2018-FRC-robot/branches{/branch}","tags_url":"https://api.github.com/repos/TeamCautionRobotics/2018-FRC-robot/tags","blobs_url":"https://api.github.com/repos/TeamCautionRobotics/2018-FRC-robot/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/TeamCautionRobotics/2018-FRC-robot/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/TeamCautionRobotics/2018-FRC-robot/git/refs{/sha}","trees_url":"https://api.github.com/repos/TeamCautionRobotics/2018-FRC-robot/git/trees{/sha}","statuses_url":"https://api.github.com/repos/TeamCautionRobotics/2018-FRC-robot/statuses/{sha}","languages_url":"https://api.github.com/repos/TeamCautionRobotics/2018-FRC-robot/languages","stargazers_url":"https://api.github.com/repos/TeamCautionRobotics/2018-FRC-robot/stargazers","contributors_url":"https://api.github.com/repos/TeamCautionRobotics/2018-FRC-robot/contributors","subscribers_url":"https://api.github.com/repos/TeamCautionRobotics/2018-FRC-robot/subscribers","subscription_url":"https://api.github.com/repos/TeamCautionRobotics/2018-FRC-robot/subscription","commits_url":"https://api.github.com/repos/TeamCautionRobotics/2018-FRC-robot/commits{/sha}","git_commits_url":"https://api.github.com/repos/TeamCautionRobotics/2018-FRC-robot/git/commits{/sha}","comments_url":"https://api.github.com/repos/TeamCautionRobotics/2018-FRC-robot/comments{/number}","issue_comment_url":"https://api.github.com/repos/TeamCautionRobotics/2018-FRC-robot/issues/comments{/number}","contents_url":"https://api.github.com/repos/TeamCautionRobotics/2018-FRC-robot/contents/{+path}","compare_url":"https://api.github.com/repos/TeamCautionRobotics/2018-FRC-robot/compare/{base}...{head}","merges_url":"https://api.github.com/repos/TeamCautionRobotics/2018-FRC-robot/merges","archive_url":"https://api.github.com/repos/TeamCautionRobotics/2018-FRC-robot/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/TeamCautionRobotics/2018-FRC-robot/downloads","issues_url":"https://api.github.com/repos/TeamCautionRobotics/2018-FRC-robot/issues{/number}","pulls_url":"https://api.github.com/repos/TeamCautionRobotics/2018-FRC-robot/pulls{/number}","milestones_url":"https://api.github.com/repos/TeamCautionRobotics/2018-FRC-robot/milestones{/number}","notifications_url":"https://api.github.com/repos/TeamCautionRobotics/2018-FRC-robot/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/TeamCautionRobotics/2018-FRC-robot/labels{/name}","releases_url":"https://api.github.com/repos/TeamCautionRobotics/2018-FRC-robot/releases{/id}","deployments_url":"https://api.github.com/repos/TeamCautionRobotics/2018-FRC-robot/deployments","created_at":"2018-01-13T17:37:14Z","updated_at":"2018-01-13T17:38:25Z","pushed_at":"2018-02-14T05:59:28Z","git_url":"git://github.com/TeamCautionRobotics/2018-FRC-robot.git","ssh_url":"git@github.com:TeamCautionRobotics/2018-FRC-robot.git","clone_url":"https://github.com/TeamCautionRobotics/2018-FRC-robot.git","svn_url":"https://github.com/TeamCautionRobotics/2018-FRC-robot","homepage":null,"size":69,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":4,"license":null,"forks":0,"open_issues":4,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/TeamCautionRobotics/2018-FRC-robot/pulls/14"},"html":{"href":"https://github.com/TeamCautionRobotics/2018-FRC-robot/pull/14"},"issue":{"href":"https://api.github.com/repos/TeamCautionRobotics/2018-FRC-robot/issues/14"},"comments":{"href":"https://api.github.com/repos/TeamCautionRobotics/2018-FRC-robot/issues/14/comments"},"review_comments":{"href":"https://api.github.com/repos/TeamCautionRobotics/2018-FRC-robot/pulls/14/comments"},"review_comment":{"href":"https://api.github.com/repos/TeamCautionRobotics/2018-FRC-robot/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/TeamCautionRobotics/2018-FRC-robot/pulls/14/commits"},"statuses":{"href":"https://api.github.com/repos/TeamCautionRobotics/2018-FRC-robot/statuses/2e93d359f79842c6c795fe928a37837a617c4083"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"docprofsky"}}