From db7836ad485f1ba8633b3dc0f019a1af6a294600 Mon Sep 17 00:00:00 2001 From: Randy Mackay Date: Fri, 4 Oct 2019 10:01:49 +0900 Subject: [PATCH] AP_SmartRTL: fixup compile error fix typo introduced by me attempting a minor fixup before merging --- libraries/AP_SmartRTL/AP_SmartRTL.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libraries/AP_SmartRTL/AP_SmartRTL.cpp b/libraries/AP_SmartRTL/AP_SmartRTL.cpp index feea49699d..a577cc4989 100644 --- a/libraries/AP_SmartRTL/AP_SmartRTL.cpp +++ b/libraries/AP_SmartRTL/AP_SmartRTL.cpp @@ -352,9 +352,10 @@ void AP_SmartRTL::run_background_cleanup() routine_cleanup(path_points_count, path_points_completed_limit); // warn if buffer is about to be filled - if ((path_points_count >0) && (path_points_count >= _path_points_max - 9) && (AP_HAL::millis() - _last_low_space_notify_ms > 10000)) { + uint32_t now_ms = AP_HAL::millis(); + if ((path_points_count >0) && (path_points_count >= _path_points_max - 9) && (now_ms - _last_low_space_notify_ms > 10000)) { gcs().send_text(MAV_SEVERITY_INFO, "SmartRTL Low on space!"); - _last_low_space_notify_ms = now; + _last_low_space_notify_ms = now_ms; } }