Plane: fix flawed logic in throttle voltage comp params check

This commit is contained in:
Michel Pastor 2021-09-26 22:19:09 +02:00 committed by Andrew Tridgell
parent c372189a9d
commit 7cb2619413

View File

@ -391,7 +391,7 @@ void Plane::set_servos_manual_passthrough(void)
void Plane::throttle_voltage_comp(int8_t &min_throttle, int8_t &max_throttle) const
{
// return if not enabled, or setup incorrectly
if (g2.fwd_thr_batt_voltage_min >= g2.fwd_thr_batt_voltage_max || !is_positive(g2.fwd_thr_batt_voltage_max)) {
if (!is_positive(g2.fwd_thr_batt_voltage_min) || g2.fwd_thr_batt_voltage_min >= g2.fwd_thr_batt_voltage_max) {
return;
}