From a8966e80701a304704fc520cd6804438353f7014 Mon Sep 17 00:00:00 2001 From: Michel Pastor Date: Sun, 10 Dec 2023 14:02:42 +0000 Subject: [PATCH] Plane: servos auto trim: disable when trim finished only if SERVO_AUTO_TRIM was set to PERMANENT --- libraries/SRV_Channel/SRV_Channels.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/SRV_Channel/SRV_Channels.cpp b/libraries/SRV_Channel/SRV_Channels.cpp index 48a38d09f3..c35dac82ea 100644 --- a/libraries/SRV_Channel/SRV_Channels.cpp +++ b/libraries/SRV_Channel/SRV_Channels.cpp @@ -408,7 +408,7 @@ void SRV_Channels::init(uint32_t motor_mask, AP_HAL::RCOutput::output_mode mode) void SRV_Channels::disable_autotrim_if_temporary_enabled() { - if (auto_trim == SRV_Channels::SERVO_AUTO_TRIM_ONCE) { + if (auto_trim != SRV_Channels::SERVO_AUTO_TRIM_PERMANENT) { auto_trim.set_and_save(SRV_Channels::SERVO_AUTO_TRIM_DISABLED); } }