{"action":"created","comment":{"url":"https://api.github.com/repos/robotpy/robotpy-rev/pulls/comments/291790565","pull_request_review_id":247350488,"id":291790565,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDI5MTc5MDU2NQ==","diff_hunk":"@@ -0,0 +1,62 @@\n+#!/usr/bin/env python3\n+# ----------------------------------------------------------------------------\n+# Copyright (c) 2017-2018 FIRST. All Rights Reserved.\n+# Open Source Software - may be modified and shared by FRC teams. The code\n+# must be accompanied by the FIRST BSD license file in the root directory of\n+# the project.\n+# ----------------------------------------------------------------------------\n+\n+import rev\n+import wpilib\n+\n+\n+class Robot(wpilib.TimedRobot):\n+    def robotInit(self):\n+        # Create motor\n+        self.motor = rev.CANSparkMax(1, rev.MotorType.kBrushless)\n+\n+        self.joystick = wpilib.Joystick(0)\n+\n+        # The restoreFactoryDefaults method can be used to reset the\n+        # configuration parameters in the SPARK MAX to their factory default\n+        # state. If no argument is passed, these parameters will not persist\n+        # between power cycles\n+        self.motor.restoreFactoryDefaults()\n+\n+        # Parameters can be set by calling the appropriate set() method on the\n+        # CANSparkMax object whose properties you want to change\n+        #\n+        # Set methods will return one of three CANError values which will let\n+        # you know if the parameter was successfully set:\n+        #   CANError.kOk\n+        #   CANError.kError\n+        #   CANError.kTimeout\n+        if self.motor.setIdleMode(rev.IdleMode.kCoast) != rev.CANError.kOK:\n+            wpilib.SmartDashboard.putString(\"Idle Mode\", \"Error\")\n+\n+        # Similarly, parameters will have a get() method which allows you to\n+        # retrieve their values from the controller\n+        if self.motor.getIdleMode() == rev.IdleMode.kCoast:","path":"examples/get-set-params/robot.py","position":39,"original_position":39,"commit_id":"e0a880639dcf80a694bdd9c89ee88f001a8519e2","original_commit_id":"e0a880639dcf80a694bdd9c89ee88f001a8519e2","user":{"login":"auscompgeek","id":128854,"node_id":"MDQ6VXNlcjEyODg1NA==","avatar_url":"https://avatars2.githubusercontent.com/u/128854?v=4","gravatar_id":"","url":"https://api.github.com/users/auscompgeek","html_url":"https://github.com/auscompgeek","followers_url":"https://api.github.com/users/auscompgeek/followers","following_url":"https://api.github.com/users/auscompgeek/following{/other_user}","gists_url":"https://api.github.com/users/auscompgeek/gists{/gist_id}","starred_url":"https://api.github.com/users/auscompgeek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/auscompgeek/subscriptions","organizations_url":"https://api.github.com/users/auscompgeek/orgs","repos_url":"https://api.github.com/users/auscompgeek/repos","events_url":"https://api.github.com/users/auscompgeek/events{/privacy}","received_events_url":"https://api.github.com/users/auscompgeek/received_events","type":"User","site_admin":false},"body":"```suggestion\r\n        if self.motor.getIdleMode() is rev.IdleMode.kCoast:\r\n```","created_at":"2019-06-08T01:54:36Z","updated_at":"2019-06-08T01:56:34Z","html_url":"https://github.com/robotpy/robotpy-rev/pull/22#discussion_r291790565","pull_request_url":"https://api.github.com/repos/robotpy/robotpy-rev/pulls/22","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/robotpy/robotpy-rev/pulls/comments/291790565"},"html":{"href":"https://github.com/robotpy/robotpy-rev/pull/22#discussion_r291790565"},"pull_request":{"href":"https://api.github.com/repos/robotpy/robotpy-rev/pulls/22"}}},"pull_request":{"url":"https://api.github.com/repos/robotpy/robotpy-rev/pulls/22","id":286363631,"node_id":"MDExOlB1bGxSZXF1ZXN0Mjg2MzYzNjMx","html_url":"https://github.com/robotpy/robotpy-rev/pull/22","diff_url":"https://github.com/robotpy/robotpy-rev/pull/22.diff","patch_url":"https://github.com/robotpy/robotpy-rev/pull/22.patch","issue_url":"https://api.github.com/repos/robotpy/robotpy-rev/issues/22","number":22,"state":"open","locked":false,"title":"Add non-PWM examples","user":{"login":"Tyler-Duckworth","id":25271900,"node_id":"MDQ6VXNlcjI1MjcxOTAw","avatar_url":"https://avatars0.githubusercontent.com/u/25271900?v=4","gravatar_id":"","url":"https://api.github.com/users/Tyler-Duckworth","html_url":"https://github.com/Tyler-Duckworth","followers_url":"https://api.github.com/users/Tyler-Duckworth/followers","following_url":"https://api.github.com/users/Tyler-Duckworth/following{/other_user}","gists_url":"https://api.github.com/users/Tyler-Duckworth/gists{/gist_id}","starred_url":"https://api.github.com/users/Tyler-Duckworth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Tyler-Duckworth/subscriptions","organizations_url":"https://api.github.com/users/Tyler-Duckworth/orgs","repos_url":"https://api.github.com/users/Tyler-Duckworth/repos","events_url":"https://api.github.com/users/Tyler-Duckworth/events{/privacy}","received_events_url":"https://api.github.com/users/Tyler-Duckworth/received_events","type":"User","site_admin":false},"body":"Somewhat fixes Issue #9 \r\nI adapted all of the REV examples with the exception of one, the PWM Arcade Drive since there is not a PWM SparkMax object. \r\n\r\nI would note, I did get a lot of errors, but I think that is because the API is incomplete. ","created_at":"2019-06-08T00:00:25Z","updated_at":"2019-06-08T01:56:34Z","closed_at":null,"merged_at":null,"merge_commit_sha":"cd10adaa31088dd2e81f5e3337e66071651052be","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/robotpy/robotpy-rev/pulls/22/commits","review_comments_url":"https://api.github.com/repos/robotpy/robotpy-rev/pulls/22/comments","review_comment_url":"https://api.github.com/repos/robotpy/robotpy-rev/pulls/comments{/number}","comments_url":"https://api.github.com/repos/robotpy/robotpy-rev/issues/22/comments","statuses_url":"https://api.github.com/repos/robotpy/robotpy-rev/statuses/e0a880639dcf80a694bdd9c89ee88f001a8519e2","head":{"label":"Tyler-Duckworth:master","ref":"master","sha":"e0a880639dcf80a694bdd9c89ee88f001a8519e2","user":{"login":"Tyler-Duckworth","id":25271900,"node_id":"MDQ6VXNlcjI1MjcxOTAw","avatar_url":"https://avatars0.githubusercontent.com/u/25271900?v=4","gravatar_id":"","url":"https://api.github.com/users/Tyler-Duckworth","html_url":"https://github.com/Tyler-Duckworth","followers_url":"https://api.github.com/users/Tyler-Duckworth/followers","following_url":"https://api.github.com/users/Tyler-Duckworth/following{/other_user}","gists_url":"https://api.github.com/users/Tyler-Duckworth/gists{/gist_id}","starred_url":"https://api.github.com/users/Tyler-Duckworth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Tyler-Duckworth/subscriptions","organizations_url":"https://api.github.com/users/Tyler-Duckworth/orgs","repos_url":"https://api.github.com/users/Tyler-Duckworth/repos","events_url":"https://api.github.com/users/Tyler-Duckworth/events{/privacy}","received_events_url":"https://api.github.com/users/Tyler-Duckworth/received_events","type":"User","site_admin":false},"repo":{"id":190821733,"node_id":"MDEwOlJlcG9zaXRvcnkxOTA4MjE3MzM=","name":"robotpy-rev","full_name":"Tyler-Duckworth/robotpy-rev","private":false,"owner":{"login":"Tyler-Duckworth","id":25271900,"node_id":"MDQ6VXNlcjI1MjcxOTAw","avatar_url":"https://avatars0.githubusercontent.com/u/25271900?v=4","gravatar_id":"","url":"https://api.github.com/users/Tyler-Duckworth","html_url":"https://github.com/Tyler-Duckworth","followers_url":"https://api.github.com/users/Tyler-Duckworth/followers","following_url":"https://api.github.com/users/Tyler-Duckworth/following{/other_user}","gists_url":"https://api.github.com/users/Tyler-Duckworth/gists{/gist_id}","starred_url":"https://api.github.com/users/Tyler-Duckworth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Tyler-Duckworth/subscriptions","organizations_url":"https://api.github.com/users/Tyler-Duckworth/orgs","repos_url":"https://api.github.com/users/Tyler-Duckworth/repos","events_url":"https://api.github.com/users/Tyler-Duckworth/events{/privacy}","received_events_url":"https://api.github.com/users/Tyler-Duckworth/received_events","type":"User","site_admin":false},"html_url":"https://github.com/Tyler-Duckworth/robotpy-rev","description":"RobotPy bindings for the REV Robotics SPARK MAX","fork":true,"url":"https://api.github.com/repos/Tyler-Duckworth/robotpy-rev","forks_url":"https://api.github.com/repos/Tyler-Duckworth/robotpy-rev/forks","keys_url":"https://api.github.com/repos/Tyler-Duckworth/robotpy-rev/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Tyler-Duckworth/robotpy-rev/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Tyler-Duckworth/robotpy-rev/teams","hooks_url":"https://api.github.com/repos/Tyler-Duckworth/robotpy-rev/hooks","issue_events_url":"https://api.github.com/repos/Tyler-Duckworth/robotpy-rev/issues/events{/number}","events_url":"https://api.github.com/repos/Tyler-Duckworth/robotpy-rev/events","assignees_url":"https://api.github.com/repos/Tyler-Duckworth/robotpy-rev/assignees{/user}","branches_url":"https://api.github.com/repos/Tyler-Duckworth/robotpy-rev/branches{/branch}","tags_url":"https://api.github.com/repos/Tyler-Duckworth/robotpy-rev/tags","blobs_url":"https://api.github.com/repos/Tyler-Duckworth/robotpy-rev/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Tyler-Duckworth/robotpy-rev/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Tyler-Duckworth/robotpy-rev/git/refs{/sha}","trees_url":"https://api.github.com/repos/Tyler-Duckworth/robotpy-rev/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Tyler-Duckworth/robotpy-rev/statuses/{sha}","languages_url":"https://api.github.com/repos/Tyler-Duckworth/robotpy-rev/languages","stargazers_url":"https://api.github.com/repos/Tyler-Duckworth/robotpy-rev/stargazers","contributors_url":"https://api.github.com/repos/Tyler-Duckworth/robotpy-rev/contributors","subscribers_url":"https://api.github.com/repos/Tyler-Duckworth/robotpy-rev/subscribers","subscription_url":"https://api.github.com/repos/Tyler-Duckworth/robotpy-rev/subscription","commits_url":"https://api.github.com/repos/Tyler-Duckworth/robotpy-rev/commits{/sha}","git_commits_url":"https://api.github.com/repos/Tyler-Duckworth/robotpy-rev/git/commits{/sha}","comments_url":"https://api.github.com/repos/Tyler-Duckworth/robotpy-rev/comments{/number}","issue_comment_url":"https://api.github.com/repos/Tyler-Duckworth/robotpy-rev/issues/comments{/number}","contents_url":"https://api.github.com/repos/Tyler-Duckworth/robotpy-rev/contents/{+path}","compare_url":"https://api.github.com/repos/Tyler-Duckworth/robotpy-rev/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Tyler-Duckworth/robotpy-rev/merges","archive_url":"https://api.github.com/repos/Tyler-Duckworth/robotpy-rev/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Tyler-Duckworth/robotpy-rev/downloads","issues_url":"https://api.github.com/repos/Tyler-Duckworth/robotpy-rev/issues{/number}","pulls_url":"https://api.github.com/repos/Tyler-Duckworth/robotpy-rev/pulls{/number}","milestones_url":"https://api.github.com/repos/Tyler-Duckworth/robotpy-rev/milestones{/number}","notifications_url":"https://api.github.com/repos/Tyler-Duckworth/robotpy-rev/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Tyler-Duckworth/robotpy-rev/labels{/name}","releases_url":"https://api.github.com/repos/Tyler-Duckworth/robotpy-rev/releases{/id}","deployments_url":"https://api.github.com/repos/Tyler-Duckworth/robotpy-rev/deployments","created_at":"2019-06-07T23:05:36Z","updated_at":"2019-06-08T00:06:13Z","pushed_at":"2019-06-08T00:06:11Z","git_url":"git://github.com/Tyler-Duckworth/robotpy-rev.git","ssh_url":"git@github.com:Tyler-Duckworth/robotpy-rev.git","clone_url":"https://github.com/Tyler-Duckworth/robotpy-rev.git","svn_url":"https://github.com/Tyler-Duckworth/robotpy-rev","homepage":null,"size":125,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":0,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"robotpy:master","ref":"master","sha":"fff4ae4ad6eacd6320e7058fbdde27f6569cfd9b","user":{"login":"robotpy","id":640276,"node_id":"MDEyOk9yZ2FuaXphdGlvbjY0MDI3Ng==","avatar_url":"https://avatars1.githubusercontent.com/u/640276?v=4","gravatar_id":"","url":"https://api.github.com/users/robotpy","html_url":"https://github.com/robotpy","followers_url":"https://api.github.com/users/robotpy/followers","following_url":"https://api.github.com/users/robotpy/following{/other_user}","gists_url":"https://api.github.com/users/robotpy/gists{/gist_id}","starred_url":"https://api.github.com/users/robotpy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robotpy/subscriptions","organizations_url":"https://api.github.com/users/robotpy/orgs","repos_url":"https://api.github.com/users/robotpy/repos","events_url":"https://api.github.com/users/robotpy/events{/privacy}","received_events_url":"https://api.github.com/users/robotpy/received_events","type":"Organization","site_admin":false},"repo":{"id":164812499,"node_id":"MDEwOlJlcG9zaXRvcnkxNjQ4MTI0OTk=","name":"robotpy-rev","full_name":"robotpy/robotpy-rev","private":false,"owner":{"login":"robotpy","id":640276,"node_id":"MDEyOk9yZ2FuaXphdGlvbjY0MDI3Ng==","avatar_url":"https://avatars1.githubusercontent.com/u/640276?v=4","gravatar_id":"","url":"https://api.github.com/users/robotpy","html_url":"https://github.com/robotpy","followers_url":"https://api.github.com/users/robotpy/followers","following_url":"https://api.github.com/users/robotpy/following{/other_user}","gists_url":"https://api.github.com/users/robotpy/gists{/gist_id}","starred_url":"https://api.github.com/users/robotpy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robotpy/subscriptions","organizations_url":"https://api.github.com/users/robotpy/orgs","repos_url":"https://api.github.com/users/robotpy/repos","events_url":"https://api.github.com/users/robotpy/events{/privacy}","received_events_url":"https://api.github.com/users/robotpy/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/robotpy/robotpy-rev","description":"RobotPy bindings for the REV Robotics SPARK MAX","fork":false,"url":"https://api.github.com/repos/robotpy/robotpy-rev","forks_url":"https://api.github.com/repos/robotpy/robotpy-rev/forks","keys_url":"https://api.github.com/repos/robotpy/robotpy-rev/keys{/key_id}","collaborators_url":"https://api.github.com/repos/robotpy/robotpy-rev/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/robotpy/robotpy-rev/teams","hooks_url":"https://api.github.com/repos/robotpy/robotpy-rev/hooks","issue_events_url":"https://api.github.com/repos/robotpy/robotpy-rev/issues/events{/number}","events_url":"https://api.github.com/repos/robotpy/robotpy-rev/events","assignees_url":"https://api.github.com/repos/robotpy/robotpy-rev/assignees{/user}","branches_url":"https://api.github.com/repos/robotpy/robotpy-rev/branches{/branch}","tags_url":"https://api.github.com/repos/robotpy/robotpy-rev/tags","blobs_url":"https://api.github.com/repos/robotpy/robotpy-rev/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/robotpy/robotpy-rev/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/robotpy/robotpy-rev/git/refs{/sha}","trees_url":"https://api.github.com/repos/robotpy/robotpy-rev/git/trees{/sha}","statuses_url":"https://api.github.com/repos/robotpy/robotpy-rev/statuses/{sha}","languages_url":"https://api.github.com/repos/robotpy/robotpy-rev/languages","stargazers_url":"https://api.github.com/repos/robotpy/robotpy-rev/stargazers","contributors_url":"https://api.github.com/repos/robotpy/robotpy-rev/contributors","subscribers_url":"https://api.github.com/repos/robotpy/robotpy-rev/subscribers","subscription_url":"https://api.github.com/repos/robotpy/robotpy-rev/subscription","commits_url":"https://api.github.com/repos/robotpy/robotpy-rev/commits{/sha}","git_commits_url":"https://api.github.com/repos/robotpy/robotpy-rev/git/commits{/sha}","comments_url":"https://api.github.com/repos/robotpy/robotpy-rev/comments{/number}","issue_comment_url":"https://api.github.com/repos/robotpy/robotpy-rev/issues/comments{/number}","contents_url":"https://api.github.com/repos/robotpy/robotpy-rev/contents/{+path}","compare_url":"https://api.github.com/repos/robotpy/robotpy-rev/compare/{base}...{head}","merges_url":"https://api.github.com/repos/robotpy/robotpy-rev/merges","archive_url":"https://api.github.com/repos/robotpy/robotpy-rev/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/robotpy/robotpy-rev/downloads","issues_url":"https://api.github.com/repos/robotpy/robotpy-rev/issues{/number}","pulls_url":"https://api.github.com/repos/robotpy/robotpy-rev/pulls{/number}","milestones_url":"https://api.github.com/repos/robotpy/robotpy-rev/milestones{/number}","notifications_url":"https://api.github.com/repos/robotpy/robotpy-rev/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/robotpy/robotpy-rev/labels{/name}","releases_url":"https://api.github.com/repos/robotpy/robotpy-rev/releases{/id}","deployments_url":"https://api.github.com/repos/robotpy/robotpy-rev/deployments","created_at":"2019-01-09T07:34:12Z","updated_at":"2019-05-10T03:39:39Z","pushed_at":"2019-06-08T00:06:12Z","git_url":"git://github.com/robotpy/robotpy-rev.git","ssh_url":"git@github.com:robotpy/robotpy-rev.git","clone_url":"https://github.com/robotpy/robotpy-rev.git","svn_url":"https://github.com/robotpy/robotpy-rev","homepage":null,"size":116,"stargazers_count":1,"watchers_count":1,"language":"C++","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":3,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":2,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":3,"open_issues":2,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/robotpy/robotpy-rev/pulls/22"},"html":{"href":"https://github.com/robotpy/robotpy-rev/pull/22"},"issue":{"href":"https://api.github.com/repos/robotpy/robotpy-rev/issues/22"},"comments":{"href":"https://api.github.com/repos/robotpy/robotpy-rev/issues/22/comments"},"review_comments":{"href":"https://api.github.com/repos/robotpy/robotpy-rev/pulls/22/comments"},"review_comment":{"href":"https://api.github.com/repos/robotpy/robotpy-rev/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/robotpy/robotpy-rev/pulls/22/commits"},"statuses":{"href":"https://api.github.com/repos/robotpy/robotpy-rev/statuses/e0a880639dcf80a694bdd9c89ee88f001a8519e2"}},"author_association":"NONE"}}
{"actor":{"display_login":"auscompgeek"}}