From d148039f65b455839369b318ae145b69923251e0 Mon Sep 17 00:00:00 2001 From: Jonathan Challinger Date: Wed, 4 Mar 2015 18:20:12 +0900 Subject: [PATCH] AP_Motors: stricter batt_voltage misconfiguration check --- libraries/AP_Motors/AP_Motors_Class.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/AP_Motors/AP_Motors_Class.cpp b/libraries/AP_Motors/AP_Motors_Class.cpp index 5419b7cf7d..3c3f69c414 100644 --- a/libraries/AP_Motors/AP_Motors_Class.cpp +++ b/libraries/AP_Motors/AP_Motors_Class.cpp @@ -279,7 +279,7 @@ void AP_Motors::update_lift_max_from_batt_voltage() _batt_voltage_min = max(_batt_voltage_min, _batt_voltage_max * 0.6f); // if disabled or misconfigured exit immediately - if(_batt_voltage_max <= 0 && _batt_voltage_min >= _batt_voltage_max) { + if((_batt_voltage_max <= 0) || (_batt_voltage_min >= _batt_voltage_max)) { _batt_voltage_filt.reset(1.0f); _lift_max = 1.0f; return;