From 400220e2107a1f9d2a9e036e93639c365a9085d9 Mon Sep 17 00:00:00 2001 From: Michael du Breuil Date: Tue, 19 May 2020 12:09:24 -0700 Subject: [PATCH] AP_BattMonitor: Rearrange arming check order --- libraries/AP_BattMonitor/AP_BattMonitor_Backend.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libraries/AP_BattMonitor/AP_BattMonitor_Backend.cpp b/libraries/AP_BattMonitor/AP_BattMonitor_Backend.cpp index 9f572e1fbf..7078ec7106 100644 --- a/libraries/AP_BattMonitor/AP_BattMonitor_Backend.cpp +++ b/libraries/AP_BattMonitor/AP_BattMonitor_Backend.cpp @@ -168,12 +168,12 @@ bool AP_BattMonitor_Backend::arming_checks(char * buffer, size_t buflen) const is_positive(_params._low_voltage) && (_params._low_voltage < _params._critical_voltage); - bool result = update_check(buflen, buffer, low_voltage, "low voltage failsafe"); + bool result = update_check(buflen, buffer, below_arming_voltage, "below minimum arming voltage"); + result = result && update_check(buflen, buffer, below_arming_capacity, "below minimum arming capacity"); + result = result && update_check(buflen, buffer, low_voltage, "low voltage failsafe"); result = result && update_check(buflen, buffer, low_capacity, "low capacity failsafe"); result = result && update_check(buflen, buffer, critical_voltage, "critical voltage failsafe"); result = result && update_check(buflen, buffer, critical_capacity, "critical capacity failsafe"); - result = result && update_check(buflen, buffer, below_arming_voltage, "below minimum arming voltage"); - result = result && update_check(buflen, buffer, below_arming_capacity, "below minimum arming capacity"); 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");