{"action":"created","comment":{"url":"https://api.github.com/repos/cleanflight/cleanflight/pulls/comments/57723981","id":57723981,"diff_hunk":"@@ -29,33 +29,6 @@\n \n #include \"sensors/sensors.h\"\n \n-sensorSelectionConfig_t sensorSelectionConfig;\n-sensorAlignmentConfig_t sensorAlignmentConfig;\n-sensorTrims_t sensorTrims;\n-\n-static const pgRegistry_t sensorSelectionConfigRegistry PG_REGISTRY_SECTION =\n-{\n-    .base = (uint8_t *)&sensorSelectionConfig,\n-    .size = sizeof(sensorSelectionConfig),\n-    .pgn = PG_SENSOR_SELECTION_CONFIG,\n-    .format = 0,\n-    .flags = PGC_SYSTEM\n-};\n-\n-static const pgRegistry_t sensorAlignmentConfigRegistry PG_REGISTRY_SECTION =\n-{\n-    .base = (uint8_t *)&sensorAlignmentConfig,\n-    .size = sizeof(sensorAlignmentConfig),\n-    .pgn = PG_SENSOR_ALIGNMENT_CONFIG,\n-    .format = 0,\n-    .flags = PGC_SYSTEM\n-};\n-\n-static const pgRegistry_t sensorTrimsRegistry PG_REGISTRY_SECTION =\n-{\n-    .base = (uint8_t *)&sensorTrims,\n-    .size = sizeof(sensorTrims),\n-    .pgn = PG_SENSOR_TRIMS,\n-    .format = 0,\n-    .flags = PGC_SYSTEM\n-};\n+PG_REGISTER(sensorSelectionConfig_t, sensorSelectionConfig, PG_SENSOR_SELECTION_CONFIG, 0);\n+PG_REGISTER(sensorAlignmentConfig_t, sensorAlignmentConfig, PG_SENSOR_ALIGNMENT_CONFIG, 0);\n+PG_REGISTER(sensorTrims_t, sensorTrims, PG_SENSOR_TRIMS, 0);","path":"src/main/sensors/sensors.c","position":36,"original_position":36,"commit_id":"3c25d0f326d166937647073a9d63393594270b53","original_commit_id":"3c25d0f326d166937647073a9d63393594270b53","user":{"login":"hydra","id":57075,"avatar_url":"https://avatars.githubusercontent.com/u/57075?v=3","gravatar_id":"","url":"https://api.github.com/users/hydra","html_url":"https://github.com/hydra","followers_url":"https://api.github.com/users/hydra/followers","following_url":"https://api.github.com/users/hydra/following{/other_user}","gists_url":"https://api.github.com/users/hydra/gists{/gist_id}","starred_url":"https://api.github.com/users/hydra/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hydra/subscriptions","organizations_url":"https://api.github.com/users/hydra/orgs","repos_url":"https://api.github.com/users/hydra/repos","events_url":"https://api.github.com/users/hydra/events{/privacy}","received_events_url":"https://api.github.com/users/hydra/received_events","type":"User","site_admin":false},"body":"much more succinct. like it.","created_at":"2016-03-29T13:39:49Z","updated_at":"2016-03-29T13:39:49Z","html_url":"https://github.com/cleanflight/cleanflight/pull/1981#discussion_r57723981","pull_request_url":"https://api.github.com/repos/cleanflight/cleanflight/pulls/1981","_links":{"self":{"href":"https://api.github.com/repos/cleanflight/cleanflight/pulls/comments/57723981"},"html":{"href":"https://github.com/cleanflight/cleanflight/pull/1981#discussion_r57723981"},"pull_request":{"href":"https://api.github.com/repos/cleanflight/cleanflight/pulls/1981"}}},"pull_request":{"url":"https://api.github.com/repos/cleanflight/cleanflight/pulls/1981","id":64161563,"html_url":"https://github.com/cleanflight/cleanflight/pull/1981","diff_url":"https://github.com/cleanflight/cleanflight/pull/1981.diff","patch_url":"https://github.com/cleanflight/cleanflight/pull/1981.patch","issue_url":"https://api.github.com/repos/cleanflight/cleanflight/issues/1981","number":1981,"state":"open","locked":false,"title":"Config structure registration improved","user":{"login":"ledvinap","id":2318015,"avatar_url":"https://avatars.githubusercontent.com/u/2318015?v=3","gravatar_id":"","url":"https://api.github.com/users/ledvinap","html_url":"https://github.com/ledvinap","followers_url":"https://api.github.com/users/ledvinap/followers","following_url":"https://api.github.com/users/ledvinap/following{/other_user}","gists_url":"https://api.github.com/users/ledvinap/gists{/gist_id}","starred_url":"https://api.github.com/users/ledvinap/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ledvinap/subscriptions","organizations_url":"https://api.github.com/users/ledvinap/orgs","repos_url":"https://api.github.com/users/ledvinap/repos","events_url":"https://api.github.com/users/ledvinap/events{/privacy}","received_events_url":"https://api.github.com/users/ledvinap/received_events","type":"User","site_admin":false},"body":"- use `__pg_registry_start` and  `__pg_registry_end` to find registered\r\n  config structures\r\n- hide config registration into macro\r\n- use inserted gnu ld section on unittests","created_at":"2016-03-25T13:23:19Z","updated_at":"2016-03-29T13:39:49Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9c47a5f24870e8f2af3832bd982475e3ae75ee6b","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/cleanflight/cleanflight/pulls/1981/commits","review_comments_url":"https://api.github.com/repos/cleanflight/cleanflight/pulls/1981/comments","review_comment_url":"https://api.github.com/repos/cleanflight/cleanflight/pulls/comments{/number}","comments_url":"https://api.github.com/repos/cleanflight/cleanflight/issues/1981/comments","statuses_url":"https://api.github.com/repos/cleanflight/cleanflight/statuses/3c25d0f326d166937647073a9d63393594270b53","head":{"label":"ledvinap:configuration-storage","ref":"configuration-storage","sha":"3c25d0f326d166937647073a9d63393594270b53","user":{"login":"ledvinap","id":2318015,"avatar_url":"https://avatars.githubusercontent.com/u/2318015?v=3","gravatar_id":"","url":"https://api.github.com/users/ledvinap","html_url":"https://github.com/ledvinap","followers_url":"https://api.github.com/users/ledvinap/followers","following_url":"https://api.github.com/users/ledvinap/following{/other_user}","gists_url":"https://api.github.com/users/ledvinap/gists{/gist_id}","starred_url":"https://api.github.com/users/ledvinap/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ledvinap/subscriptions","organizations_url":"https://api.github.com/users/ledvinap/orgs","repos_url":"https://api.github.com/users/ledvinap/repos","events_url":"https://api.github.com/users/ledvinap/events{/privacy}","received_events_url":"https://api.github.com/users/ledvinap/received_events","type":"User","site_admin":false},"repo":{"id":25044876,"name":"cleanflight","full_name":"ledvinap/cleanflight","owner":{"login":"ledvinap","id":2318015,"avatar_url":"https://avatars.githubusercontent.com/u/2318015?v=3","gravatar_id":"","url":"https://api.github.com/users/ledvinap","html_url":"https://github.com/ledvinap","followers_url":"https://api.github.com/users/ledvinap/followers","following_url":"https://api.github.com/users/ledvinap/following{/other_user}","gists_url":"https://api.github.com/users/ledvinap/gists{/gist_id}","starred_url":"https://api.github.com/users/ledvinap/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ledvinap/subscriptions","organizations_url":"https://api.github.com/users/ledvinap/orgs","repos_url":"https://api.github.com/users/ledvinap/repos","events_url":"https://api.github.com/users/ledvinap/events{/privacy}","received_events_url":"https://api.github.com/users/ledvinap/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ledvinap/cleanflight","description":"Clean-code version of the baseflight flight controller","fork":true,"url":"https://api.github.com/repos/ledvinap/cleanflight","forks_url":"https://api.github.com/repos/ledvinap/cleanflight/forks","keys_url":"https://api.github.com/repos/ledvinap/cleanflight/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ledvinap/cleanflight/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ledvinap/cleanflight/teams","hooks_url":"https://api.github.com/repos/ledvinap/cleanflight/hooks","issue_events_url":"https://api.github.com/repos/ledvinap/cleanflight/issues/events{/number}","events_url":"https://api.github.com/repos/ledvinap/cleanflight/events","assignees_url":"https://api.github.com/repos/ledvinap/cleanflight/assignees{/user}","branches_url":"https://api.github.com/repos/ledvinap/cleanflight/branches{/branch}","tags_url":"https://api.github.com/repos/ledvinap/cleanflight/tags","blobs_url":"https://api.github.com/repos/ledvinap/cleanflight/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ledvinap/cleanflight/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ledvinap/cleanflight/git/refs{/sha}","trees_url":"https://api.github.com/repos/ledvinap/cleanflight/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ledvinap/cleanflight/statuses/{sha}","languages_url":"https://api.github.com/repos/ledvinap/cleanflight/languages","stargazers_url":"https://api.github.com/repos/ledvinap/cleanflight/stargazers","contributors_url":"https://api.github.com/repos/ledvinap/cleanflight/contributors","subscribers_url":"https://api.github.com/repos/ledvinap/cleanflight/subscribers","subscription_url":"https://api.github.com/repos/ledvinap/cleanflight/subscription","commits_url":"https://api.github.com/repos/ledvinap/cleanflight/commits{/sha}","git_commits_url":"https://api.github.com/repos/ledvinap/cleanflight/git/commits{/sha}","comments_url":"https://api.github.com/repos/ledvinap/cleanflight/comments{/number}","issue_comment_url":"https://api.github.com/repos/ledvinap/cleanflight/issues/comments{/number}","contents_url":"https://api.github.com/repos/ledvinap/cleanflight/contents/{+path}","compare_url":"https://api.github.com/repos/ledvinap/cleanflight/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ledvinap/cleanflight/merges","archive_url":"https://api.github.com/repos/ledvinap/cleanflight/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ledvinap/cleanflight/downloads","issues_url":"https://api.github.com/repos/ledvinap/cleanflight/issues{/number}","pulls_url":"https://api.github.com/repos/ledvinap/cleanflight/pulls{/number}","milestones_url":"https://api.github.com/repos/ledvinap/cleanflight/milestones{/number}","notifications_url":"https://api.github.com/repos/ledvinap/cleanflight/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ledvinap/cleanflight/labels{/name}","releases_url":"https://api.github.com/repos/ledvinap/cleanflight/releases{/id}","deployments_url":"https://api.github.com/repos/ledvinap/cleanflight/deployments","created_at":"2014-10-10T17:00:52Z","updated_at":"2016-01-12T14:33:41Z","pushed_at":"2016-03-29T12:04:58Z","git_url":"git://github.com/ledvinap/cleanflight.git","ssh_url":"git@github.com:ledvinap/cleanflight.git","clone_url":"https://github.com/ledvinap/cleanflight.git","svn_url":"https://github.com/ledvinap/cleanflight","homepage":"","size":38970,"stargazers_count":3,"watchers_count":3,"language":"C","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":0,"forks":4,"open_issues":0,"watchers":3,"default_branch":"local"}},"base":{"label":"cleanflight:configuration-storage","ref":"configuration-storage","sha":"2c5363903e96bb0309d5a4a7f0706783be95de46","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-03-28T09:25:55Z","pushed_at":"2016-03-29T12:04: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":93129,"stargazers_count":971,"watchers_count":971,"language":"C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":949,"mirror_url":null,"open_issues_count":488,"forks":949,"open_issues":488,"watchers":971,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/cleanflight/cleanflight/pulls/1981"},"html":{"href":"https://github.com/cleanflight/cleanflight/pull/1981"},"issue":{"href":"https://api.github.com/repos/cleanflight/cleanflight/issues/1981"},"comments":{"href":"https://api.github.com/repos/cleanflight/cleanflight/issues/1981/comments"},"review_comments":{"href":"https://api.github.com/repos/cleanflight/cleanflight/pulls/1981/comments"},"review_comment":{"href":"https://api.github.com/repos/cleanflight/cleanflight/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/cleanflight/cleanflight/pulls/1981/commits"},"statuses":{"href":"https://api.github.com/repos/cleanflight/cleanflight/statuses/3c25d0f326d166937647073a9d63393594270b53"}}}}