From 7935bf70f17d2d2d82c6af4aee4b1b8feb7d0e91 Mon Sep 17 00:00:00 2001 From: Randy Mackay Date: Wed, 22 Jul 2015 16:53:31 +0900 Subject: [PATCH] Copter: rc_override active only on non-zero overrides Bug found by Kevin Hester --- ArduCopter/GCS_Mavlink.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ArduCopter/GCS_Mavlink.cpp b/ArduCopter/GCS_Mavlink.cpp index 16e99a39a3..bfd609e91b 100644 --- a/ArduCopter/GCS_Mavlink.cpp +++ b/ArduCopter/GCS_Mavlink.cpp @@ -1091,11 +1091,11 @@ void GCS_MAVLINK::handleMessage(mavlink_message_t* msg) v[5] = packet.chan6_raw; v[6] = packet.chan7_raw; v[7] = packet.chan8_raw; - hal.rcin->set_overrides(v, 8); // record that rc are overwritten so we can trigger a failsafe if we lose contact with groundstation - copter.failsafe.rc_override_active = true; - // a RC override message is consiered to be a 'heartbeat' from the ground station for failsafe purposes + copter.failsafe.rc_override_active = hal.rcin->set_overrides(v, 8); + + // a RC override message is considered to be a 'heartbeat' from the ground station for failsafe purposes copter.failsafe.last_heartbeat_ms = hal.scheduler->millis(); break; }