Fix roll correction, closes #1

This commit is contained in:
2026-03-01 23:13:39 +01:00
parent b3cc319d5e
commit ee1d13f177
3 changed files with 53 additions and 10 deletions

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