feat(safety): IWDG watchdog, arm hold interlock, tilt alert (bd-3qh) #4
Loading…
x
Reference in New Issue
Block a user
No description provided.
Delete Branch "sl-controls/bd-3qh-safety-systems"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
safety_rc_alive()ready; disarm guard removed when CRSF is wiredNew files
include/safety.h— APIsrc/safety.c— IWDG + arm interlock + fault alertNotes
Closes bd-3qh
Add USB command interface for live PID gain adjustment without reflashing: P<kp> I<ki> D<kd> T<setpoint_deg> M<max_speed> ? Command parsing runs in main loop (sscanf-safe), not in USB IRQ. USB IRQ copies command to shared volatile buffer (cdc_cmd_buf), sets flag. Acknowledgement echoes current gains: {"kp":...,"ki":...,"kd":...} Bounds checking: kp 0-500, ki/kd 0-50, setpoint ±20°, max_speed 0-1000. Gains validated before write — silently ignored if out of range. Telemetry updated from raw counts to physical tuning signals: pitch (°x10), pitch_rate (°/s x10), error (°x10), integral (x10 for windup monitoring), motor_cmd, state Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>e181dcc786to4dd52b47dc