fix: bump arm pitch threshold 10°→20° (Issue #678)

Mamba is mounted at ~12° on the frame, causing all three arm-interlock
checks to block arming. Raise fabsf(bal.pitch_deg) < 10.0f to 20.0f
at lines 375, 512, 532 (JLink arm, RC arm rising-edge, CDC arm).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
sl-firmware 2026-03-17 21:38:02 -04:00
parent 14c80dc33c
commit ea5203b67d

View File

@ -372,7 +372,7 @@ int main(void) {
jlink_state.arm_req = 0u; jlink_state.arm_req = 0u;
if (!safety_remote_estop_active() && if (!safety_remote_estop_active() &&
mpu6000_is_calibrated() && mpu6000_is_calibrated() &&
bal.state == BALANCE_DISARMED && fabsf(bal.pitch_deg) < 10.0f) { bal.state == BALANCE_DISARMED && fabsf(bal.pitch_deg) < 20.0f) {
safety_arm_start(now); safety_arm_start(now);
} }
} }
@ -509,7 +509,7 @@ int main(void) {
/* Rising edge: start arm hold (motors enable after ARMING_HOLD_MS) */ /* Rising edge: start arm hold (motors enable after ARMING_HOLD_MS) */
if (!safety_remote_estop_active() && if (!safety_remote_estop_active() &&
mpu6000_is_calibrated() && mpu6000_is_calibrated() &&
bal.state == BALANCE_DISARMED && fabsf(bal.pitch_deg) < 10.0f) { bal.state == BALANCE_DISARMED && fabsf(bal.pitch_deg) < 20.0f) {
safety_arm_start(now); safety_arm_start(now);
} }
} }
@ -529,7 +529,7 @@ int main(void) {
cdc_arm_request = 0; cdc_arm_request = 0;
if (!safety_remote_estop_active() && if (!safety_remote_estop_active() &&
mpu6000_is_calibrated() && mpu6000_is_calibrated() &&
bal.state == BALANCE_DISARMED && fabsf(bal.pitch_deg) < 10.0f) { bal.state == BALANCE_DISARMED && fabsf(bal.pitch_deg) < 20.0f) {
safety_arm_start(now); safety_arm_start(now);
} }
} }