ArduPlane: 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 e29b6c3036
commit c23f777ae6
3 changed files with 3 additions and 3 deletions

View File

@ -346,7 +346,7 @@ void Plane::one_second_loop()
// sync MAVLink system ID
mavlink_system.sysid = g.sysid_this_mav;
SRV_Channels::enable_aux_servos();
AP::srv().enable_aux_servos();
// update notify flags
AP_Notify::flags.pre_arm_check = arming.pre_arm_checks(false);

View File

@ -107,7 +107,7 @@ void Plane::init_rc_out_main()
*/
void Plane::init_rc_out_aux()
{
SRV_Channels::enable_aux_servos();
AP::srv().enable_aux_servos();
servos_output();

View File

@ -1055,7 +1055,7 @@ void Plane::servos_output(void)
SRV_Channels::output_ch_all();
SRV_Channels::push();
AP::srv().push();
if (g2.servo_channels.auto_trim_enabled()) {
servos_auto_trim();