From 9a6fb19208cb252ca086fce624e326f610db6e89 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 21 Jun 2022 11:57:41 +1000 Subject: [PATCH] AP_BattMonitor: report arming unhealthy if backend unhealthy important for i2c based battery backends --- libraries/AP_BattMonitor/AP_BattMonitor_Backend.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/libraries/AP_BattMonitor/AP_BattMonitor_Backend.cpp b/libraries/AP_BattMonitor/AP_BattMonitor_Backend.cpp index e65f234a70..7463561746 100644 --- a/libraries/AP_BattMonitor/AP_BattMonitor_Backend.cpp +++ b/libraries/AP_BattMonitor/AP_BattMonitor_Backend.cpp @@ -184,6 +184,7 @@ bool AP_BattMonitor_Backend::arming_checks(char * buffer, size_t buflen) const result = result && update_check(buflen, buffer, critical_capacity, "critical capacity failsafe"); result = result && update_check(buflen, buffer, fs_capacity_inversion, "capacity failsafe critical > low"); result = result && update_check(buflen, buffer, fs_voltage_inversion, "voltage failsafe critical > low"); + result = result && update_check(buflen, buffer, !_state.healthy, "unhealthy"); return result; }