{"action":"created","comment":{"url":"https://api.github.com/repos/rhempel/ev3dev-lang-python/pulls/comments/141766119","pull_request_review_id":66033069,"id":141766119,"diff_hunk":"@@ -0,0 +1,128 @@\n+\n+\"\"\"\n+An assortment of classes modeling specific features of the EVB brick.\n+\"\"\"\n+\n+from .core import *\n+\n+\n+OUTPUT_A = 'outA'\n+OUTPUT_B = 'outB'\n+OUTPUT_C = 'outC'\n+OUTPUT_D = 'outD'\n+\n+INPUT_1 = 'in1'\n+INPUT_2 = 'in2'\n+INPUT_3 = 'in3'\n+INPUT_4 = 'in4'\n+\n+\n+class Button(ButtonEVIO):\n+    \"\"\"\n+    EVB Buttons\n+    \"\"\"\n+\n+    _buttons = {\n+            'up': {'name': '/dev/input/by-path/platform-evb-buttons-event', 'value': 103},\n+            'down': {'name': '/dev/input/by-path/platform-evb-buttons-event', 'value': 108},\n+            'left': {'name': '/dev/input/by-path/platform-evb-buttons-event', 'value': 105},\n+            'right': {'name': '/dev/input/by-path/platform-evb-buttons-event', 'value': 106},\n+            'enter': {'name': '/dev/input/by-path/platform-evb-buttons-event', 'value': 28},\n+            'backspace': {'name': '/dev/input/by-path/platform-evb-buttons-event', 'value': 14},\n+        }\n+\n+    @property\n+    @staticmethod\n+    def on_up(state):\n+        \"\"\"\n+        This handler is called by `process()` whenever state of 'up' button\n+        has changed since last `process()` call. `state` parameter is the new\n+        state of the button.\n+        \"\"\"\n+        pass\n+\n+    @staticmethod\n+    def on_down(state):\n+        \"\"\"\n+        This handler is called by `process()` whenever state of 'down' button\n+        has changed since last `process()` call. `state` parameter is the new\n+        state of the button.\n+        \"\"\"\n+        pass\n+\n+    @staticmethod\n+    def on_left(state):\n+        \"\"\"\n+        This handler is called by `process()` whenever state of 'left' button\n+        has changed since last `process()` call. `state` parameter is the new\n+        state of the button.\n+        \"\"\"\n+        pass\n+\n+    @staticmethod\n+    def on_right(state):\n+        \"\"\"\n+        This handler is called by `process()` whenever state of 'right' button\n+        has changed since last `process()` call. `state` parameter is the new\n+        state of the button.\n+        \"\"\"\n+        pass\n+\n+    @staticmethod\n+    def on_enter(state):\n+        \"\"\"\n+        This handler is called by `process()` whenever state of 'enter' button","path":"ev3dev/evb.py","position":74,"original_position":74,"commit_id":"7451e0dda3c46e7d15e06791246572d700deadc2","original_commit_id":"59902868959386131b5b6eaa45c055814e13fe8b","user":{"login":"WasabiFan","id":3310349,"avatar_url":"https://avatars0.githubusercontent.com/u/3310349?v=4","gravatar_id":"","url":"https://api.github.com/users/WasabiFan","html_url":"https://github.com/WasabiFan","followers_url":"https://api.github.com/users/WasabiFan/followers","following_url":"https://api.github.com/users/WasabiFan/following{/other_user}","gists_url":"https://api.github.com/users/WasabiFan/gists{/gist_id}","starred_url":"https://api.github.com/users/WasabiFan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WasabiFan/subscriptions","organizations_url":"https://api.github.com/users/WasabiFan/orgs","repos_url":"https://api.github.com/users/WasabiFan/repos","events_url":"https://api.github.com/users/WasabiFan/events{/privacy}","received_events_url":"https://api.github.com/users/WasabiFan/received_events","type":"User","site_admin":false},"body":"Oh, I see. Damn, Python is weird :laughing: Is that a common idiom? Is there not an event framework of some sort?\r\n\r\nEither way, I don't think it's blocking.","created_at":"2017-09-29T00:20:49Z","updated_at":"2017-09-29T00:20:49Z","html_url":"https://github.com/rhempel/ev3dev-lang-python/pull/383#discussion_r141766119","pull_request_url":"https://api.github.com/repos/rhempel/ev3dev-lang-python/pulls/383","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/rhempel/ev3dev-lang-python/pulls/comments/141766119"},"html":{"href":"https://github.com/rhempel/ev3dev-lang-python/pull/383#discussion_r141766119"},"pull_request":{"href":"https://api.github.com/repos/rhempel/ev3dev-lang-python/pulls/383"}},"in_reply_to_id":141762194},"pull_request":{"url":"https://api.github.com/repos/rhempel/ev3dev-lang-python/pulls/383","id":143619367,"html_url":"https://github.com/rhempel/ev3dev-lang-python/pull/383","diff_url":"https://github.com/rhempel/ev3dev-lang-python/pull/383.diff","patch_url":"https://github.com/rhempel/ev3dev-lang-python/pull/383.patch","issue_url":"https://api.github.com/repos/rhempel/ev3dev-lang-python/issues/383","number":383,"state":"open","locked":false,"title":"Use /sys/class/board-info/ to detect platform type","user":{"login":"dwalton76","id":468309,"avatar_url":"https://avatars2.githubusercontent.com/u/468309?v=4","gravatar_id":"","url":"https://api.github.com/users/dwalton76","html_url":"https://github.com/dwalton76","followers_url":"https://api.github.com/users/dwalton76/followers","following_url":"https://api.github.com/users/dwalton76/following{/other_user}","gists_url":"https://api.github.com/users/dwalton76/gists{/gist_id}","starred_url":"https://api.github.com/users/dwalton76/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dwalton76/subscriptions","organizations_url":"https://api.github.com/users/dwalton76/orgs","repos_url":"https://api.github.com/users/dwalton76/repos","events_url":"https://api.github.com/users/dwalton76/events{/privacy}","received_events_url":"https://api.github.com/users/dwalton76/received_events","type":"User","site_admin":false},"body":"","created_at":"2017-09-28T11:10:40Z","updated_at":"2017-09-29T00:20:49Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0080795d9dd6d3461b6c5779c480aca68ed661f2","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/rhempel/ev3dev-lang-python/pulls/383/commits","review_comments_url":"https://api.github.com/repos/rhempel/ev3dev-lang-python/pulls/383/comments","review_comment_url":"https://api.github.com/repos/rhempel/ev3dev-lang-python/pulls/comments{/number}","comments_url":"https://api.github.com/repos/rhempel/ev3dev-lang-python/issues/383/comments","statuses_url":"https://api.github.com/repos/rhempel/ev3dev-lang-python/statuses/7451e0dda3c46e7d15e06791246572d700deadc2","head":{"label":"dwalton76:auto-platform-detect","ref":"auto-platform-detect","sha":"7451e0dda3c46e7d15e06791246572d700deadc2","user":{"login":"dwalton76","id":468309,"avatar_url":"https://avatars2.githubusercontent.com/u/468309?v=4","gravatar_id":"","url":"https://api.github.com/users/dwalton76","html_url":"https://github.com/dwalton76","followers_url":"https://api.github.com/users/dwalton76/followers","following_url":"https://api.github.com/users/dwalton76/following{/other_user}","gists_url":"https://api.github.com/users/dwalton76/gists{/gist_id}","starred_url":"https://api.github.com/users/dwalton76/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dwalton76/subscriptions","organizations_url":"https://api.github.com/users/dwalton76/orgs","repos_url":"https://api.github.com/users/dwalton76/repos","events_url":"https://api.github.com/users/dwalton76/events{/privacy}","received_events_url":"https://api.github.com/users/dwalton76/received_events","type":"User","site_admin":false},"repo":{"id":80080263,"name":"ev3dev-lang-python","full_name":"dwalton76/ev3dev-lang-python","owner":{"login":"dwalton76","id":468309,"avatar_url":"https://avatars2.githubusercontent.com/u/468309?v=4","gravatar_id":"","url":"https://api.github.com/users/dwalton76","html_url":"https://github.com/dwalton76","followers_url":"https://api.github.com/users/dwalton76/followers","following_url":"https://api.github.com/users/dwalton76/following{/other_user}","gists_url":"https://api.github.com/users/dwalton76/gists{/gist_id}","starred_url":"https://api.github.com/users/dwalton76/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dwalton76/subscriptions","organizations_url":"https://api.github.com/users/dwalton76/orgs","repos_url":"https://api.github.com/users/dwalton76/repos","events_url":"https://api.github.com/users/dwalton76/events{/privacy}","received_events_url":"https://api.github.com/users/dwalton76/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/dwalton76/ev3dev-lang-python","description":"Pure python bindings for ev3dev","fork":true,"url":"https://api.github.com/repos/dwalton76/ev3dev-lang-python","forks_url":"https://api.github.com/repos/dwalton76/ev3dev-lang-python/forks","keys_url":"https://api.github.com/repos/dwalton76/ev3dev-lang-python/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dwalton76/ev3dev-lang-python/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dwalton76/ev3dev-lang-python/teams","hooks_url":"https://api.github.com/repos/dwalton76/ev3dev-lang-python/hooks","issue_events_url":"https://api.github.com/repos/dwalton76/ev3dev-lang-python/issues/events{/number}","events_url":"https://api.github.com/repos/dwalton76/ev3dev-lang-python/events","assignees_url":"https://api.github.com/repos/dwalton76/ev3dev-lang-python/assignees{/user}","branches_url":"https://api.github.com/repos/dwalton76/ev3dev-lang-python/branches{/branch}","tags_url":"https://api.github.com/repos/dwalton76/ev3dev-lang-python/tags","blobs_url":"https://api.github.com/repos/dwalton76/ev3dev-lang-python/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dwalton76/ev3dev-lang-python/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dwalton76/ev3dev-lang-python/git/refs{/sha}","trees_url":"https://api.github.com/repos/dwalton76/ev3dev-lang-python/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dwalton76/ev3dev-lang-python/statuses/{sha}","languages_url":"https://api.github.com/repos/dwalton76/ev3dev-lang-python/languages","stargazers_url":"https://api.github.com/repos/dwalton76/ev3dev-lang-python/stargazers","contributors_url":"https://api.github.com/repos/dwalton76/ev3dev-lang-python/contributors","subscribers_url":"https://api.github.com/repos/dwalton76/ev3dev-lang-python/subscribers","subscription_url":"https://api.github.com/repos/dwalton76/ev3dev-lang-python/subscription","commits_url":"https://api.github.com/repos/dwalton76/ev3dev-lang-python/commits{/sha}","git_commits_url":"https://api.github.com/repos/dwalton76/ev3dev-lang-python/git/commits{/sha}","comments_url":"https://api.github.com/repos/dwalton76/ev3dev-lang-python/comments{/number}","issue_comment_url":"https://api.github.com/repos/dwalton76/ev3dev-lang-python/issues/comments{/number}","contents_url":"https://api.github.com/repos/dwalton76/ev3dev-lang-python/contents/{+path}","compare_url":"https://api.github.com/repos/dwalton76/ev3dev-lang-python/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dwalton76/ev3dev-lang-python/merges","archive_url":"https://api.github.com/repos/dwalton76/ev3dev-lang-python/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dwalton76/ev3dev-lang-python/downloads","issues_url":"https://api.github.com/repos/dwalton76/ev3dev-lang-python/issues{/number}","pulls_url":"https://api.github.com/repos/dwalton76/ev3dev-lang-python/pulls{/number}","milestones_url":"https://api.github.com/repos/dwalton76/ev3dev-lang-python/milestones{/number}","notifications_url":"https://api.github.com/repos/dwalton76/ev3dev-lang-python/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dwalton76/ev3dev-lang-python/labels{/name}","releases_url":"https://api.github.com/repos/dwalton76/ev3dev-lang-python/releases{/id}","deployments_url":"https://api.github.com/repos/dwalton76/ev3dev-lang-python/deployments","created_at":"2017-01-26T02:44:28Z","updated_at":"2017-01-26T02:44:30Z","pushed_at":"2017-09-29T00:06:30Z","git_url":"git://github.com/dwalton76/ev3dev-lang-python.git","ssh_url":"git@github.com:dwalton76/ev3dev-lang-python.git","clone_url":"https://github.com/dwalton76/ev3dev-lang-python.git","svn_url":"https://github.com/dwalton76/ev3dev-lang-python","homepage":null,"size":9496,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"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":"develop"}},"base":{"label":"rhempel:develop","ref":"develop","sha":"28b97f49b51d2f3ea22c354f51405dc8481cd451","user":{"login":"rhempel","id":5571620,"avatar_url":"https://avatars3.githubusercontent.com/u/5571620?v=4","gravatar_id":"","url":"https://api.github.com/users/rhempel","html_url":"https://github.com/rhempel","followers_url":"https://api.github.com/users/rhempel/followers","following_url":"https://api.github.com/users/rhempel/following{/other_user}","gists_url":"https://api.github.com/users/rhempel/gists{/gist_id}","starred_url":"https://api.github.com/users/rhempel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rhempel/subscriptions","organizations_url":"https://api.github.com/users/rhempel/orgs","repos_url":"https://api.github.com/users/rhempel/repos","events_url":"https://api.github.com/users/rhempel/events{/privacy}","received_events_url":"https://api.github.com/users/rhempel/received_events","type":"User","site_admin":false},"repo":{"id":43603757,"name":"ev3dev-lang-python","full_name":"rhempel/ev3dev-lang-python","owner":{"login":"rhempel","id":5571620,"avatar_url":"https://avatars3.githubusercontent.com/u/5571620?v=4","gravatar_id":"","url":"https://api.github.com/users/rhempel","html_url":"https://github.com/rhempel","followers_url":"https://api.github.com/users/rhempel/followers","following_url":"https://api.github.com/users/rhempel/following{/other_user}","gists_url":"https://api.github.com/users/rhempel/gists{/gist_id}","starred_url":"https://api.github.com/users/rhempel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rhempel/subscriptions","organizations_url":"https://api.github.com/users/rhempel/orgs","repos_url":"https://api.github.com/users/rhempel/repos","events_url":"https://api.github.com/users/rhempel/events{/privacy}","received_events_url":"https://api.github.com/users/rhempel/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/rhempel/ev3dev-lang-python","description":"Pure python bindings for ev3dev","fork":false,"url":"https://api.github.com/repos/rhempel/ev3dev-lang-python","forks_url":"https://api.github.com/repos/rhempel/ev3dev-lang-python/forks","keys_url":"https://api.github.com/repos/rhempel/ev3dev-lang-python/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rhempel/ev3dev-lang-python/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rhempel/ev3dev-lang-python/teams","hooks_url":"https://api.github.com/repos/rhempel/ev3dev-lang-python/hooks","issue_events_url":"https://api.github.com/repos/rhempel/ev3dev-lang-python/issues/events{/number}","events_url":"https://api.github.com/repos/rhempel/ev3dev-lang-python/events","assignees_url":"https://api.github.com/repos/rhempel/ev3dev-lang-python/assignees{/user}","branches_url":"https://api.github.com/repos/rhempel/ev3dev-lang-python/branches{/branch}","tags_url":"https://api.github.com/repos/rhempel/ev3dev-lang-python/tags","blobs_url":"https://api.github.com/repos/rhempel/ev3dev-lang-python/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rhempel/ev3dev-lang-python/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rhempel/ev3dev-lang-python/git/refs{/sha}","trees_url":"https://api.github.com/repos/rhempel/ev3dev-lang-python/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rhempel/ev3dev-lang-python/statuses/{sha}","languages_url":"https://api.github.com/repos/rhempel/ev3dev-lang-python/languages","stargazers_url":"https://api.github.com/repos/rhempel/ev3dev-lang-python/stargazers","contributors_url":"https://api.github.com/repos/rhempel/ev3dev-lang-python/contributors","subscribers_url":"https://api.github.com/repos/rhempel/ev3dev-lang-python/subscribers","subscription_url":"https://api.github.com/repos/rhempel/ev3dev-lang-python/subscription","commits_url":"https://api.github.com/repos/rhempel/ev3dev-lang-python/commits{/sha}","git_commits_url":"https://api.github.com/repos/rhempel/ev3dev-lang-python/git/commits{/sha}","comments_url":"https://api.github.com/repos/rhempel/ev3dev-lang-python/comments{/number}","issue_comment_url":"https://api.github.com/repos/rhempel/ev3dev-lang-python/issues/comments{/number}","contents_url":"https://api.github.com/repos/rhempel/ev3dev-lang-python/contents/{+path}","compare_url":"https://api.github.com/repos/rhempel/ev3dev-lang-python/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rhempel/ev3dev-lang-python/merges","archive_url":"https://api.github.com/repos/rhempel/ev3dev-lang-python/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rhempel/ev3dev-lang-python/downloads","issues_url":"https://api.github.com/repos/rhempel/ev3dev-lang-python/issues{/number}","pulls_url":"https://api.github.com/repos/rhempel/ev3dev-lang-python/pulls{/number}","milestones_url":"https://api.github.com/repos/rhempel/ev3dev-lang-python/milestones{/number}","notifications_url":"https://api.github.com/repos/rhempel/ev3dev-lang-python/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rhempel/ev3dev-lang-python/labels{/name}","releases_url":"https://api.github.com/repos/rhempel/ev3dev-lang-python/releases{/id}","deployments_url":"https://api.github.com/repos/rhempel/ev3dev-lang-python/deployments","created_at":"2015-10-03T15:32:20Z","updated_at":"2017-09-28T18:19:45Z","pushed_at":"2017-09-29T00:00:01Z","git_url":"git://github.com/rhempel/ev3dev-lang-python.git","ssh_url":"git@github.com:rhempel/ev3dev-lang-python.git","clone_url":"https://github.com/rhempel/ev3dev-lang-python.git","svn_url":"https://github.com/rhempel/ev3dev-lang-python","homepage":null,"size":9581,"stargazers_count":115,"watchers_count":115,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":54,"mirror_url":null,"open_issues_count":25,"forks":54,"open_issues":25,"watchers":115,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/rhempel/ev3dev-lang-python/pulls/383"},"html":{"href":"https://github.com/rhempel/ev3dev-lang-python/pull/383"},"issue":{"href":"https://api.github.com/repos/rhempel/ev3dev-lang-python/issues/383"},"comments":{"href":"https://api.github.com/repos/rhempel/ev3dev-lang-python/issues/383/comments"},"review_comments":{"href":"https://api.github.com/repos/rhempel/ev3dev-lang-python/pulls/383/comments"},"review_comment":{"href":"https://api.github.com/repos/rhempel/ev3dev-lang-python/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/rhempel/ev3dev-lang-python/pulls/383/commits"},"statuses":{"href":"https://api.github.com/repos/rhempel/ev3dev-lang-python/statuses/7451e0dda3c46e7d15e06791246572d700deadc2"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"WasabiFan"}}