Skip to content

Commit

Permalink
AP_Mount: Only save converted mount if mount was previously set in th…
Browse files Browse the repository at this point in the history
…e first place

The mount library force configures the mount type on conversion, even if the mount was never configured in the first place
  • Loading branch information
joshanne committed May 20, 2024
1 parent 19ea094 commit 402839b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libraries/AP_Mount/AP_Mount.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 402839b

Please sign in to comment.