fix commander: separate state tracking for battery_unhealthy failsafe (#24493)

There is already another check for battery_unhealthy, so a separate state
and ID are required.

Fixes the error:
ERROR [failsafe] BUG: duplicate check for caller_id 74
This commit is contained in:
Beat Küng
2025-03-12 16:46:02 +01:00
committed by GitHub
parent b5e2395982
commit a3c387fa85
2 changed files with 10 additions and 2 deletions
@@ -179,6 +179,10 @@ private:
bool _last_state_battery_warning_critical{false};
const int _caller_id_battery_warning_emergency{genCallerId()};
bool _last_state_battery_warning_emergency{false};
const int _caller_id_fd_esc_arming{genCallerId()};
bool _last_state_fd_esc_arming{false};
const int _caller_id_battery_unhealthy_spoolup{genCallerId()};
bool _last_state_battery_unhealthy_spoolup{false};
hrt_abstime _armed_time{0};
bool _was_armed{false};