1
0
Fork 0
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:
mikeller 2019-11-16 12:48:47 +13:00
parent dd0b45dc87
commit ef556c0f59
8 changed files with 25 additions and 15 deletions

View file

@ -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;