AntennaTracker: create and use a singleton for SRV_Channels

avoid creation of static pointers to objects held within SRV_Channels
This commit is contained in:
Peter Barker 2024-11-09 18:17:28 +11:00 committed by Andrew Tridgell
parent a0eef1039c
commit fbb28a0c3a
2 changed files with 2 additions and 2 deletions

View File

@ -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();

View File

@ -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);