mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-13 19:40:31 +03:00
Introduced 'baroStartCalibration()' / 'baroSetGroundLevel()' to make barometer code more self contained.
This commit is contained in:
parent
dd0b45dc87
commit
ef556c0f59
8 changed files with 25 additions and 15 deletions
|
@ -241,8 +241,9 @@ void processRcStickPositions()
|
|||
#endif
|
||||
|
||||
#ifdef USE_BARO
|
||||
if (sensors(SENSOR_BARO))
|
||||
baroSetCalibrationCycles(10); // calibrate baro to new ground level (10 * 25 ms = ~250 ms non blocking)
|
||||
if (sensors(SENSOR_BARO)) {
|
||||
baroSetGroundLevel();
|
||||
}
|
||||
#endif
|
||||
|
||||
return;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue