From 52e2a162c969807d2cd48f612106146832a42a24 Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Sat, 9 Nov 2024 18:24:59 +1100 Subject: [PATCH] Blimp: create and use a singleton for SRV_Channels avoid creation of static pointers to objects held within SRV_Channels --- Blimp/Blimp.cpp | 2 +- Blimp/motors.cpp | 4 ++-- Blimp/radio.cpp | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Blimp/Blimp.cpp b/Blimp/Blimp.cpp index 83f8e62073..8ae8c0b704 100644 --- a/Blimp/Blimp.cpp +++ b/Blimp/Blimp.cpp @@ -210,7 +210,7 @@ void Blimp::one_hz_loop() #endif // update assigned functions and enable auxiliary servos - SRV_Channels::enable_aux_servos(); + AP::srv().enable_aux_servos(); AP_Notify::flags.flying = !ap.land_complete; diff --git a/Blimp/motors.cpp b/Blimp/motors.cpp index 35ba08b90c..c2993c99bd 100644 --- a/Blimp/motors.cpp +++ b/Blimp/motors.cpp @@ -88,5 +88,5 @@ void Blimp::motors_output() motors->output(); // push all channels - SRV_Channels::push(); -} \ No newline at end of file + AP::srv().push(); +} diff --git a/Blimp/radio.cpp b/Blimp/radio.cpp index 4b0c5a9a70..47212c5012 100644 --- a/Blimp/radio.cpp +++ b/Blimp/radio.cpp @@ -38,7 +38,7 @@ void Blimp::init_rc_in() void Blimp::init_rc_out() { // enable aux servos to cope with multiple output channels per motor - SRV_Channels::enable_aux_servos(); + AP::srv().enable_aux_servos(); // refresh auxiliary channel to function map SRV_Channels::update_aux_servo_function();