{"action":"created","comment":{"url":"https://api.github.com/repos/betaflight/betaflight/pulls/comments/193405753","pull_request_review_id":126369852,"id":193405753,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5MzQwNTc1Mw==","diff_hunk":"@@ -259,9 +265,14 @@ FAST_CODE uint8_t processRcInterpolation(void)\n }\n \n #ifdef USE_RC_SMOOTHING_FILTER\n-uint8_t calcRcSmoothingCutoff(float avgRxFrameRate, float filterBaseline)\n+uint16_t calcRcSmoothingCutoff(float avgRxFrameRate, float filterBaseline, bool pt1)\n {\n-    return lrintf(filterBaseline / (avgRxFrameRate / RC_SMOOTHING_FILTER_AUTO_MS));\n+    float cutoff = filterBaseline / (avgRxFrameRate / RC_SMOOTHING_FILTER_AUTO_MS);\n+    if (pt1) { // Convert to a PT1 cutoff (2pi * cutoff)^2 / 500 / 2pi;\n+        const float twoPi = 2.0f * M_PIf;\n+        cutoff = (sq(cutoff * twoPi) / 500) / twoPi;","path":"src/main/fc/fc_rc.c","position":30,"original_position":30,"commit_id":"e49c10b573a2e6c68c66624463fbf861410e7032","original_commit_id":"e49c10b573a2e6c68c66624463fbf861410e7032","user":{"login":"DieHertz","id":1427681,"node_id":"MDQ6VXNlcjE0Mjc2ODE=","avatar_url":"https://avatars1.githubusercontent.com/u/1427681?v=4","gravatar_id":"","url":"https://api.github.com/users/DieHertz","html_url":"https://github.com/DieHertz","followers_url":"https://api.github.com/users/DieHertz/followers","following_url":"https://api.github.com/users/DieHertz/following{/other_user}","gists_url":"https://api.github.com/users/DieHertz/gists{/gist_id}","starred_url":"https://api.github.com/users/DieHertz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DieHertz/subscriptions","organizations_url":"https://api.github.com/users/DieHertz/orgs","repos_url":"https://api.github.com/users/DieHertz/repos","events_url":"https://api.github.com/users/DieHertz/events{/privacy}","received_events_url":"https://api.github.com/users/DieHertz/received_events","type":"User","site_admin":false},"body":"I don't think what's the intention, what's the superiority of `500 rad/s` vs `80 Hz` when both are take arbitrarily.","created_at":"2018-06-06T13:19:05Z","updated_at":"2018-06-06T13:19:05Z","html_url":"https://github.com/betaflight/betaflight/pull/6051#discussion_r193405753","pull_request_url":"https://api.github.com/repos/betaflight/betaflight/pulls/6051","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/betaflight/betaflight/pulls/comments/193405753"},"html":{"href":"https://github.com/betaflight/betaflight/pull/6051#discussion_r193405753"},"pull_request":{"href":"https://api.github.com/repos/betaflight/betaflight/pulls/6051"}},"in_reply_to_id":193291122},"pull_request":{"url":"https://api.github.com/repos/betaflight/betaflight/pulls/6051","id":192860647,"node_id":"MDExOlB1bGxSZXF1ZXN0MTkyODYwNjQ3","html_url":"https://github.com/betaflight/betaflight/pull/6051","diff_url":"https://github.com/betaflight/betaflight/pull/6051.diff","patch_url":"https://github.com/betaflight/betaflight/pull/6051.patch","issue_url":"https://api.github.com/repos/betaflight/betaflight/issues/6051","number":6051,"state":"open","locked":false,"title":"RC smoothing: improve rx frame rate detection, add rc_smoothing_info cli command","user":{"login":"etracer65","id":17088539,"node_id":"MDQ6VXNlcjE3MDg4NTM5","avatar_url":"https://avatars1.githubusercontent.com/u/17088539?v=4","gravatar_id":"","url":"https://api.github.com/users/etracer65","html_url":"https://github.com/etracer65","followers_url":"https://api.github.com/users/etracer65/followers","following_url":"https://api.github.com/users/etracer65/following{/other_user}","gists_url":"https://api.github.com/users/etracer65/gists{/gist_id}","starred_url":"https://api.github.com/users/etracer65/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/etracer65/subscriptions","organizations_url":"https://api.github.com/users/etracer65/orgs","repos_url":"https://api.github.com/users/etracer65/repos","events_url":"https://api.github.com/users/etracer65/events{/privacy}","received_events_url":"https://api.github.com/users/etracer65/received_events","type":"User","site_admin":false},"body":"Improved the rx frame rate detection/training by delaying calculation to avoid loop time jitter during flight controller initialization.\r\n\r\nFor auto cutoffs calculate a value appropriate for BIQUAD or PT1 depending on the configuration.\r\n\r\nAdded a new `rc_smoothing_info` cli command to display internal details about its operation.\r\n```\r\n# rc_smoothing_info\r\n# RC Smoothing Type: FILTER\r\n# Detected RX frame rate: 8.981ms\r\n# Auto input cutoff: 50hz\r\n# Active input cutoff: 50hz (auto)\r\n# Auto derivative cutoff: 60hz\r\n# Active derivative cutoff: 58hz (manual)\r\n```","created_at":"2018-06-05T23:11:24Z","updated_at":"2018-06-06T13:19:05Z","closed_at":null,"merged_at":null,"merge_commit_sha":"93ed22016de1c315521fa9936d695380857ea63a","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":668857686,"node_id":"MDU6TGFiZWw2Njg4NTc2ODY=","url":"https://api.github.com/repos/betaflight/betaflight/labels/RN:%20IMPROVEMENT","name":"RN: IMPROVEMENT","color":"f9d0c4","default":false}],"milestone":{"url":"https://api.github.com/repos/betaflight/betaflight/milestones/7","html_url":"https://github.com/betaflight/betaflight/milestone/7","labels_url":"https://api.github.com/repos/betaflight/betaflight/milestones/7/labels","id":2278188,"node_id":"MDk6TWlsZXN0b25lMjI3ODE4OA==","number":7,"title":"Betaflight v3.4","description":"","creator":{"login":"blckmn","id":6168871,"node_id":"MDQ6VXNlcjYxNjg4NzE=","avatar_url":"https://avatars2.githubusercontent.com/u/6168871?v=4","gravatar_id":"","url":"https://api.github.com/users/blckmn","html_url":"https://github.com/blckmn","followers_url":"https://api.github.com/users/blckmn/followers","following_url":"https://api.github.com/users/blckmn/following{/other_user}","gists_url":"https://api.github.com/users/blckmn/gists{/gist_id}","starred_url":"https://api.github.com/users/blckmn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blckmn/subscriptions","organizations_url":"https://api.github.com/users/blckmn/orgs","repos_url":"https://api.github.com/users/blckmn/repos","events_url":"https://api.github.com/users/blckmn/events{/privacy}","received_events_url":"https://api.github.com/users/blckmn/received_events","type":"User","site_admin":false},"open_issues":39,"closed_issues":312,"state":"open","created_at":"2017-01-25T19:22:55Z","updated_at":"2018-06-06T12:43:36Z","due_on":"2018-07-01T07:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/betaflight/betaflight/pulls/6051/commits","review_comments_url":"https://api.github.com/repos/betaflight/betaflight/pulls/6051/comments","review_comment_url":"https://api.github.com/repos/betaflight/betaflight/pulls/comments{/number}","comments_url":"https://api.github.com/repos/betaflight/betaflight/issues/6051/comments","statuses_url":"https://api.github.com/repos/betaflight/betaflight/statuses/e49c10b573a2e6c68c66624463fbf861410e7032","head":{"label":"etracer65:rc_smoothing_training","ref":"rc_smoothing_training","sha":"e49c10b573a2e6c68c66624463fbf861410e7032","user":{"login":"etracer65","id":17088539,"node_id":"MDQ6VXNlcjE3MDg4NTM5","avatar_url":"https://avatars1.githubusercontent.com/u/17088539?v=4","gravatar_id":"","url":"https://api.github.com/users/etracer65","html_url":"https://github.com/etracer65","followers_url":"https://api.github.com/users/etracer65/followers","following_url":"https://api.github.com/users/etracer65/following{/other_user}","gists_url":"https://api.github.com/users/etracer65/gists{/gist_id}","starred_url":"https://api.github.com/users/etracer65/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/etracer65/subscriptions","organizations_url":"https://api.github.com/users/etracer65/orgs","repos_url":"https://api.github.com/users/etracer65/repos","events_url":"https://api.github.com/users/etracer65/events{/privacy}","received_events_url":"https://api.github.com/users/etracer65/received_events","type":"User","site_admin":false},"repo":{"id":126493168,"node_id":"MDEwOlJlcG9zaXRvcnkxMjY0OTMxNjg=","name":"betaflight","full_name":"etracer65/betaflight","owner":{"login":"etracer65","id":17088539,"node_id":"MDQ6VXNlcjE3MDg4NTM5","avatar_url":"https://avatars1.githubusercontent.com/u/17088539?v=4","gravatar_id":"","url":"https://api.github.com/users/etracer65","html_url":"https://github.com/etracer65","followers_url":"https://api.github.com/users/etracer65/followers","following_url":"https://api.github.com/users/etracer65/following{/other_user}","gists_url":"https://api.github.com/users/etracer65/gists{/gist_id}","starred_url":"https://api.github.com/users/etracer65/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/etracer65/subscriptions","organizations_url":"https://api.github.com/users/etracer65/orgs","repos_url":"https://api.github.com/users/etracer65/repos","events_url":"https://api.github.com/users/etracer65/events{/privacy}","received_events_url":"https://api.github.com/users/etracer65/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/etracer65/betaflight","description":null,"fork":true,"url":"https://api.github.com/repos/etracer65/betaflight","forks_url":"https://api.github.com/repos/etracer65/betaflight/forks","keys_url":"https://api.github.com/repos/etracer65/betaflight/keys{/key_id}","collaborators_url":"https://api.github.com/repos/etracer65/betaflight/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/etracer65/betaflight/teams","hooks_url":"https://api.github.com/repos/etracer65/betaflight/hooks","issue_events_url":"https://api.github.com/repos/etracer65/betaflight/issues/events{/number}","events_url":"https://api.github.com/repos/etracer65/betaflight/events","assignees_url":"https://api.github.com/repos/etracer65/betaflight/assignees{/user}","branches_url":"https://api.github.com/repos/etracer65/betaflight/branches{/branch}","tags_url":"https://api.github.com/repos/etracer65/betaflight/tags","blobs_url":"https://api.github.com/repos/etracer65/betaflight/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/etracer65/betaflight/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/etracer65/betaflight/git/refs{/sha}","trees_url":"https://api.github.com/repos/etracer65/betaflight/git/trees{/sha}","statuses_url":"https://api.github.com/repos/etracer65/betaflight/statuses/{sha}","languages_url":"https://api.github.com/repos/etracer65/betaflight/languages","stargazers_url":"https://api.github.com/repos/etracer65/betaflight/stargazers","contributors_url":"https://api.github.com/repos/etracer65/betaflight/contributors","subscribers_url":"https://api.github.com/repos/etracer65/betaflight/subscribers","subscription_url":"https://api.github.com/repos/etracer65/betaflight/subscription","commits_url":"https://api.github.com/repos/etracer65/betaflight/commits{/sha}","git_commits_url":"https://api.github.com/repos/etracer65/betaflight/git/commits{/sha}","comments_url":"https://api.github.com/repos/etracer65/betaflight/comments{/number}","issue_comment_url":"https://api.github.com/repos/etracer65/betaflight/issues/comments{/number}","contents_url":"https://api.github.com/repos/etracer65/betaflight/contents/{+path}","compare_url":"https://api.github.com/repos/etracer65/betaflight/compare/{base}...{head}","merges_url":"https://api.github.com/repos/etracer65/betaflight/merges","archive_url":"https://api.github.com/repos/etracer65/betaflight/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/etracer65/betaflight/downloads","issues_url":"https://api.github.com/repos/etracer65/betaflight/issues{/number}","pulls_url":"https://api.github.com/repos/etracer65/betaflight/pulls{/number}","milestones_url":"https://api.github.com/repos/etracer65/betaflight/milestones{/number}","notifications_url":"https://api.github.com/repos/etracer65/betaflight/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/etracer65/betaflight/labels{/name}","releases_url":"https://api.github.com/repos/etracer65/betaflight/releases{/id}","deployments_url":"https://api.github.com/repos/etracer65/betaflight/deployments","created_at":"2018-03-23T14:02:13Z","updated_at":"2018-06-05T15:44:07Z","pushed_at":"2018-06-05T22:25:27Z","git_url":"git://github.com/etracer65/betaflight.git","ssh_url":"git@github.com:etracer65/betaflight.git","clone_url":"https://github.com/etracer65/betaflight.git","svn_url":"https://github.com/etracer65/betaflight","homepage":"","size":225975,"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":"445f9d6ad489d68be0584106c8ada10eaeb75b42","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","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},"private":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-06-06T06:34:27Z","pushed_at":"2018-06-06T12:43:37Z","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":226003,"stargazers_count":1709,"watchers_count":1709,"language":"C","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":853,"mirror_url":null,"archived":false,"open_issues_count":205,"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":853,"open_issues":205,"watchers":1709,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/betaflight/betaflight/pulls/6051"},"html":{"href":"https://github.com/betaflight/betaflight/pull/6051"},"issue":{"href":"https://api.github.com/repos/betaflight/betaflight/issues/6051"},"comments":{"href":"https://api.github.com/repos/betaflight/betaflight/issues/6051/comments"},"review_comments":{"href":"https://api.github.com/repos/betaflight/betaflight/pulls/6051/comments"},"review_comment":{"href":"https://api.github.com/repos/betaflight/betaflight/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/betaflight/betaflight/pulls/6051/commits"},"statuses":{"href":"https://api.github.com/repos/betaflight/betaflight/statuses/e49c10b573a2e6c68c66624463fbf861410e7032"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"DieHertz"}}