AP_BattMonitor: Rearrange arming check order

This commit is contained in:
Michael du Breuil 2020-05-19 12:09:24 -07:00 committed by Andrew Tridgell
parent 2dcf8a3b08
commit 400220e210
1 changed files with 3 additions and 3 deletions

View File

@ -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");