{"action":"created","comment":{"url":"https://api.github.com/repos/cleanflight/cleanflight/pulls/comments/91937864","pull_request_review_id":12444425,"id":91937864,"diff_hunk":"@@ -153,29 +162,63 @@ typedef struct beeperTableEntry_s {\n #define BEEPER_ENTRY(a,b,c,d) a,b,c\n #endif\n \n-static const beeperTableEntry_t beeperTable[] = {\n+/*static*/ const beeperTableEntry_t beeperTable[] = {\n     { BEEPER_ENTRY(BEEPER_GYRO_CALIBRATED,       0, beep_gyroCalibrated,   \"GYRO_CALIBRATED\") },\n-    { BEEPER_ENTRY(BEEPER_RX_LOST_LANDING,       1, beep_sos,              \"RX_LOST_LANDING\") },\n-    { BEEPER_ENTRY(BEEPER_RX_LOST,               2, beep_txLostBeep,       \"RX_LOST\") },\n+    { BEEPER_ENTRY(BEEPER_RX_LOST,               1, beep_txLostBeep,       \"RX_LOST\") },\n+    { BEEPER_ENTRY(BEEPER_RX_LOST_LANDING,       2, beep_sos,              \"RX_LOST_LANDING\") },\n     { BEEPER_ENTRY(BEEPER_DISARMING,             3, beep_disarmBeep,       \"DISARMING\") },\n     { BEEPER_ENTRY(BEEPER_ARMING,                4, beep_armingBeep,       \"ARMING\")  },\n     { BEEPER_ENTRY(BEEPER_ARMING_GPS_FIX,        5, beep_armedGpsFix,      \"ARMING_GPS_FIX\") },\n     { BEEPER_ENTRY(BEEPER_BAT_CRIT_LOW,          6, beep_critBatteryBeep,  \"BAT_CRIT_LOW\") },\n     { BEEPER_ENTRY(BEEPER_BAT_LOW,               7, beep_lowBatteryBeep,   \"BAT_LOW\") },\n-    { BEEPER_ENTRY(BEEPER_GPS_STATUS,            8, beep_multiBeeps,       NULL) },\n+    { BEEPER_ENTRY(BEEPER_GPS_STATUS,            8, beep_multiBeeps,       \"GPS_STATUS\") },\n     { BEEPER_ENTRY(BEEPER_RX_SET,                9, beep_shortBeep,        \"RX_SET\") },\n     { BEEPER_ENTRY(BEEPER_ACC_CALIBRATION,       10, beep_2shortBeeps,     \"ACC_CALIBRATION\") },\n     { BEEPER_ENTRY(BEEPER_ACC_CALIBRATION_FAIL,  11, beep_2longerBeeps,    \"ACC_CALIBRATION_FAIL\") },\n     { BEEPER_ENTRY(BEEPER_READY_BEEP,            12, beep_readyBeep,       \"READY_BEEP\") },\n-    { BEEPER_ENTRY(BEEPER_MULTI_BEEPS,           13, beep_multiBeeps,      NULL) }, // FIXME having this listed makes no sense since the beep array will not be initialised.\n+    { BEEPER_ENTRY(BEEPER_MULTI_BEEPS,           13, beep_multiBeeps,      \"MULTI_BEEPS\") }, // FIXME having this listed makes no sense since the beep array will not be initialised.\n     { BEEPER_ENTRY(BEEPER_DISARM_REPEAT,         14, beep_disarmRepeatBeep, \"DISARM_REPEAT\") },\n     { BEEPER_ENTRY(BEEPER_ARMED,                 15, beep_armedBeep,       \"ARMED\") },\n+    { BEEPER_ENTRY(BEEPER_SYSTEM_INIT,           16, NULL,                 \"SYSTEM_INIT\") },\n+\n+    { BEEPER_ENTRY(BEEPER_ALL,                   17, NULL,      \t\t   \"ALL\") },\n };\n \n static const beeperTableEntry_t *currentBeeperEntry = NULL;\n \n #define BEEPER_TABLE_ENTRY_COUNT (sizeof(beeperTable) / sizeof(beeperTableEntry_t))\n \n+\n+void beeperOffSet(uint32_t mask)\n+{\n+    beeperConfig()->beeper_off_flags |= mask;\n+}\n+\n+void beeperOffSetAll(uint8_t beeperCount)\n+{\n+    beeperConfig()->beeper_off_flags = (1 << beeperCount) -1;\n+}\n+\n+void beeperOffClear(uint32_t mask)\n+{\n+    beeperConfig()->beeper_off_flags &= ~(mask);\n+}\n+\n+void beeperOffClearAll(void)\n+{\n+    beeperConfig()->beeper_off_flags = 0;\n+}\n+\n+uint32_t getBeeperOffMask(void)","path":"src/main/io/beeper.c","position":86,"original_position":86,"commit_id":"458e669098692c989ebb44ae550f669bfda0c3cd","original_commit_id":"458e669098692c989ebb44ae550f669bfda0c3cd","user":{"login":"unitware","id":6065378,"avatar_url":"https://avatars.githubusercontent.com/u/6065378?v=3","gravatar_id":"","url":"https://api.github.com/users/unitware","html_url":"https://github.com/unitware","followers_url":"https://api.github.com/users/unitware/followers","following_url":"https://api.github.com/users/unitware/following{/other_user}","gists_url":"https://api.github.com/users/unitware/gists{/gist_id}","starred_url":"https://api.github.com/users/unitware/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/unitware/subscriptions","organizations_url":"https://api.github.com/users/unitware/orgs","repos_url":"https://api.github.com/users/unitware/repos","events_url":"https://api.github.com/users/unitware/events{/privacy}","received_events_url":"https://api.github.com/users/unitware/received_events","type":"User","site_admin":false},"body":"decide if you shall use prefix or suffix for set/get, it's not the same when comparing beeperOffSet/setBeeperOffMask etc.","created_at":"2016-12-12T12:31:55Z","updated_at":"2016-12-12T12:48:26Z","html_url":"https://github.com/cleanflight/cleanflight/pull/2531#discussion_r91937864","pull_request_url":"https://api.github.com/repos/cleanflight/cleanflight/pulls/2531","_links":{"self":{"href":"https://api.github.com/repos/cleanflight/cleanflight/pulls/comments/91937864"},"html":{"href":"https://github.com/cleanflight/cleanflight/pull/2531#discussion_r91937864"},"pull_request":{"href":"https://api.github.com/repos/cleanflight/cleanflight/pulls/2531"}}},"pull_request":{"url":"https://api.github.com/repos/cleanflight/cleanflight/pulls/2531","id":97445190,"html_url":"https://github.com/cleanflight/cleanflight/pull/2531","diff_url":"https://github.com/cleanflight/cleanflight/pull/2531.diff","patch_url":"https://github.com/cleanflight/cleanflight/pull/2531.patch","issue_url":"https://api.github.com/repos/cleanflight/cleanflight/issues/2531","number":2531,"state":"open","locked":false,"title":"Pierre a cli beeper command","user":{"login":"ivanwyc","id":227269,"avatar_url":"https://avatars.githubusercontent.com/u/227269?v=3","gravatar_id":"","url":"https://api.github.com/users/ivanwyc","html_url":"https://github.com/ivanwyc","followers_url":"https://api.github.com/users/ivanwyc/followers","following_url":"https://api.github.com/users/ivanwyc/following{/other_user}","gists_url":"https://api.github.com/users/ivanwyc/gists{/gist_id}","starred_url":"https://api.github.com/users/ivanwyc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ivanwyc/subscriptions","organizations_url":"https://api.github.com/users/ivanwyc/orgs","repos_url":"https://api.github.com/users/ivanwyc/repos","events_url":"https://api.github.com/users/ivanwyc/events{/privacy}","received_events_url":"https://api.github.com/users/ivanwyc/received_events","type":"User","site_admin":false},"body":"Since I don't have write access to CF I created a new PR.\r\n\r\nTested with -ALL, SYSTEM_INIT, ARMING, ARMED, RX_SET and they all work as expected.","created_at":"2016-12-11T01:50:57Z","updated_at":"2016-12-12T12:48:27Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e64919326a6d8dcd54a865c19c18702337cc65c2","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/cleanflight/cleanflight/pulls/2531/commits","review_comments_url":"https://api.github.com/repos/cleanflight/cleanflight/pulls/2531/comments","review_comment_url":"https://api.github.com/repos/cleanflight/cleanflight/pulls/comments{/number}","comments_url":"https://api.github.com/repos/cleanflight/cleanflight/issues/2531/comments","statuses_url":"https://api.github.com/repos/cleanflight/cleanflight/statuses/458e669098692c989ebb44ae550f669bfda0c3cd","head":{"label":"ivanwyc:pierre-a-CLI_beeper_command","ref":"pierre-a-CLI_beeper_command","sha":"458e669098692c989ebb44ae550f669bfda0c3cd","user":{"login":"ivanwyc","id":227269,"avatar_url":"https://avatars.githubusercontent.com/u/227269?v=3","gravatar_id":"","url":"https://api.github.com/users/ivanwyc","html_url":"https://github.com/ivanwyc","followers_url":"https://api.github.com/users/ivanwyc/followers","following_url":"https://api.github.com/users/ivanwyc/following{/other_user}","gists_url":"https://api.github.com/users/ivanwyc/gists{/gist_id}","starred_url":"https://api.github.com/users/ivanwyc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ivanwyc/subscriptions","organizations_url":"https://api.github.com/users/ivanwyc/orgs","repos_url":"https://api.github.com/users/ivanwyc/repos","events_url":"https://api.github.com/users/ivanwyc/events{/privacy}","received_events_url":"https://api.github.com/users/ivanwyc/received_events","type":"User","site_admin":false},"repo":{"id":76148023,"name":"cleanflight","full_name":"ivanwyc/cleanflight","owner":{"login":"ivanwyc","id":227269,"avatar_url":"https://avatars.githubusercontent.com/u/227269?v=3","gravatar_id":"","url":"https://api.github.com/users/ivanwyc","html_url":"https://github.com/ivanwyc","followers_url":"https://api.github.com/users/ivanwyc/followers","following_url":"https://api.github.com/users/ivanwyc/following{/other_user}","gists_url":"https://api.github.com/users/ivanwyc/gists{/gist_id}","starred_url":"https://api.github.com/users/ivanwyc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ivanwyc/subscriptions","organizations_url":"https://api.github.com/users/ivanwyc/orgs","repos_url":"https://api.github.com/users/ivanwyc/repos","events_url":"https://api.github.com/users/ivanwyc/events{/privacy}","received_events_url":"https://api.github.com/users/ivanwyc/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ivanwyc/cleanflight","description":"Clean-code version of the baseflight flight controller firmware","fork":true,"url":"https://api.github.com/repos/ivanwyc/cleanflight","forks_url":"https://api.github.com/repos/ivanwyc/cleanflight/forks","keys_url":"https://api.github.com/repos/ivanwyc/cleanflight/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ivanwyc/cleanflight/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ivanwyc/cleanflight/teams","hooks_url":"https://api.github.com/repos/ivanwyc/cleanflight/hooks","issue_events_url":"https://api.github.com/repos/ivanwyc/cleanflight/issues/events{/number}","events_url":"https://api.github.com/repos/ivanwyc/cleanflight/events","assignees_url":"https://api.github.com/repos/ivanwyc/cleanflight/assignees{/user}","branches_url":"https://api.github.com/repos/ivanwyc/cleanflight/branches{/branch}","tags_url":"https://api.github.com/repos/ivanwyc/cleanflight/tags","blobs_url":"https://api.github.com/repos/ivanwyc/cleanflight/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ivanwyc/cleanflight/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ivanwyc/cleanflight/git/refs{/sha}","trees_url":"https://api.github.com/repos/ivanwyc/cleanflight/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ivanwyc/cleanflight/statuses/{sha}","languages_url":"https://api.github.com/repos/ivanwyc/cleanflight/languages","stargazers_url":"https://api.github.com/repos/ivanwyc/cleanflight/stargazers","contributors_url":"https://api.github.com/repos/ivanwyc/cleanflight/contributors","subscribers_url":"https://api.github.com/repos/ivanwyc/cleanflight/subscribers","subscription_url":"https://api.github.com/repos/ivanwyc/cleanflight/subscription","commits_url":"https://api.github.com/repos/ivanwyc/cleanflight/commits{/sha}","git_commits_url":"https://api.github.com/repos/ivanwyc/cleanflight/git/commits{/sha}","comments_url":"https://api.github.com/repos/ivanwyc/cleanflight/comments{/number}","issue_comment_url":"https://api.github.com/repos/ivanwyc/cleanflight/issues/comments{/number}","contents_url":"https://api.github.com/repos/ivanwyc/cleanflight/contents/{+path}","compare_url":"https://api.github.com/repos/ivanwyc/cleanflight/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ivanwyc/cleanflight/merges","archive_url":"https://api.github.com/repos/ivanwyc/cleanflight/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ivanwyc/cleanflight/downloads","issues_url":"https://api.github.com/repos/ivanwyc/cleanflight/issues{/number}","pulls_url":"https://api.github.com/repos/ivanwyc/cleanflight/pulls{/number}","milestones_url":"https://api.github.com/repos/ivanwyc/cleanflight/milestones{/number}","notifications_url":"https://api.github.com/repos/ivanwyc/cleanflight/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ivanwyc/cleanflight/labels{/name}","releases_url":"https://api.github.com/repos/ivanwyc/cleanflight/releases{/id}","deployments_url":"https://api.github.com/repos/ivanwyc/cleanflight/deployments","created_at":"2016-12-11T01:42:20Z","updated_at":"2016-12-11T01:42:28Z","pushed_at":"2016-12-11T01:44:48Z","git_url":"git://github.com/ivanwyc/cleanflight.git","ssh_url":"git@github.com:ivanwyc/cleanflight.git","clone_url":"https://github.com/ivanwyc/cleanflight.git","svn_url":"https://github.com/ivanwyc/cleanflight","homepage":"http://cleanflight.com","size":41085,"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":"cleanflight:master","ref":"master","sha":"cb6c86149999475a98d471e1f4270dbc49ce0eb7","user":{"login":"cleanflight","id":8776523,"avatar_url":"https://avatars.githubusercontent.com/u/8776523?v=3","gravatar_id":"","url":"https://api.github.com/users/cleanflight","html_url":"https://github.com/cleanflight","followers_url":"https://api.github.com/users/cleanflight/followers","following_url":"https://api.github.com/users/cleanflight/following{/other_user}","gists_url":"https://api.github.com/users/cleanflight/gists{/gist_id}","starred_url":"https://api.github.com/users/cleanflight/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cleanflight/subscriptions","organizations_url":"https://api.github.com/users/cleanflight/orgs","repos_url":"https://api.github.com/users/cleanflight/repos","events_url":"https://api.github.com/users/cleanflight/events{/privacy}","received_events_url":"https://api.github.com/users/cleanflight/received_events","type":"Organization","site_admin":false},"repo":{"id":9066347,"name":"cleanflight","full_name":"cleanflight/cleanflight","owner":{"login":"cleanflight","id":8776523,"avatar_url":"https://avatars.githubusercontent.com/u/8776523?v=3","gravatar_id":"","url":"https://api.github.com/users/cleanflight","html_url":"https://github.com/cleanflight","followers_url":"https://api.github.com/users/cleanflight/followers","following_url":"https://api.github.com/users/cleanflight/following{/other_user}","gists_url":"https://api.github.com/users/cleanflight/gists{/gist_id}","starred_url":"https://api.github.com/users/cleanflight/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cleanflight/subscriptions","organizations_url":"https://api.github.com/users/cleanflight/orgs","repos_url":"https://api.github.com/users/cleanflight/repos","events_url":"https://api.github.com/users/cleanflight/events{/privacy}","received_events_url":"https://api.github.com/users/cleanflight/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/cleanflight/cleanflight","description":"Clean-code version of the baseflight flight controller firmware","fork":false,"url":"https://api.github.com/repos/cleanflight/cleanflight","forks_url":"https://api.github.com/repos/cleanflight/cleanflight/forks","keys_url":"https://api.github.com/repos/cleanflight/cleanflight/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cleanflight/cleanflight/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cleanflight/cleanflight/teams","hooks_url":"https://api.github.com/repos/cleanflight/cleanflight/hooks","issue_events_url":"https://api.github.com/repos/cleanflight/cleanflight/issues/events{/number}","events_url":"https://api.github.com/repos/cleanflight/cleanflight/events","assignees_url":"https://api.github.com/repos/cleanflight/cleanflight/assignees{/user}","branches_url":"https://api.github.com/repos/cleanflight/cleanflight/branches{/branch}","tags_url":"https://api.github.com/repos/cleanflight/cleanflight/tags","blobs_url":"https://api.github.com/repos/cleanflight/cleanflight/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cleanflight/cleanflight/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cleanflight/cleanflight/git/refs{/sha}","trees_url":"https://api.github.com/repos/cleanflight/cleanflight/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cleanflight/cleanflight/statuses/{sha}","languages_url":"https://api.github.com/repos/cleanflight/cleanflight/languages","stargazers_url":"https://api.github.com/repos/cleanflight/cleanflight/stargazers","contributors_url":"https://api.github.com/repos/cleanflight/cleanflight/contributors","subscribers_url":"https://api.github.com/repos/cleanflight/cleanflight/subscribers","subscription_url":"https://api.github.com/repos/cleanflight/cleanflight/subscription","commits_url":"https://api.github.com/repos/cleanflight/cleanflight/commits{/sha}","git_commits_url":"https://api.github.com/repos/cleanflight/cleanflight/git/commits{/sha}","comments_url":"https://api.github.com/repos/cleanflight/cleanflight/comments{/number}","issue_comment_url":"https://api.github.com/repos/cleanflight/cleanflight/issues/comments{/number}","contents_url":"https://api.github.com/repos/cleanflight/cleanflight/contents/{+path}","compare_url":"https://api.github.com/repos/cleanflight/cleanflight/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cleanflight/cleanflight/merges","archive_url":"https://api.github.com/repos/cleanflight/cleanflight/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cleanflight/cleanflight/downloads","issues_url":"https://api.github.com/repos/cleanflight/cleanflight/issues{/number}","pulls_url":"https://api.github.com/repos/cleanflight/cleanflight/pulls{/number}","milestones_url":"https://api.github.com/repos/cleanflight/cleanflight/milestones{/number}","notifications_url":"https://api.github.com/repos/cleanflight/cleanflight/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cleanflight/cleanflight/labels{/name}","releases_url":"https://api.github.com/repos/cleanflight/cleanflight/releases{/id}","deployments_url":"https://api.github.com/repos/cleanflight/cleanflight/deployments","created_at":"2013-03-27T23:49:19Z","updated_at":"2016-12-12T11:34:57Z","pushed_at":"2016-12-11T01:50:58Z","git_url":"git://github.com/cleanflight/cleanflight.git","ssh_url":"git@github.com:cleanflight/cleanflight.git","clone_url":"https://github.com/cleanflight/cleanflight.git","svn_url":"https://github.com/cleanflight/cleanflight","homepage":"http://cleanflight.com","size":155003,"stargazers_count":1388,"watchers_count":1388,"language":"C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":1426,"mirror_url":null,"open_issues_count":538,"forks":1426,"open_issues":538,"watchers":1388,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/cleanflight/cleanflight/pulls/2531"},"html":{"href":"https://github.com/cleanflight/cleanflight/pull/2531"},"issue":{"href":"https://api.github.com/repos/cleanflight/cleanflight/issues/2531"},"comments":{"href":"https://api.github.com/repos/cleanflight/cleanflight/issues/2531/comments"},"review_comments":{"href":"https://api.github.com/repos/cleanflight/cleanflight/pulls/2531/comments"},"review_comment":{"href":"https://api.github.com/repos/cleanflight/cleanflight/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/cleanflight/cleanflight/pulls/2531/commits"},"statuses":{"href":"https://api.github.com/repos/cleanflight/cleanflight/statuses/458e669098692c989ebb44ae550f669bfda0c3cd"}}}}
{"actor":{"display_login":"unitware"}}