|
|
3e60d7552a
|
feat: Battery voltage telemetry and LVC (Issue #613)
- Add include/lvc.h + src/lvc.c: 3-stage low voltage cutoff state machine
WARNING 21.0V: MELODY_LOW_BATTERY buzzer, full motor power
CRITICAL 19.8V: double-beep every 10s, 50% motor power scaling
CUTOFF 18.6V: MELODY_ERROR one-shot, motors disabled + latched
200mV hysteresis on recovery; CUTOFF latched until reboot
- Add JLINK_TLM_LVC (0x8B, 4 bytes): voltage_mv, percent, protection_state
jlink_send_lvc_tlm() frame encoder in jlink.c
- Wire into main.c:
lvc_init() at startup; lvc_tick() each 1kHz loop tick
lvc_is_cutoff() triggers safety_arm_cancel + balance_disarm + motor_driver_estop
lvc_get_power_scale() applied to ESC speed command (100/50/0%)
1Hz JLINK_TLM_LVC telemetry with fuel-gauge percent field
- Add LVC thresholds to config.h (LVC_WARNING/CRITICAL/CUTOFF/HYSTERESIS_MV)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
2026-03-15 10:14:57 -04:00 |
|