Skip to content

Commit

Permalink
GCS_Common: better handle negative intervals
Browse files Browse the repository at this point in the history
Treat all negative interval values like -1.
  • Loading branch information
robertlong13 committed Feb 6, 2025
1 parent 034a760 commit 427743b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libraries/GCS_MAVLink/GCS_Common.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3127,7 +3127,7 @@ MAV_RESULT GCS_MAVLINK::set_message_interval(uint32_t msg_id, int32_t interval_u
// at.
interval_ms = 0;
}
} else if (interval_us == -1) {
} else if (interval_us < 0) {
// minus-one is "stop sending"
interval_ms = 0;
} else if (interval_us < 1000) {
Expand Down

0 comments on commit 427743b

Please sign in to comment.