1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-15 04:15:44 +03:00

Improved compass calibration.

This commit is contained in:
mikeller 2019-11-16 23:54:37 +13:00
parent cfa4055132
commit a045a9c672
11 changed files with 79 additions and 45 deletions

View file

@ -62,6 +62,7 @@
#include "sensors/acceleration.h"
#include "sensors/barometer.h"
#include "sensors/battery.h"
#include "sensors/compass.h"
#include "sensors/gyro.h"
#include "rc_controls.h"
@ -283,11 +284,14 @@ void processRcStickPositions()
}
#endif
#if defined(USE_MAG)
if (rcSticks == THR_HI + YAW_HI + PIT_LO + ROL_CE) {
// Calibrating Mag
ENABLE_STATE(CALIBRATE_MAG);
compassStartCalibration();
return;
}
#endif
if (FLIGHT_MODE(ANGLE_MODE|HORIZON_MODE)) {