Saibernard and Jacob Dahl
1a3f7971b9
fix(battery): stop a charging battery from disabling battery failsafes ( #29012 )
...
* fix(battery): don't let a charging battery switch off the battery failsafes
Since #28422 a DroneCAN battery that sets its charging flag reports
WARNING_CHARGING, which is 7. The battery check keeps the highest warning
across batteries and, while armed, only lets it rise, but the failsafe has
no action for 7. So one charging report outranked a real emergency on
another pack and stayed latched until disarm, and a vehicle that armed
while still charging on a dock never got a low battery failsafe at all.
The driver also replaced a real low, critical or emergency warning with
charging, so a nearly empty pack on a charger still passed the arming
check.
The driver now reports charging only while the pack has no real warning,
and the battery check treats charging as no warning when it picks the
worst one. MAVLink still shows charging while the pack has no warning.
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Saibernard Yogendran <bernie97@seas.upenn.edu >
* test(commander): cover a charging battery in the battery check
A charging pack doesn't outrank another pack's emergency, charging at
arming doesn't latch over a later low or critical warning, and charging
on its own is no warning. All three fail without the fix.
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Saibernard Yogendran <bernie97@seas.upenn.edu >
* docs(msg): say WARNING_CHARGING is a state, not a severity
The DroneCAN driver only reports charging when no other warning applies,
and the battery check and HIGH_LATENCY2 stream rely on that and on not
ordering it against the real warnings.
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Jacob Dahl <dahl.jakejacob@gmail.com >
* fix(mavlink): don't flag a charging battery as failed in HIGH_LATENCY2
WARNING_CHARGING is 7, so the greater-than-LOW test set
HL_FAILURE_FLAG_BATTERY for every healthy pack on a charger.
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Jacob Dahl <dahl.jakejacob@gmail.com >
---------
Signed-off-by: Saibernard Yogendran <bernie97@seas.upenn.edu >
Signed-off-by: Jacob Dahl <dahl.jakejacob@gmail.com >
Co-authored-by: Jacob Dahl <dahl.jakejacob@gmail.com >
2026-10-06 19:19:01 -06:00
..
2026-09-09 12:29:33 +03:00
2026-09-09 12:29:33 +03:00
2026-10-06 19:19:01 -06:00
2026-06-08 15:51:17 -06:00
2025-07-28 17:07:08 +02:00
2023-03-16 11:55:45 +01:00
2023-03-06 09:51:22 -05:00
2026-06-01 15:04:57 +02:00
2026-06-01 15:04:57 +02:00
2025-11-04 17:22:10 +01:00
2025-08-14 19:39:52 +10:00
2025-08-06 11:34:29 +02:00
2025-10-02 15:17:40 +02:00
2025-06-17 09:05:22 +02:00
2022-10-19 19:36:47 -04:00
2026-07-22 20:03:50 +12:00
2022-10-19 19:36:47 -04:00
2022-10-19 19:36:47 -04:00
2024-03-20 12:38:47 -04:00
2026-07-07 17:09:15 +02:00
2026-09-30 11:34:05 -06:00
2022-10-19 19:36:47 -04:00
2026-05-18 16:14:31 +02:00
2022-10-19 19:36:47 -04:00
2024-07-19 14:33:36 +02:00
2023-07-24 13:10:31 +02:00
2024-07-19 14:33:36 +02:00
2022-10-19 19:36:47 -04:00
2022-10-19 19:36:47 -04:00
2022-10-19 19:36:47 -04:00
2026-07-13 16:14:42 -06:00
2026-07-13 16:14:42 -06:00
2026-07-23 10:50:23 -07:00
2026-06-25 16:15:47 +02:00
2024-09-09 15:40:40 +02:00
2024-09-16 09:11:23 +02:00
2025-07-22 23:17:58 -08:00
2025-01-26 23:05:39 -05:00
2026-03-17 16:38:33 -08:00
2026-03-17 16:38:33 -08:00
2026-03-18 10:52:59 +01:00
2026-03-17 16:38:33 -08:00
2026-04-01 15:01:31 +02:00
2024-11-22 15:13:47 +01:00
2024-06-17 15:30:42 -04:00
2022-12-20 10:23:56 -05:00
2024-06-26 11:05:38 +02:00
2024-07-10 10:43:55 -04:00
2026-04-02 16:20:19 +02:00
2024-06-26 11:05:38 +02:00
2022-10-19 19:36:47 -04:00
2022-10-19 19:36:47 -04:00
2024-06-26 11:05:38 +02:00
2025-12-16 10:10:37 +01:00
2026-03-13 17:46:31 +01:00
2026-09-22 15:15:30 +12:00
2026-09-30 11:45:21 -06:00
2025-09-30 11:23:09 +02:00
2026-08-25 10:33:52 +02:00
2026-05-26 07:27:49 +10:00
2026-05-26 07:27:49 +10:00
2023-10-31 15:57:59 -04:00
2026-09-16 17:53:40 +02:00
2025-05-26 14:47:38 +02:00
2026-08-07 13:32:31 +02:00
2026-08-28 17:43:33 +02:00
2024-02-06 17:32:09 +01:00
2022-10-19 19:36:47 -04:00
2022-10-19 19:36:47 -04:00
2022-10-19 19:36:47 -04:00
2026-08-21 11:31:26 +02:00
2025-11-27 17:33:06 +01:00
2022-10-19 19:36:47 -04:00
2023-11-22 21:45:02 -05:00
2026-09-17 10:04:40 +12:00
2026-01-16 11:33:45 +01:00
2025-10-14 11:45:43 -08:00
2024-12-18 07:51:40 +01:00
2026-04-29 10:16:39 +12:00
2022-10-19 19:36:47 -04:00
2025-02-18 14:38:11 +01:00
2022-10-19 19:36:47 -04:00
2026-09-22 15:15:30 +12:00
2022-10-19 19:36:47 -04:00
2023-06-19 07:58:21 +02:00
2025-12-17 17:48:30 +01:00
2023-06-19 07:58:21 +02:00
2023-06-19 07:58:21 +02:00
2025-12-16 08:36:02 -09:00
2022-10-24 13:22:26 +02:00
2022-10-19 19:36:47 -04:00
2026-09-01 10:14:54 -06:00
2022-10-19 19:36:47 -04:00
2025-11-25 13:15:44 +01:00
2026-09-24 12:10:34 +02:00
2026-06-26 22:43:47 +02:00
2024-04-25 08:23:32 +02:00
2022-10-19 19:36:47 -04:00
2022-10-19 19:36:47 -04:00
2022-11-22 13:46:25 -05:00
2022-10-19 19:36:47 -04:00
2026-05-26 07:27:49 +10:00
2026-02-17 09:26:38 +01:00
2022-10-19 19:36:47 -04:00
2024-05-29 11:56:50 +02:00
2024-04-29 14:02:09 +12:00
2022-10-19 19:36:47 -04:00
2022-10-19 19:36:47 -04:00
2026-09-26 12:40:56 +10:00
2022-10-19 19:36:47 -04:00
2026-02-08 20:51:31 -07:00
2023-12-01 13:11:00 -05:00
2024-07-19 14:33:36 +02:00
2024-01-30 11:25:37 -05:00
2024-03-08 17:26:04 +01:00
2022-10-19 19:36:47 -04:00
2024-08-08 13:37:36 +02:00
2024-08-14 11:08:02 +02:00
2025-07-25 09:42:12 -08:00
2026-07-28 16:25:42 +02:00
2023-03-06 22:43:41 +01:00
2024-07-16 11:07:03 +02:00
2023-11-22 22:14:50 -05:00
2022-10-19 19:36:47 -04:00
2024-09-02 16:20:10 +12:00
2026-06-09 09:26:12 +12:00
2024-09-02 16:20:10 +12:00
2024-09-02 16:20:10 +12:00
2024-09-02 16:20:10 +12:00
2026-05-01 08:54:38 +10:00
2022-10-19 19:36:47 -04:00
2022-10-19 19:36:47 -04:00
2024-03-08 16:28:24 -05:00
2024-03-11 13:52:22 -04:00
2024-03-11 13:52:22 -04:00
2024-03-11 13:52:22 -04:00
2024-07-19 14:33:36 +02:00
2022-10-19 19:36:47 -04:00
2022-10-19 19:36:47 -04:00
2022-10-19 19:36:47 -04:00
2025-02-18 14:33:16 +01:00
2026-05-27 10:51:55 +02:00
2022-10-19 19:36:47 -04:00
2022-10-19 19:36:47 -04:00
2022-10-19 19:36:47 -04:00
2026-09-30 11:45:21 -06:00
2026-05-26 07:27:49 +10:00
2026-09-09 10:16:12 -06:00
2025-09-18 17:33:36 +10:00
2025-01-14 14:55:34 +01:00
2025-07-28 17:07:08 +02:00
2022-12-09 16:49:41 -05:00
2022-12-09 16:49:41 -05:00
2022-10-19 19:36:47 -04:00
2026-04-01 15:01:31 +02:00
2025-05-26 14:47:38 +02:00
2025-07-23 11:13:11 +02:00
2022-10-19 19:36:47 -04:00
2025-09-18 15:59:54 +10:00
2025-09-18 15:59:54 +10:00
2025-09-18 15:59:54 +10:00
2025-09-18 15:59:54 +10:00
2025-09-18 15:59:54 +10:00
2025-09-18 15:59:54 +10:00
2025-09-18 15:59:54 +10:00
2025-09-18 15:59:54 +10:00
2025-09-18 15:59:54 +10:00
2025-01-14 14:55:34 +01:00
2026-09-30 11:45:21 -06:00
2026-09-26 12:40:56 +10:00
2026-09-26 12:40:56 +10:00
2025-06-24 13:14:08 -06:00
2026-08-28 21:14:13 -06:00
2026-08-28 21:14:13 -06:00
2024-08-27 09:23:43 +02:00
2026-08-28 21:14:13 -06:00
2022-10-19 19:36:47 -04:00
2023-06-07 12:07:29 -04:00
2026-09-29 10:36:49 -06:00
2024-01-22 12:30:24 -05:00
2026-09-10 18:31:06 +02:00
2026-09-30 11:45:21 -06:00
2025-09-24 11:08:10 -04:00
2026-08-28 21:14:13 -06:00
2022-10-19 19:36:47 -04:00
2026-08-28 21:14:13 -06:00
2022-10-19 19:36:47 -04:00
2026-09-09 09:59:30 +02:00
2025-02-25 14:04:52 +01:00
2022-10-19 19:36:47 -04:00
2022-10-19 19:36:47 -04:00
2022-10-19 19:36:47 -04:00
2026-09-30 17:26:52 -06:00
2022-10-19 19:36:47 -04:00
2025-11-06 10:00:26 -09:00
2026-09-04 08:21:50 -07:00
2024-10-30 11:35:35 -04:00
2022-10-19 19:36:47 -04:00
2026-05-26 07:27:49 +10:00
2022-10-19 19:36:47 -04:00
2026-08-20 15:07:42 +02:00
2026-09-30 10:55:25 +13:00
2023-03-06 22:43:41 +01:00
2022-10-19 19:36:47 -04:00
2025-04-15 10:24:03 +02:00
2026-07-21 06:15:58 +02:00
2022-10-19 19:36:47 -04:00
2026-08-10 17:57:58 -06:00
2022-10-19 19:36:47 -04:00
2022-10-19 19:36:47 -04:00
2022-10-19 19:36:47 -04:00
2022-10-19 19:36:47 -04:00
2022-10-19 19:36:47 -04:00
2025-08-14 11:37:48 +10:00
2022-10-19 19:36:47 -04:00
2026-07-03 12:33:03 -07:00
2026-09-30 17:13:46 -06:00
2026-09-30 15:03:30 -06:00
2025-01-21 16:48:33 +03:00
2022-10-19 19:36:47 -04:00
2022-10-19 19:36:47 -04:00
2022-10-19 19:36:47 -04:00
2025-02-25 14:04:52 +01:00
2024-08-27 10:38:17 -04:00
2022-10-19 19:36:47 -04:00
2026-07-02 14:53:34 +02:00
2023-03-16 11:55:45 +01:00
2023-12-08 21:17:59 +01:00
2026-05-26 07:27:49 +10:00
2026-05-26 07:27:49 +10:00
2026-05-26 07:27:49 +10:00
2026-05-26 07:27:49 +10:00
2026-05-26 07:27:49 +10:00
2026-05-26 07:27:49 +10:00
2026-09-30 13:27:50 +02:00
2023-11-28 16:30:17 +01:00
2022-10-19 19:36:47 -04:00