New LED behavior (active-low, PC15=LED1, PC14=LED2): Disarmed, IMU OK : LED1 solid ON + LED2 off Armed : LED1 solid ON + LED2 solid ON Tilt fault : LED1 blink 1Hz + LED2 blink 1Hz IMU error : LED1 blink 1Hz + LED2 solid ON Rule: solid = good, slow blink (~1Hz) = needs attention. Removed the confusing fast-blink-at-5Hz-for-error and the baro-flash-every-5s patterns. status_update() signature changed: baro_ok → armed + tilt_fault so the LED pattern can reflect arm state directly. Closes #22. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
20 lines
623 B
C
20 lines
623 B
C
#ifndef STATUS_H
|
|
#define STATUS_H
|
|
#include <stdint.h>
|
|
void status_init(void);
|
|
void status_boot_beep(void);
|
|
/*
|
|
* status_update() — call every main loop iteration.
|
|
* Controls LED1 (PC15) and LED2 (PC14), both active-low.
|
|
*
|
|
* Solid ON = good (normal operation)
|
|
* Slow blink (~1 Hz) = needs attention (error or fault)
|
|
*
|
|
* LED1 solid + LED2 off → disarmed, IMU OK
|
|
* LED1 solid + LED2 solid → armed
|
|
* Both slow blink → tilt fault
|
|
* LED1 slow blink + LED2 solid → IMU error (solid LED2 = always-on indicator)
|
|
*/
|
|
void status_update(uint32_t tick, int imu_ok, int armed, int tilt_fault);
|
|
#endif
|