From fbb28a0c3ac36f269a25dbcd243427140627fdd0 Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Sat, 9 Nov 2024 18:17:28 +1100 Subject: [PATCH] AntennaTracker: create and use a singleton for SRV_Channels avoid creation of static pointers to objects held within SRV_Channels --- AntennaTracker/Tracker.cpp | 2 +- AntennaTracker/servos.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/AntennaTracker/Tracker.cpp b/AntennaTracker/Tracker.cpp index 435134d618..a35a6f3251 100644 --- a/AntennaTracker/Tracker.cpp +++ b/AntennaTracker/Tracker.cpp @@ -82,7 +82,7 @@ void Tracker::one_second_loop() mavlink_system.sysid = g.sysid_this_mav; // update assigned functions and enable auxiliary servos - SRV_Channels::enable_aux_servos(); + AP::srv().enable_aux_servos(); // updated armed/disarmed status LEDs update_armed_disarmed(); diff --git a/AntennaTracker/servos.cpp b/AntennaTracker/servos.cpp index 23e1e0cab5..5ca8bc0b54 100644 --- a/AntennaTracker/servos.cpp +++ b/AntennaTracker/servos.cpp @@ -8,7 +8,7 @@ void Tracker::init_servos() { // update assigned functions and enable auxiliary servos - SRV_Channels::enable_aux_servos(); + AP::srv().enable_aux_servos(); SRV_Channels::set_default_function(CH_YAW, SRV_Channel::k_tracker_yaw); SRV_Channels::set_default_function(CH_PITCH, SRV_Channel::k_tracker_pitch);