From 356d797c69a10a30ef20b11282ee8809bcf1d52e Mon Sep 17 00:00:00 2001 From: Andy Piper Date: Sun, 8 Dec 2024 09:59:58 +0000 Subject: [PATCH] Plane: match cork() and push() --- ArduPlane/Plane.h | 2 +- ArduPlane/servos.cpp | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/ArduPlane/Plane.h b/ArduPlane/Plane.h index df180b6f745a0..fa6313f32dca9 100644 --- a/ArduPlane/Plane.h +++ b/ArduPlane/Plane.h @@ -1163,7 +1163,7 @@ class Plane : public AP_Vehicle { void dspoiler_update(void); void airbrake_update(void); void landing_neutral_control_surface_servos(void); - void servos_output(void); + void servos_output(bool cork = true); void servos_auto_trim(void); void servos_twin_engine_mix(); void force_flare(); diff --git a/ArduPlane/servos.cpp b/ArduPlane/servos.cpp index 2ded238cf2f5b..727e092d77deb 100644 --- a/ArduPlane/servos.cpp +++ b/ArduPlane/servos.cpp @@ -961,7 +961,7 @@ void Plane::set_servos(void) #endif // AP_ICENGINE_ENABLED // run output mixer and send values to the hal for output - servos_output(); + servos_output(false); } /* @@ -1017,10 +1017,12 @@ void Plane::indicate_waiting_for_rud_neutral_to_takeoff(void) for each channel and calculates PWM values, then pushes them to hal.rcout */ -void Plane::servos_output(void) +void Plane::servos_output(bool cork) { auto &srv = AP::srv(); - srv.cork(); + if (cork) { + srv.cork(); + } // support twin-engine aircraft servos_twin_engine_mix();