From ea5203b67df26d0edb7b8d55d2771f94cb62a880 Mon Sep 17 00:00:00 2001 From: sl-firmware Date: Tue, 17 Mar 2026 21:38:02 -0400 Subject: [PATCH] =?UTF-8?q?fix:=20bump=20arm=20pitch=20threshold=2010?= =?UTF-8?q?=C2=B0=E2=86=9220=C2=B0=20(Issue=20#678)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- src/main.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main.c b/src/main.c index 6451f75..a8a23d1 100644 --- a/src/main.c +++ b/src/main.c @@ -372,7 +372,7 @@ int main(void) { jlink_state.arm_req = 0u; if (!safety_remote_estop_active() && 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); } } @@ -509,7 +509,7 @@ int main(void) { /* Rising edge: start arm hold (motors enable after ARMING_HOLD_MS) */ if (!safety_remote_estop_active() && 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); } } @@ -529,7 +529,7 @@ int main(void) { cdc_arm_request = 0; if (!safety_remote_estop_active() && 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); } }