ArduSub: 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 c23f777ae6
commit a8b07a854f
2 changed files with 2 additions and 2 deletions

View File

@ -290,7 +290,7 @@ void Sub::one_hz_loop()
} }
// update assigned functions and enable auxiliary servos // update assigned functions and enable auxiliary servos
SRV_Channels::enable_aux_servos(); AP::srv().enable_aux_servos();
#if HAL_LOGGING_ENABLED #if HAL_LOGGING_ENABLED
// log terrain data // log terrain data

View File

@ -22,7 +22,7 @@ void Sub::motors_output()
SRV_Channels::calc_pwm(); SRV_Channels::calc_pwm();
SRV_Channels::output_ch_all(); SRV_Channels::output_ch_all();
motors.output(); motors.output();
SRV_Channels::push(); AP::srv().push();
} }
} }