mirror of https://github.com/ArduPilot/ardupilot
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:
parent
e29b6c3036
commit
c23f777ae6
|
@ -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);
|
||||
|
|
|
@ -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();
|
||||
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue