Fix roll correction, closes #1

This commit is contained in:
nikrozman committed 2026-03-01 23:13:39 +01:00
1 parent b3cc319d5e
commit ee1d13f177
3 files changed
+53 -10

No files matched your search

+2
View File
@@ -35,6 +35,8 @@ void calibrateGyroBias() {
biasGZ = (float)(sz/BIAS_SAMPLES);
calTempC = readIMUTemp();
angleX = angleY = accumX = accumY = 0.0f;
// Seed gravity estimate from current accel so projection is correct immediately
gravX = imu.readFloatAccelX(); gravY = imu.readFloatAccelY(); gravZ = imu.readFloatAccelZ();
#ifdef FEATURE_TELEMETRY
statRecalCount++;