d-ronin / dRonin

The dRonin flight controller software.
http://dronin.org
Other
289 stars 167 forks source link

Flight: Correct mag logic such that mag works without baro. #2218

Closed jihlein closed 6 years ago

jihlein commented 6 years ago

While working with flightd on a board with only a mag (no baro), a sensor error was displayed. Investigation showed that the timeout variables for a mag sensor read were the same as for the baro sensor read, and not being correctly updated when no baro was present. This PR creates dedicated mag variables and updates them correctly.

Bench verified with flightd, but should be fine on other targets.

jihlein commented 6 years ago

Also tested on AQ32, works as intended.