Skip to content

Commit ad05aa2

Browse files
committed
Merge pull request #6602 from shellixyz/fix/logic_condition_vspeed_constrain
Fix logic condition VSpeed constraint not allowing the value to be negative
1 parent edc6f9d commit ad05aa2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/programming/logic_condition.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -408,7 +408,7 @@ static int logicConditionGetFlightOperandValue(int operand) {
408408
break;
409409

410410
case LOGIC_CONDITION_OPERAND_FLIGHT_VERTICAL_SPEED: // cm/s
411-
return constrain(getEstimatedActualVelocity(Z), 0, INT16_MAX);
411+
return constrain(getEstimatedActualVelocity(Z), INT16_MIN, INT16_MAX);
412412
break;
413413

414414
case LOGIC_CONDITION_OPERAND_FLIGHT_TROTTLE_POS: // %

0 commit comments

Comments
 (0)