From e58d72931ee3ee6a949b27a6dcf28a11aba9381e Mon Sep 17 00:00:00 2001 From: Randy Mackay Date: Fri, 17 Jun 2022 16:14:11 +0900 Subject: [PATCH] AP_Mount: Solo in sysid target sets lockedToBody Also re-order calls in home-location mode to be consistent with other modes --- libraries/AP_Mount/AP_Mount_SoloGimbal.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libraries/AP_Mount/AP_Mount_SoloGimbal.cpp b/libraries/AP_Mount/AP_Mount_SoloGimbal.cpp index 07a18e0c46..b9eb258bd5 100644 --- a/libraries/AP_Mount/AP_Mount_SoloGimbal.cpp +++ b/libraries/AP_Mount/AP_Mount_SoloGimbal.cpp @@ -73,17 +73,18 @@ void AP_Mount_SoloGimbal::update() break; case MAV_MOUNT_MODE_HOME_LOCATION: + _gimbal.set_lockedToBody(false); // constantly update the home location: if (!AP::ahrs().home_is_set()) { break; } _state._roi_target = AP::ahrs().get_home(); _state._roi_target_set = true; - _gimbal.set_lockedToBody(false); UNUSED_RESULT(calc_angle_to_roi_target(_angle_ef_target_rad, true, true, true)); break; case MAV_MOUNT_MODE_SYSID_TARGET: + _gimbal.set_lockedToBody(false); UNUSED_RESULT(calc_angle_to_sysid_target(_angle_ef_target_rad, true, true, true)); break;