{"action":"created","issue":{"url":"https://api.github.com/repos/cleanflight/cleanflight/issues/2416","repository_url":"https://api.github.com/repos/cleanflight/cleanflight","labels_url":"https://api.github.com/repos/cleanflight/cleanflight/issues/2416/labels{/name}","comments_url":"https://api.github.com/repos/cleanflight/cleanflight/issues/2416/comments","events_url":"https://api.github.com/repos/cleanflight/cleanflight/issues/2416/events","html_url":"https://github.com/cleanflight/cleanflight/pull/2416","id":177851213,"number":2416,"title":"Merge some betaflight changes into CF.","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},"labels":[{"url":"https://api.github.com/repos/cleanflight/cleanflight/labels/experimental","name":"experimental","color":"207de5"},{"url":"https://api.github.com/repos/cleanflight/cleanflight/labels/in-progress","name":"in-progress","color":"009800"},{"url":"https://api.github.com/repos/cleanflight/cleanflight/labels/needs-additional-work","name":"needs-additional-work","color":"b60205"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":16,"created_at":"2016-09-19T17:48:59Z","updated_at":"2016-09-21T01:50:52Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/cleanflight/cleanflight/pulls/2416","html_url":"https://github.com/cleanflight/cleanflight/pull/2416","diff_url":"https://github.com/cleanflight/cleanflight/pull/2416.diff","patch_url":"https://github.com/cleanflight/cleanflight/pull/2416.patch"},"body":"Work-in-progress.\r\n\r\nStatus:\r\n* fixes bug with mag valid readings being overwritten when MPU9250 mag has no new data.\r\n* ~~there's an issue with the notch filter, some floating point error is occuring and the notch filter d1/d2 values end up as NaN.~~\r\n* compiles, arms, sensor readings look ok.\r\n* ~~unit tests currently broken.~~\r\n* lots of untested changes.\r\n* WARNING: various defaults changed too (lux float, gyro settings, etc).\r\n\r\nUpdate: \r\n* Flight tested LUX on a brushed version of an SPRacingF3EVO, acro and horizon tested.  No flight issues.\r\n\r\nUpdate:\r\n* The issue with d1/d2 ending up as NaN is because there is no check for infinity in the biquad filter, AFAICT this occurs when the `gyro_notch_hz` is set lower than `gyro_notch_cutoff`.  This is probably a bug in betaflight too.\r\n\r\nUpdate:\r\n* Unit tests updated and fixed.\r\n* Changes pushed after a code review, ~~No flight testing has been done on the updated code.~~\r\n\r\nUpdate:\r\n* Unrelated changed from this PR cherry-picked and merged to master.\r\n* Test flown again.\r\n\r\nI'm not fantastically happy with the state of the PR, but since I got this far I thought I'd share it.\r\n\r\nI started out porting the notch filter code over but in order to really use it we need to split up the tasks due to the changes with targetPidLooptime and targetGyroLooptime.\r\n\r\n\r\nI should also note that in looking at the Betaflight codebase and this I found a whole bunch of cruft lever over from various changes in betaflight.  Outdated comments, unused extern's, unused methods - nothing major though.  If I get time I'll push some commits to a PR for betaflight but my focus is here right now.\r\n\r\nThere is a new branch with the corresponding work-in-progress configurator changes here:\r\n\r\nhttps://github.com/cleanflight/cleanflight-configurator/tree/betaflight-merges-1\r\n"},"comment":{"url":"https://api.github.com/repos/cleanflight/cleanflight/issues/comments/248488382","html_url":"https://github.com/cleanflight/cleanflight/pull/2416#issuecomment-248488382","issue_url":"https://api.github.com/repos/cleanflight/cleanflight/issues/2416","id":248488382,"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},"created_at":"2016-09-21T01:50:52Z","updated_at":"2016-09-21T01:50:52Z","body":"@martinbudden yeah, you're right. I should branch more. :smile: I'm getting better.  what happens is I feel I'm close, then i do a bit more, then I feel i'm closer. then something else comes up, then i fix that too, then i feel I must be closer but then something else comes up, and so on. and before I know it it's way too big.  hence my initial reservation.  I need to abandon, stash, branch, fix the root cause and then continue.  it's hard though..."}}
{"actor":{"display_login":"hydra"}}