Adds imu calibration

This commit is contained in:
Rune Harlyk
2025-12-24 12:53:20 +01:00
parent e22ac69e9b
commit 3be08a31ed
6 changed files with 82 additions and 1 deletions
+11
View File
@@ -185,4 +185,15 @@ void Peripherals::getSonarResult(JsonVariant &root) {
array[0] = _left_distance;
array[1] = _right_distance;
#endif
}
bool Peripherals::calibrateIMU() {
#if FT_ENABLED(USE_MPU6050 || USE_BNO055)
beginTransaction();
bool result = _imu.calibrate();
endTransaction();
return result;
#else
return false;
#endif
}