GCS_MAVLink: Use new Mount clear_roi_target()
This commit is contained in:
parent
5d39dd45be
commit
8bd127d630
@ -4971,12 +4971,8 @@ MAV_RESULT GCS_MAVLINK::handle_command_do_set_roi(const Location &roi_loc)
|
||||
}
|
||||
|
||||
if (roi_loc.lat == 0 && roi_loc.lng == 0 && roi_loc.alt == 0) {
|
||||
// switch off the camera tracking if enabled
|
||||
if (mount->get_mode() == MAV_MOUNT_MODE_GPS_POINT) {
|
||||
mount->set_mode_to_default();
|
||||
}
|
||||
mount->clear_roi_target();
|
||||
} else {
|
||||
// send the command to the camera mount
|
||||
mount->set_roi_target(roi_loc);
|
||||
}
|
||||
return MAV_RESULT_ACCEPTED;
|
||||
|
Loading…
Reference in New Issue
Block a user