From 402839bff1251accf4e9b387986aa69121f43d36 Mon Sep 17 00:00:00 2001 From: James O'Shannessy <12959316+joshanne@users.noreply.github.com> Date: Tue, 21 May 2024 09:32:22 +1000 Subject: [PATCH] AP_Mount: Only save converted mount if mount was previously set in the first place The mount library force configures the mount type on conversion, even if the mount was never configured in the first place --- libraries/AP_Mount/AP_Mount.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/AP_Mount/AP_Mount.cpp b/libraries/AP_Mount/AP_Mount.cpp index 3bfed9c2924f6..dff7dd3f1f223 100644 --- a/libraries/AP_Mount/AP_Mount.cpp +++ b/libraries/AP_Mount/AP_Mount.cpp @@ -1024,8 +1024,8 @@ void AP_Mount::convert_params() // conversion is still done even if HAL_MOUNT_SERVO_ENABLED is false mnt_type = 7; // (int8_t)Type::BrushlessPWM; } + _params[0].type.set_and_save(mnt_type); } - _params[0].type.set_and_save(mnt_type); // convert MNT_JSTICK_SPD to MNT1_RC_RATE int8_t jstick_spd = 0;