{"action":"created","comment":{"url":"https://api.github.com/repos/cleanflight/cleanflight/pulls/comments/52828311","id":52828311,"diff_hunk":"@@ -133,6 +133,7 @@ Re-apply any new defaults as desired.\n | `auto_disarm_delay`             |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        | 0      | 60     | 5             | Master       | UINT8    |\n | `small_angle`                   | If the copter tilt angle exceed this value the copter will refuse to arm. default is 25°.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | 0      | 180    | 25            | Master       | UINT8    |\n | `pid_at_min_throttle`           | If enabled, the copter will process the pid algorithm at minimum throttle.  Cannot be used when `retarded_arm` is enabled.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             | OFF    | ON     | ON            | Master       | UINT8    |\n+| `airmode_saturation_limit`      | When air mode is enabled this will act as a \"crash detection\". It prevents too much compensation for very high errors what can cause spazzing out. 0 = no limit 100 is always limited during saturation.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | 0      | 100    | 50            | Master       | UINT8    |","path":"docs/Cli.md","position":4,"original_position":4,"commit_id":"9e3351f5b6001e3914725de82e52c0fac47b73c5","original_commit_id":"478bcbbffa557fae61c411037f700b63e15b99b0","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":"Was wrong - output range is 16 bit.\r\n\r\nhttps://github.com/cleanflight/cleanflight/blob/master/src/main/sensors/gyro.c#L128\r\n\r\ngyro offset must be applied with saturation - there is overflow with 16bit values.\r\n\r\nAlso using biquad filter may result in overflow (https://github.com/cleanflight/cleanflight/blob/master/src/main/sensors/gyro.c#L145)\r\n\r\nIMO it would be best to either use int32 for gyroADC or to scale gyro reading down (divide by 2 or 4) so that there is some safety margin.\r\n","created_at":"2016-02-13T14:16:36Z","updated_at":"2016-02-13T14:16:36Z","html_url":"https://github.com/cleanflight/cleanflight/pull/1766#discussion_r52828311","pull_request_url":"https://api.github.com/repos/cleanflight/cleanflight/pulls/1766","_links":{"self":{"href":"https://api.github.com/repos/cleanflight/cleanflight/pulls/comments/52828311"},"html":{"href":"https://github.com/cleanflight/cleanflight/pull/1766#discussion_r52828311"},"pull_request":{"href":"https://api.github.com/repos/cleanflight/cleanflight/pulls/1766"}}},"pull_request":{"url":"https://api.github.com/repos/cleanflight/cleanflight/pulls/1766","id":58376039,"html_url":"https://github.com/cleanflight/cleanflight/pull/1766","diff_url":"https://github.com/cleanflight/cleanflight/pull/1766.diff","patch_url":"https://github.com/cleanflight/cleanflight/pull/1766.patch","issue_url":"https://api.github.com/repos/cleanflight/cleanflight/issues/1766","number":1766,"state":"closed","locked":false,"title":"Airmode Implementation / Acro optimised mixer and PID controllers","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":"replaces PR #1754 ","created_at":"2016-02-05T01:17:57Z","updated_at":"2016-02-13T14:16:36Z","closed_at":"2016-02-13T12:44:21Z","merged_at":"2016-02-13T12:44:21Z","merge_commit_sha":"b0bb48f2e3f30d325c03c3826225d3782f3a0880","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/cleanflight/cleanflight/pulls/1766/commits","review_comments_url":"https://api.github.com/repos/cleanflight/cleanflight/pulls/1766/comments","review_comment_url":"https://api.github.com/repos/cleanflight/cleanflight/pulls/comments{/number}","comments_url":"https://api.github.com/repos/cleanflight/cleanflight/issues/1766/comments","statuses_url":"https://api.github.com/repos/cleanflight/cleanflight/statuses/9e3351f5b6001e3914725de82e52c0fac47b73c5","head":{"label":"cleanflight:airmode","ref":"airmode","sha":"9e3351f5b6001e3914725de82e52c0fac47b73c5","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-02-12T19:30:06Z","pushed_at":"2016-02-13T12:53:25Z","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":90417,"stargazers_count":820,"watchers_count":820,"language":"C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":840,"mirror_url":null,"open_issues_count":418,"forks":840,"open_issues":418,"watchers":820,"default_branch":"master"}},"base":{"label":"cleanflight:master","ref":"master","sha":"688931d5234a54d3d548e40c2ec4d0a54f8ed907","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-02-12T19:30:06Z","pushed_at":"2016-02-13T12:53:25Z","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":90417,"stargazers_count":820,"watchers_count":820,"language":"C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":840,"mirror_url":null,"open_issues_count":418,"forks":840,"open_issues":418,"watchers":820,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/cleanflight/cleanflight/pulls/1766"},"html":{"href":"https://github.com/cleanflight/cleanflight/pull/1766"},"issue":{"href":"https://api.github.com/repos/cleanflight/cleanflight/issues/1766"},"comments":{"href":"https://api.github.com/repos/cleanflight/cleanflight/issues/1766/comments"},"review_comments":{"href":"https://api.github.com/repos/cleanflight/cleanflight/pulls/1766/comments"},"review_comment":{"href":"https://api.github.com/repos/cleanflight/cleanflight/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/cleanflight/cleanflight/pulls/1766/commits"},"statuses":{"href":"https://api.github.com/repos/cleanflight/cleanflight/statuses/9e3351f5b6001e3914725de82e52c0fac47b73c5"}}}}