From ed4a61d5d92dd3f25326aa83d354f74ea0712a19 Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Wed, 3 Feb 2021 10:48:14 +1100 Subject: [PATCH] AntennaTracker: move control_mode_reason up to AP_Vehicle --- AntennaTracker/system.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/AntennaTracker/system.cpp b/AntennaTracker/system.cpp index 17358a21e2..c30e1540f1 100644 --- a/AntennaTracker/system.cpp +++ b/AntennaTracker/system.cpp @@ -173,6 +173,8 @@ void Tracker::prepare_servos() void Tracker::set_mode(Mode &newmode, const ModeReason reason) { + control_mode_reason = reason; + if (mode == &newmode) { // don't switch modes if we are already in the correct mode. return;