From c1f04b507eb7b5b0676759122df107f174065985 Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Sat, 9 Nov 2024 18:17:28 +1100 Subject: [PATCH] AR_Motors: create and use a singleton for SRV_Channels avoid creation of static pointers to objects held within SRV_Channels --- libraries/AR_Motors/AP_MotorsUGV.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libraries/AR_Motors/AP_MotorsUGV.cpp b/libraries/AR_Motors/AP_MotorsUGV.cpp index e27ef29cdc..70f9754d62 100644 --- a/libraries/AR_Motors/AP_MotorsUGV.cpp +++ b/libraries/AR_Motors/AP_MotorsUGV.cpp @@ -343,7 +343,7 @@ void AP_MotorsUGV::output(bool armed, float ground_speed, float dt) SRV_Channels::calc_pwm(); SRV_Channels::cork(); SRV_Channels::output_ch_all(); - SRV_Channels::push(); + AP::srv().push(); } // test steering or throttle output as a percentage of the total (range -100 to +100) @@ -411,7 +411,7 @@ bool AP_MotorsUGV::output_test_pct(motor_test_order motor_seq, float pct) SRV_Channels::calc_pwm(); SRV_Channels::cork(); SRV_Channels::output_ch_all(); - SRV_Channels::push(); + AP::srv().push(); return true; } @@ -477,7 +477,7 @@ bool AP_MotorsUGV::output_test_pwm(motor_test_order motor_seq, float pwm) SRV_Channels::calc_pwm(); SRV_Channels::cork(); SRV_Channels::output_ch_all(); - SRV_Channels::push(); + AP::srv().push(); return true; }