{"action":"created","comment":{"url":"https://api.github.com/repos/01org/zephyr.js/pulls/comments/86296284","pull_request_review_id":6960115,"id":86296284,"diff_hunk":"@@ -0,0 +1,512 @@\n+// Copyright (c) 2016, Intel Corporation.\n+#ifdef BUILD_MODULE_SENSOR\n+#ifndef QEMU_BUILD\n+#ifndef ZJS_LINUX_BUILD\n+// Zephyr includes\n+#include <zephyr.h>\n+#endif\n+\n+#include <string.h>\n+\n+// ZJS includes\n+#include \"zjs_sensor.h\"\n+#include \"zjs_callbacks.h\"\n+#include \"zjs_ipm.h\"\n+#include \"zjs_util.h\"\n+\n+#define ZJS_SENSOR_TIMEOUT_TICKS                      500\n+\n+static struct nano_sem sensor_sem;\n+\n+enum sensor_state {","path":"src/zjs_sensor.c","position":21,"original_position":21,"commit_id":"294d36b85640c752a6840df72dbe3073278b9aa7","original_commit_id":"294d36b85640c752a6840df72dbe3073278b9aa7","user":{"login":"kenchris","id":1101339,"avatar_url":"https://avatars.githubusercontent.com/u/1101339?v=3","gravatar_id":"","url":"https://api.github.com/users/kenchris","html_url":"https://github.com/kenchris","followers_url":"https://api.github.com/users/kenchris/followers","following_url":"https://api.github.com/users/kenchris/following{/other_user}","gists_url":"https://api.github.com/users/kenchris/gists{/gist_id}","starred_url":"https://api.github.com/users/kenchris/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kenchris/subscriptions","organizations_url":"https://api.github.com/users/kenchris/orgs","repos_url":"https://api.github.com/users/kenchris/repos","events_url":"https://api.github.com/users/kenchris/events{/privacy}","received_events_url":"https://api.github.com/users/kenchris/received_events","type":"User","site_admin":false},"body":"We discussed these changes back in the W3C TPAC meeting in Lisbon and they are slowly making it into the spec","created_at":"2016-11-03T07:53:23Z","updated_at":"2016-11-03T07:53:23Z","html_url":"https://github.com/01org/zephyr.js/pull/353#discussion_r86296284","pull_request_url":"https://api.github.com/repos/01org/zephyr.js/pulls/353","_links":{"self":{"href":"https://api.github.com/repos/01org/zephyr.js/pulls/comments/86296284"},"html":{"href":"https://github.com/01org/zephyr.js/pull/353#discussion_r86296284"},"pull_request":{"href":"https://api.github.com/repos/01org/zephyr.js/pulls/353"}}},"pull_request":{"url":"https://api.github.com/repos/01org/zephyr.js/pulls/353","id":92053348,"html_url":"https://github.com/01org/zephyr.js/pull/353","diff_url":"https://github.com/01org/zephyr.js/pull/353.diff","patch_url":"https://github.com/01org/zephyr.js/pull/353.patch","issue_url":"https://api.github.com/repos/01org/zephyr.js/issues/353","number":353,"state":"open","locked":false,"title":"[Sensor] Initial implementation of the Generic Sensor API","user":{"login":"jimmy-huang","id":1037247,"avatar_url":"https://avatars.githubusercontent.com/u/1037247?v=3","gravatar_id":"","url":"https://api.github.com/users/jimmy-huang","html_url":"https://github.com/jimmy-huang","followers_url":"https://api.github.com/users/jimmy-huang/followers","following_url":"https://api.github.com/users/jimmy-huang/following{/other_user}","gists_url":"https://api.github.com/users/jimmy-huang/gists{/gist_id}","starred_url":"https://api.github.com/users/jimmy-huang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jimmy-huang/subscriptions","organizations_url":"https://api.github.com/users/jimmy-huang/orgs","repos_url":"https://api.github.com/users/jimmy-huang/repos","events_url":"https://api.github.com/users/jimmy-huang/events{/privacy}","received_events_url":"https://api.github.com/users/jimmy-huang/received_events","type":"User","site_admin":false},"body":"Initial implementation for the W3C Generic Sensor API and add\r\nsupport for the Accelerometer and Gyroscope sensors using\r\nthe BMI160 inertia sensor built-in on the Arduino 101,\r\nthe current implementation is polling from the ARC and channeling\r\nthe data back to X86.\r\n\r\nAlso adding two sample JS code testing both APIs.\r\n\r\nSigned-off-by: Jimmy Huang <jimmy.huang@intel.com>","created_at":"2016-11-02T20:54:22Z","updated_at":"2016-11-03T07:53:23Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2381407ec1653e63b712f13c489a9d8c1e84795e","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/01org/zephyr.js/pulls/353/commits","review_comments_url":"https://api.github.com/repos/01org/zephyr.js/pulls/353/comments","review_comment_url":"https://api.github.com/repos/01org/zephyr.js/pulls/comments{/number}","comments_url":"https://api.github.com/repos/01org/zephyr.js/issues/353/comments","statuses_url":"https://api.github.com/repos/01org/zephyr.js/statuses/294d36b85640c752a6840df72dbe3073278b9aa7","head":{"label":"jimmy-huang:sensor-api","ref":"sensor-api","sha":"294d36b85640c752a6840df72dbe3073278b9aa7","user":{"login":"jimmy-huang","id":1037247,"avatar_url":"https://avatars.githubusercontent.com/u/1037247?v=3","gravatar_id":"","url":"https://api.github.com/users/jimmy-huang","html_url":"https://github.com/jimmy-huang","followers_url":"https://api.github.com/users/jimmy-huang/followers","following_url":"https://api.github.com/users/jimmy-huang/following{/other_user}","gists_url":"https://api.github.com/users/jimmy-huang/gists{/gist_id}","starred_url":"https://api.github.com/users/jimmy-huang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jimmy-huang/subscriptions","organizations_url":"https://api.github.com/users/jimmy-huang/orgs","repos_url":"https://api.github.com/users/jimmy-huang/repos","events_url":"https://api.github.com/users/jimmy-huang/events{/privacy}","received_events_url":"https://api.github.com/users/jimmy-huang/received_events","type":"User","site_admin":false},"repo":{"id":70281286,"name":"zephyr.js","full_name":"jimmy-huang/zephyr.js","owner":{"login":"jimmy-huang","id":1037247,"avatar_url":"https://avatars.githubusercontent.com/u/1037247?v=3","gravatar_id":"","url":"https://api.github.com/users/jimmy-huang","html_url":"https://github.com/jimmy-huang","followers_url":"https://api.github.com/users/jimmy-huang/followers","following_url":"https://api.github.com/users/jimmy-huang/following{/other_user}","gists_url":"https://api.github.com/users/jimmy-huang/gists{/gist_id}","starred_url":"https://api.github.com/users/jimmy-huang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jimmy-huang/subscriptions","organizations_url":"https://api.github.com/users/jimmy-huang/orgs","repos_url":"https://api.github.com/users/jimmy-huang/repos","events_url":"https://api.github.com/users/jimmy-huang/events{/privacy}","received_events_url":"https://api.github.com/users/jimmy-huang/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jimmy-huang/zephyr.js","description":"JavaScript* Runtime for Zephyr* OS","fork":true,"url":"https://api.github.com/repos/jimmy-huang/zephyr.js","forks_url":"https://api.github.com/repos/jimmy-huang/zephyr.js/forks","keys_url":"https://api.github.com/repos/jimmy-huang/zephyr.js/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jimmy-huang/zephyr.js/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jimmy-huang/zephyr.js/teams","hooks_url":"https://api.github.com/repos/jimmy-huang/zephyr.js/hooks","issue_events_url":"https://api.github.com/repos/jimmy-huang/zephyr.js/issues/events{/number}","events_url":"https://api.github.com/repos/jimmy-huang/zephyr.js/events","assignees_url":"https://api.github.com/repos/jimmy-huang/zephyr.js/assignees{/user}","branches_url":"https://api.github.com/repos/jimmy-huang/zephyr.js/branches{/branch}","tags_url":"https://api.github.com/repos/jimmy-huang/zephyr.js/tags","blobs_url":"https://api.github.com/repos/jimmy-huang/zephyr.js/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jimmy-huang/zephyr.js/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jimmy-huang/zephyr.js/git/refs{/sha}","trees_url":"https://api.github.com/repos/jimmy-huang/zephyr.js/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jimmy-huang/zephyr.js/statuses/{sha}","languages_url":"https://api.github.com/repos/jimmy-huang/zephyr.js/languages","stargazers_url":"https://api.github.com/repos/jimmy-huang/zephyr.js/stargazers","contributors_url":"https://api.github.com/repos/jimmy-huang/zephyr.js/contributors","subscribers_url":"https://api.github.com/repos/jimmy-huang/zephyr.js/subscribers","subscription_url":"https://api.github.com/repos/jimmy-huang/zephyr.js/subscription","commits_url":"https://api.github.com/repos/jimmy-huang/zephyr.js/commits{/sha}","git_commits_url":"https://api.github.com/repos/jimmy-huang/zephyr.js/git/commits{/sha}","comments_url":"https://api.github.com/repos/jimmy-huang/zephyr.js/comments{/number}","issue_comment_url":"https://api.github.com/repos/jimmy-huang/zephyr.js/issues/comments{/number}","contents_url":"https://api.github.com/repos/jimmy-huang/zephyr.js/contents/{+path}","compare_url":"https://api.github.com/repos/jimmy-huang/zephyr.js/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jimmy-huang/zephyr.js/merges","archive_url":"https://api.github.com/repos/jimmy-huang/zephyr.js/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jimmy-huang/zephyr.js/downloads","issues_url":"https://api.github.com/repos/jimmy-huang/zephyr.js/issues{/number}","pulls_url":"https://api.github.com/repos/jimmy-huang/zephyr.js/pulls{/number}","milestones_url":"https://api.github.com/repos/jimmy-huang/zephyr.js/milestones{/number}","notifications_url":"https://api.github.com/repos/jimmy-huang/zephyr.js/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jimmy-huang/zephyr.js/labels{/name}","releases_url":"https://api.github.com/repos/jimmy-huang/zephyr.js/releases{/id}","deployments_url":"https://api.github.com/repos/jimmy-huang/zephyr.js/deployments","created_at":"2016-10-07T20:39:52Z","updated_at":"2016-10-07T20:39:53Z","pushed_at":"2016-11-03T00:09:36Z","git_url":"git://github.com/jimmy-huang/zephyr.js.git","ssh_url":"git@github.com:jimmy-huang/zephyr.js.git","clone_url":"https://github.com/jimmy-huang/zephyr.js.git","svn_url":"https://github.com/jimmy-huang/zephyr.js","homepage":"","size":755,"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":"01org:master","ref":"master","sha":"f48738081c1b4f87b9363b63943add6910778ac7","user":{"login":"01org","id":1635439,"avatar_url":"https://avatars.githubusercontent.com/u/1635439?v=3","gravatar_id":"","url":"https://api.github.com/users/01org","html_url":"https://github.com/01org","followers_url":"https://api.github.com/users/01org/followers","following_url":"https://api.github.com/users/01org/following{/other_user}","gists_url":"https://api.github.com/users/01org/gists{/gist_id}","starred_url":"https://api.github.com/users/01org/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/01org/subscriptions","organizations_url":"https://api.github.com/users/01org/orgs","repos_url":"https://api.github.com/users/01org/repos","events_url":"https://api.github.com/users/01org/events{/privacy}","received_events_url":"https://api.github.com/users/01org/received_events","type":"Organization","site_admin":false},"repo":{"id":61588342,"name":"zephyr.js","full_name":"01org/zephyr.js","owner":{"login":"01org","id":1635439,"avatar_url":"https://avatars.githubusercontent.com/u/1635439?v=3","gravatar_id":"","url":"https://api.github.com/users/01org","html_url":"https://github.com/01org","followers_url":"https://api.github.com/users/01org/followers","following_url":"https://api.github.com/users/01org/following{/other_user}","gists_url":"https://api.github.com/users/01org/gists{/gist_id}","starred_url":"https://api.github.com/users/01org/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/01org/subscriptions","organizations_url":"https://api.github.com/users/01org/orgs","repos_url":"https://api.github.com/users/01org/repos","events_url":"https://api.github.com/users/01org/events{/privacy}","received_events_url":"https://api.github.com/users/01org/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/01org/zephyr.js","description":"JavaScript* Runtime for Zephyr* OS","fork":false,"url":"https://api.github.com/repos/01org/zephyr.js","forks_url":"https://api.github.com/repos/01org/zephyr.js/forks","keys_url":"https://api.github.com/repos/01org/zephyr.js/keys{/key_id}","collaborators_url":"https://api.github.com/repos/01org/zephyr.js/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/01org/zephyr.js/teams","hooks_url":"https://api.github.com/repos/01org/zephyr.js/hooks","issue_events_url":"https://api.github.com/repos/01org/zephyr.js/issues/events{/number}","events_url":"https://api.github.com/repos/01org/zephyr.js/events","assignees_url":"https://api.github.com/repos/01org/zephyr.js/assignees{/user}","branches_url":"https://api.github.com/repos/01org/zephyr.js/branches{/branch}","tags_url":"https://api.github.com/repos/01org/zephyr.js/tags","blobs_url":"https://api.github.com/repos/01org/zephyr.js/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/01org/zephyr.js/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/01org/zephyr.js/git/refs{/sha}","trees_url":"https://api.github.com/repos/01org/zephyr.js/git/trees{/sha}","statuses_url":"https://api.github.com/repos/01org/zephyr.js/statuses/{sha}","languages_url":"https://api.github.com/repos/01org/zephyr.js/languages","stargazers_url":"https://api.github.com/repos/01org/zephyr.js/stargazers","contributors_url":"https://api.github.com/repos/01org/zephyr.js/contributors","subscribers_url":"https://api.github.com/repos/01org/zephyr.js/subscribers","subscription_url":"https://api.github.com/repos/01org/zephyr.js/subscription","commits_url":"https://api.github.com/repos/01org/zephyr.js/commits{/sha}","git_commits_url":"https://api.github.com/repos/01org/zephyr.js/git/commits{/sha}","comments_url":"https://api.github.com/repos/01org/zephyr.js/comments{/number}","issue_comment_url":"https://api.github.com/repos/01org/zephyr.js/issues/comments{/number}","contents_url":"https://api.github.com/repos/01org/zephyr.js/contents/{+path}","compare_url":"https://api.github.com/repos/01org/zephyr.js/compare/{base}...{head}","merges_url":"https://api.github.com/repos/01org/zephyr.js/merges","archive_url":"https://api.github.com/repos/01org/zephyr.js/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/01org/zephyr.js/downloads","issues_url":"https://api.github.com/repos/01org/zephyr.js/issues{/number}","pulls_url":"https://api.github.com/repos/01org/zephyr.js/pulls{/number}","milestones_url":"https://api.github.com/repos/01org/zephyr.js/milestones{/number}","notifications_url":"https://api.github.com/repos/01org/zephyr.js/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/01org/zephyr.js/labels{/name}","releases_url":"https://api.github.com/repos/01org/zephyr.js/releases{/id}","deployments_url":"https://api.github.com/repos/01org/zephyr.js/deployments","created_at":"2016-06-20T23:53:57Z","updated_at":"2016-11-01T22:36:51Z","pushed_at":"2016-11-03T07:28:40Z","git_url":"git://github.com/01org/zephyr.js.git","ssh_url":"git@github.com:01org/zephyr.js.git","clone_url":"https://github.com/01org/zephyr.js.git","svn_url":"https://github.com/01org/zephyr.js","homepage":"","size":988,"stargazers_count":23,"watchers_count":23,"language":"C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":16,"mirror_url":null,"open_issues_count":56,"forks":16,"open_issues":56,"watchers":23,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/01org/zephyr.js/pulls/353"},"html":{"href":"https://github.com/01org/zephyr.js/pull/353"},"issue":{"href":"https://api.github.com/repos/01org/zephyr.js/issues/353"},"comments":{"href":"https://api.github.com/repos/01org/zephyr.js/issues/353/comments"},"review_comments":{"href":"https://api.github.com/repos/01org/zephyr.js/pulls/353/comments"},"review_comment":{"href":"https://api.github.com/repos/01org/zephyr.js/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/01org/zephyr.js/pulls/353/commits"},"statuses":{"href":"https://api.github.com/repos/01org/zephyr.js/statuses/294d36b85640c752a6840df72dbe3073278b9aa7"}}}}
{"actor":{"display_login":"kenchris"}}