✨ Adds imu calibration
This commit is contained in:
@@ -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
|
||||
}
|
||||
Reference in New Issue
Block a user