From f53bfdbd380074051d2576b15ceca029fa60e996 Mon Sep 17 00:00:00 2001 From: Randy Mackay Date: Mon, 9 Jul 2018 15:16:39 +0900 Subject: [PATCH] AP_Follow: fix reporting to GCS --- libraries/AP_Follow/AP_Follow.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libraries/AP_Follow/AP_Follow.cpp b/libraries/AP_Follow/AP_Follow.cpp index addc3eaccb..6fdfa470b6 100644 --- a/libraries/AP_Follow/AP_Follow.cpp +++ b/libraries/AP_Follow/AP_Follow.cpp @@ -293,7 +293,8 @@ void AP_Follow::handle_msg(const mavlink_message_t &msg) if (_sysid_to_follow == 0) { _sysid_to_follow = msg.sysid; } - if ((AP_HAL::millis() - _last_location_sent_to_gcs > AP_GCS_INTERVAL_MS)) { + if ((now - _last_location_sent_to_gcs) > AP_GCS_INTERVAL_MS) { + _last_location_sent_to_gcs = now; gcs().send_text(MAV_SEVERITY_INFO, "Foll: %u %ld %ld %4.2f\n", (unsigned)_sysid_to_follow, (long)_target_location.lat,