1
0
Fork 0
mirror of https://github.com/iNavFlight/inav.git synced 2025-07-14 03:49:58 +03:00

Fix logic condition VSpeed constraint not allowing the value to be negative

This commit is contained in:
Michel Pastor 2021-02-14 17:07:30 +01:00
parent 251e9f1192
commit 282c3b132e

View file

@ -418,7 +418,7 @@ static int logicConditionGetFlightOperandValue(int operand) {
break;
case LOGIC_CONDITION_OPERAND_FLIGHT_VERTICAL_SPEED: // cm/s
return constrain(getEstimatedActualVelocity(Z), 0, INT16_MAX);
return constrain(getEstimatedActualVelocity(Z), INT16_MIN, INT16_MAX);
break;
case LOGIC_CONDITION_OPERAND_FLIGHT_TROTTLE_POS: // %