From 46d0425fcf3639856971ba627f8510d2929f43c3 Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Thu, 28 Nov 2019 12:24:03 +1100 Subject: [PATCH] AP_NMEA_Output: correct 10Hz rate limiting integer promotion issue --- libraries/AP_NMEA_Output/AP_NMEA_Output.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/AP_NMEA_Output/AP_NMEA_Output.cpp b/libraries/AP_NMEA_Output/AP_NMEA_Output.cpp index 7649b8bd941f6..55c4379702ab4 100644 --- a/libraries/AP_NMEA_Output/AP_NMEA_Output.cpp +++ b/libraries/AP_NMEA_Output/AP_NMEA_Output.cpp @@ -70,7 +70,7 @@ void AP_NMEA_Output::update() const uint16_t now = AP_HAL::millis16(); // only send at 10Hz - if (now - _last_run < 100) { + if (uint16_t(now - _last_run) < 100) { return; } _last_run = now;