Blimp: 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:24:59 +11:00 committed by Andrew Tridgell
parent 2816142228
commit 38b0a57f10
3 changed files with 4 additions and 4 deletions

View File

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

View File

@ -88,5 +88,5 @@ void Blimp::motors_output()
motors->output();
// push all channels
SRV_Channels::push();
}
AP::srv().push();
}

View File

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