{"action":"created","comment":{"url":"https://api.github.com/repos/betaflight/betaflight/pulls/comments/241939259","pull_request_review_id":185343750,"id":241939259,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDI0MTkzOTI1OQ==","diff_hunk":"@@ -0,0 +1,66 @@\n+/*\n+ * This file is part of Cleanflight and Betaflight.\n+ *\n+ * Cleanflight and Betaflight are free software. You can redistribute\n+ * this software and/or modify this software under the terms of the\n+ * GNU General Public License as published by the Free Software\n+ * Foundation, either version 3 of the License, or (at your option)\n+ * any later version.\n+ *\n+ * Cleanflight and Betaflight are distributed in the hope that they\n+ * will be useful, but WITHOUT ANY WARRANTY; without even the implied\n+ * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n+ * See the GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this software.\n+ *\n+ * If not, see <http://www.gnu.org/licenses/>.\n+ */\n+\n+#pragma once\n+\n+#include <stdbool.h>\n+#include <stdint.h>\n+\n+#define DSM_BIND_TIMEOUT_US 10000\n+#define DSM_SYNC_TIMEOUT_US 20000\n+#define DSM_RECV_LONG_TIMEOUT_US 18010\n+#define DSM_RECV_MID_TIMEOUT_US 7000\n+#define DSM_RECV_SHORT_TIMEOUT_US 4010\n+#define DSM_RECV_TIMEOUT_OFFSET_US 1000\n+\n+#define DSM_MAX_MISSED_PACKETS 31\n+\n+#define DSM_MAX_RF_CHANNEL 0x4F\n+#define DSM_MAX_CHANNEL_COUNT 12\n+#define DSM_INITIAL_BIND_CHANNEL 0x0D\n+\n+#define DSM_TELEMETRY_FRAME_RPM 0x7E\n+#define DSM_TELEMETRY_TIMEOUT_US 1500\n+#define DSM_TELEMETRY_TIME_US 176000\n+\n+typedef enum {\n+    DSM2_22     = 0x01,\n+    DSM2_11     = 0x02,\n+    DSM2_11_DX8 = 0x12,\n+    DSMX_22     = 0xA2,\n+    DSMX_11     = 0xB2,\n+} dsm_protocol_e;\n+#define IS_DSM2(x) (x == DSM2_22 || x == DSM2_11 || x == DSM2_11_DX8)\n+#define IS_DSMX(x) (!IS_DSM2(x))\n+\n+#define CHECK_MFG_ID(protocol, packet, id) ((IS_DSM2(protocol) && packet[0] == (~id[2]&0xFF) && packet[1] == (~id[3]&0xFF)) || \\\n+        (IS_DSMX(protocol) && packet[0] == id[2] && packet[1] == id[3]))\n+\n+typedef struct spektrumConfig_s {\n+    dsm_protocol_e protocol;","path":"src/main/rx/cyrf6936_spektrum.h","position":57,"original_position":57,"commit_id":"a3af20fd68ed91a4af3ebc4ef13f8a484d9ea0da","original_commit_id":"a3af20fd68ed91a4af3ebc4ef13f8a484d9ea0da","user":{"login":"mikeller","id":4742747,"node_id":"MDQ6VXNlcjQ3NDI3NDc=","avatar_url":"https://avatars1.githubusercontent.com/u/4742747?v=4","gravatar_id":"","url":"https://api.github.com/users/mikeller","html_url":"https://github.com/mikeller","followers_url":"https://api.github.com/users/mikeller/followers","following_url":"https://api.github.com/users/mikeller/following{/other_user}","gists_url":"https://api.github.com/users/mikeller/gists{/gist_id}","starred_url":"https://api.github.com/users/mikeller/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikeller/subscriptions","organizations_url":"https://api.github.com/users/mikeller/orgs","repos_url":"https://api.github.com/users/mikeller/repos","events_url":"https://api.github.com/users/mikeller/events{/privacy}","received_events_url":"https://api.github.com/users/mikeller/received_events","type":"User","site_admin":false},"body":"Use an `uint8_t` here - enums are stored as 32 bit, which isn't needed in the parameter group.","created_at":"2018-12-15T05:36:20Z","updated_at":"2018-12-15T05:36:24Z","html_url":"https://github.com/betaflight/betaflight/pull/7210#discussion_r241939259","pull_request_url":"https://api.github.com/repos/betaflight/betaflight/pulls/7210","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/betaflight/betaflight/pulls/comments/241939259"},"html":{"href":"https://github.com/betaflight/betaflight/pull/7210#discussion_r241939259"},"pull_request":{"href":"https://api.github.com/repos/betaflight/betaflight/pulls/7210"}}},"pull_request":{"url":"https://api.github.com/repos/betaflight/betaflight/pulls/7210","id":237755460,"node_id":"MDExOlB1bGxSZXF1ZXN0MjM3NzU1NDYw","html_url":"https://github.com/betaflight/betaflight/pull/7210","diff_url":"https://github.com/betaflight/betaflight/pull/7210.diff","patch_url":"https://github.com/betaflight/betaflight/pull/7210.patch","issue_url":"https://api.github.com/repos/betaflight/betaflight/issues/7210","number":7210,"state":"open","locked":false,"title":"Implemented SPI SPEKTRUM protocol","user":{"login":"phobos-","id":4332066,"node_id":"MDQ6VXNlcjQzMzIwNjY=","avatar_url":"https://avatars3.githubusercontent.com/u/4332066?v=4","gravatar_id":"","url":"https://api.github.com/users/phobos-","html_url":"https://github.com/phobos-","followers_url":"https://api.github.com/users/phobos-/followers","following_url":"https://api.github.com/users/phobos-/following{/other_user}","gists_url":"https://api.github.com/users/phobos-/gists{/gist_id}","starred_url":"https://api.github.com/users/phobos-/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phobos-/subscriptions","organizations_url":"https://api.github.com/users/phobos-/orgs","repos_url":"https://api.github.com/users/phobos-/repos","events_url":"https://api.github.com/users/phobos-/events{/privacy}","received_events_url":"https://api.github.com/users/phobos-/received_events","type":"User","site_admin":false},"body":"This PR adds cyrf6936 SPI driver and spektrum dsm2 / dsmx 11ms / 22ms protocols with simple telemetry.","created_at":"2018-12-11T16:59:16Z","updated_at":"2018-12-15T05:36:24Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f99bf93ff34c1a045412f518cf8d6ec97ce3c635","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/betaflight/betaflight/pulls/7210/commits","review_comments_url":"https://api.github.com/repos/betaflight/betaflight/pulls/7210/comments","review_comment_url":"https://api.github.com/repos/betaflight/betaflight/pulls/comments{/number}","comments_url":"https://api.github.com/repos/betaflight/betaflight/issues/7210/comments","statuses_url":"https://api.github.com/repos/betaflight/betaflight/statuses/a3af20fd68ed91a4af3ebc4ef13f8a484d9ea0da","head":{"label":"phobos-:spi_dsm","ref":"spi_dsm","sha":"a3af20fd68ed91a4af3ebc4ef13f8a484d9ea0da","user":{"login":"phobos-","id":4332066,"node_id":"MDQ6VXNlcjQzMzIwNjY=","avatar_url":"https://avatars3.githubusercontent.com/u/4332066?v=4","gravatar_id":"","url":"https://api.github.com/users/phobos-","html_url":"https://github.com/phobos-","followers_url":"https://api.github.com/users/phobos-/followers","following_url":"https://api.github.com/users/phobos-/following{/other_user}","gists_url":"https://api.github.com/users/phobos-/gists{/gist_id}","starred_url":"https://api.github.com/users/phobos-/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phobos-/subscriptions","organizations_url":"https://api.github.com/users/phobos-/orgs","repos_url":"https://api.github.com/users/phobos-/repos","events_url":"https://api.github.com/users/phobos-/events{/privacy}","received_events_url":"https://api.github.com/users/phobos-/received_events","type":"User","site_admin":false},"repo":{"id":149880787,"node_id":"MDEwOlJlcG9zaXRvcnkxNDk4ODA3ODc=","name":"betaflight","full_name":"phobos-/betaflight","private":false,"owner":{"login":"phobos-","id":4332066,"node_id":"MDQ6VXNlcjQzMzIwNjY=","avatar_url":"https://avatars3.githubusercontent.com/u/4332066?v=4","gravatar_id":"","url":"https://api.github.com/users/phobos-","html_url":"https://github.com/phobos-","followers_url":"https://api.github.com/users/phobos-/followers","following_url":"https://api.github.com/users/phobos-/following{/other_user}","gists_url":"https://api.github.com/users/phobos-/gists{/gist_id}","starred_url":"https://api.github.com/users/phobos-/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phobos-/subscriptions","organizations_url":"https://api.github.com/users/phobos-/orgs","repos_url":"https://api.github.com/users/phobos-/repos","events_url":"https://api.github.com/users/phobos-/events{/privacy}","received_events_url":"https://api.github.com/users/phobos-/received_events","type":"User","site_admin":false},"html_url":"https://github.com/phobos-/betaflight","description":"Open Source Flight Controller Firmware","fork":true,"url":"https://api.github.com/repos/phobos-/betaflight","forks_url":"https://api.github.com/repos/phobos-/betaflight/forks","keys_url":"https://api.github.com/repos/phobos-/betaflight/keys{/key_id}","collaborators_url":"https://api.github.com/repos/phobos-/betaflight/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/phobos-/betaflight/teams","hooks_url":"https://api.github.com/repos/phobos-/betaflight/hooks","issue_events_url":"https://api.github.com/repos/phobos-/betaflight/issues/events{/number}","events_url":"https://api.github.com/repos/phobos-/betaflight/events","assignees_url":"https://api.github.com/repos/phobos-/betaflight/assignees{/user}","branches_url":"https://api.github.com/repos/phobos-/betaflight/branches{/branch}","tags_url":"https://api.github.com/repos/phobos-/betaflight/tags","blobs_url":"https://api.github.com/repos/phobos-/betaflight/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/phobos-/betaflight/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/phobos-/betaflight/git/refs{/sha}","trees_url":"https://api.github.com/repos/phobos-/betaflight/git/trees{/sha}","statuses_url":"https://api.github.com/repos/phobos-/betaflight/statuses/{sha}","languages_url":"https://api.github.com/repos/phobos-/betaflight/languages","stargazers_url":"https://api.github.com/repos/phobos-/betaflight/stargazers","contributors_url":"https://api.github.com/repos/phobos-/betaflight/contributors","subscribers_url":"https://api.github.com/repos/phobos-/betaflight/subscribers","subscription_url":"https://api.github.com/repos/phobos-/betaflight/subscription","commits_url":"https://api.github.com/repos/phobos-/betaflight/commits{/sha}","git_commits_url":"https://api.github.com/repos/phobos-/betaflight/git/commits{/sha}","comments_url":"https://api.github.com/repos/phobos-/betaflight/comments{/number}","issue_comment_url":"https://api.github.com/repos/phobos-/betaflight/issues/comments{/number}","contents_url":"https://api.github.com/repos/phobos-/betaflight/contents/{+path}","compare_url":"https://api.github.com/repos/phobos-/betaflight/compare/{base}...{head}","merges_url":"https://api.github.com/repos/phobos-/betaflight/merges","archive_url":"https://api.github.com/repos/phobos-/betaflight/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/phobos-/betaflight/downloads","issues_url":"https://api.github.com/repos/phobos-/betaflight/issues{/number}","pulls_url":"https://api.github.com/repos/phobos-/betaflight/pulls{/number}","milestones_url":"https://api.github.com/repos/phobos-/betaflight/milestones{/number}","notifications_url":"https://api.github.com/repos/phobos-/betaflight/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/phobos-/betaflight/labels{/name}","releases_url":"https://api.github.com/repos/phobos-/betaflight/releases{/id}","deployments_url":"https://api.github.com/repos/phobos-/betaflight/deployments","created_at":"2018-09-22T13:45:23Z","updated_at":"2018-12-11T16:38:37Z","pushed_at":"2018-12-13T18:40:11Z","git_url":"git://github.com/phobos-/betaflight.git","ssh_url":"git@github.com:phobos-/betaflight.git","clone_url":"https://github.com/phobos-/betaflight.git","svn_url":"https://github.com/phobos-/betaflight","homepage":"","size":233709,"stargazers_count":0,"watchers_count":0,"language":"C","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0","node_id":"MDc6TGljZW5zZTk="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"betaflight:master","ref":"master","sha":"9bae508ab8a7f2d7b9f7a7532aa255e986723dfd","user":{"login":"betaflight","id":19597933,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE5NTk3OTMz","avatar_url":"https://avatars1.githubusercontent.com/u/19597933?v=4","gravatar_id":"","url":"https://api.github.com/users/betaflight","html_url":"https://github.com/betaflight","followers_url":"https://api.github.com/users/betaflight/followers","following_url":"https://api.github.com/users/betaflight/following{/other_user}","gists_url":"https://api.github.com/users/betaflight/gists{/gist_id}","starred_url":"https://api.github.com/users/betaflight/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/betaflight/subscriptions","organizations_url":"https://api.github.com/users/betaflight/orgs","repos_url":"https://api.github.com/users/betaflight/repos","events_url":"https://api.github.com/users/betaflight/events{/privacy}","received_events_url":"https://api.github.com/users/betaflight/received_events","type":"Organization","site_admin":false},"repo":{"id":37060852,"node_id":"MDEwOlJlcG9zaXRvcnkzNzA2MDg1Mg==","name":"betaflight","full_name":"betaflight/betaflight","private":false,"owner":{"login":"betaflight","id":19597933,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE5NTk3OTMz","avatar_url":"https://avatars1.githubusercontent.com/u/19597933?v=4","gravatar_id":"","url":"https://api.github.com/users/betaflight","html_url":"https://github.com/betaflight","followers_url":"https://api.github.com/users/betaflight/followers","following_url":"https://api.github.com/users/betaflight/following{/other_user}","gists_url":"https://api.github.com/users/betaflight/gists{/gist_id}","starred_url":"https://api.github.com/users/betaflight/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/betaflight/subscriptions","organizations_url":"https://api.github.com/users/betaflight/orgs","repos_url":"https://api.github.com/users/betaflight/repos","events_url":"https://api.github.com/users/betaflight/events{/privacy}","received_events_url":"https://api.github.com/users/betaflight/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/betaflight/betaflight","description":"Open Source Flight Controller Firmware","fork":false,"url":"https://api.github.com/repos/betaflight/betaflight","forks_url":"https://api.github.com/repos/betaflight/betaflight/forks","keys_url":"https://api.github.com/repos/betaflight/betaflight/keys{/key_id}","collaborators_url":"https://api.github.com/repos/betaflight/betaflight/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/betaflight/betaflight/teams","hooks_url":"https://api.github.com/repos/betaflight/betaflight/hooks","issue_events_url":"https://api.github.com/repos/betaflight/betaflight/issues/events{/number}","events_url":"https://api.github.com/repos/betaflight/betaflight/events","assignees_url":"https://api.github.com/repos/betaflight/betaflight/assignees{/user}","branches_url":"https://api.github.com/repos/betaflight/betaflight/branches{/branch}","tags_url":"https://api.github.com/repos/betaflight/betaflight/tags","blobs_url":"https://api.github.com/repos/betaflight/betaflight/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/betaflight/betaflight/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/betaflight/betaflight/git/refs{/sha}","trees_url":"https://api.github.com/repos/betaflight/betaflight/git/trees{/sha}","statuses_url":"https://api.github.com/repos/betaflight/betaflight/statuses/{sha}","languages_url":"https://api.github.com/repos/betaflight/betaflight/languages","stargazers_url":"https://api.github.com/repos/betaflight/betaflight/stargazers","contributors_url":"https://api.github.com/repos/betaflight/betaflight/contributors","subscribers_url":"https://api.github.com/repos/betaflight/betaflight/subscribers","subscription_url":"https://api.github.com/repos/betaflight/betaflight/subscription","commits_url":"https://api.github.com/repos/betaflight/betaflight/commits{/sha}","git_commits_url":"https://api.github.com/repos/betaflight/betaflight/git/commits{/sha}","comments_url":"https://api.github.com/repos/betaflight/betaflight/comments{/number}","issue_comment_url":"https://api.github.com/repos/betaflight/betaflight/issues/comments{/number}","contents_url":"https://api.github.com/repos/betaflight/betaflight/contents/{+path}","compare_url":"https://api.github.com/repos/betaflight/betaflight/compare/{base}...{head}","merges_url":"https://api.github.com/repos/betaflight/betaflight/merges","archive_url":"https://api.github.com/repos/betaflight/betaflight/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/betaflight/betaflight/downloads","issues_url":"https://api.github.com/repos/betaflight/betaflight/issues{/number}","pulls_url":"https://api.github.com/repos/betaflight/betaflight/pulls{/number}","milestones_url":"https://api.github.com/repos/betaflight/betaflight/milestones{/number}","notifications_url":"https://api.github.com/repos/betaflight/betaflight/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/betaflight/betaflight/labels{/name}","releases_url":"https://api.github.com/repos/betaflight/betaflight/releases{/id}","deployments_url":"https://api.github.com/repos/betaflight/betaflight/deployments","created_at":"2015-06-08T10:37:44Z","updated_at":"2018-12-15T05:30:11Z","pushed_at":"2018-12-15T05:29:52Z","git_url":"git://github.com/betaflight/betaflight.git","ssh_url":"git@github.com:betaflight/betaflight.git","clone_url":"https://github.com/betaflight/betaflight.git","svn_url":"https://github.com/betaflight/betaflight","homepage":"","size":235394,"stargazers_count":2267,"watchers_count":2267,"language":"C","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1088,"mirror_url":null,"archived":false,"open_issues_count":197,"license":{"key":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0","node_id":"MDc6TGljZW5zZTk="},"forks":1088,"open_issues":197,"watchers":2267,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/betaflight/betaflight/pulls/7210"},"html":{"href":"https://github.com/betaflight/betaflight/pull/7210"},"issue":{"href":"https://api.github.com/repos/betaflight/betaflight/issues/7210"},"comments":{"href":"https://api.github.com/repos/betaflight/betaflight/issues/7210/comments"},"review_comments":{"href":"https://api.github.com/repos/betaflight/betaflight/pulls/7210/comments"},"review_comment":{"href":"https://api.github.com/repos/betaflight/betaflight/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/betaflight/betaflight/pulls/7210/commits"},"statuses":{"href":"https://api.github.com/repos/betaflight/betaflight/statuses/a3af20fd68ed91a4af3ebc4ef13f8a484d9ea0da"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"mikeller"}}