AP_Mount: Solo in sysid target sets lockedToBody

Also re-order calls in home-location mode to be consistent with other modes
This commit is contained in:
Randy Mackay 2022-06-17 16:14:11 +09:00
parent e8ab4eb8b7
commit e58d72931e
1 changed files with 2 additions and 1 deletions

View File

@ -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;