mirror of https://github.com/ArduPilot/ardupilot
GCS_MAVLink: rely on item conversion to run DO_SET_ROI_NONE when presented in COMMAND_LONG
This commit is contained in:
parent
c8beddf4c7
commit
274aedeaae
|
@ -4742,9 +4742,6 @@ MAV_RESULT GCS_MAVLINK::handle_command_long_packet(const mavlink_command_long_t
|
|||
}
|
||||
#endif
|
||||
|
||||
case MAV_CMD_DO_SET_ROI_NONE:
|
||||
return handle_command_do_set_roi_none();
|
||||
|
||||
case MAV_CMD_DO_SET_ROI_SYSID:
|
||||
return handle_command_do_set_roi_sysid(packet);
|
||||
|
||||
|
@ -5063,19 +5060,17 @@ MAV_RESULT GCS_MAVLINK::handle_command_int_external_position_estimate(const mavl
|
|||
}
|
||||
#endif // AP_AHRS_POSITION_RESET_ENABLED
|
||||
|
||||
#if HAL_MOUNT_ENABLED
|
||||
MAV_RESULT GCS_MAVLINK::handle_command_do_set_roi_none()
|
||||
{
|
||||
#if HAL_MOUNT_ENABLED
|
||||
AP_Mount *mount = AP::mount();
|
||||
if (mount == nullptr) {
|
||||
return MAV_RESULT_UNSUPPORTED;
|
||||
}
|
||||
mount->set_mode_to_default();
|
||||
return MAV_RESULT_ACCEPTED;
|
||||
#else
|
||||
return MAV_RESULT_UNSUPPORTED;
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
MAV_RESULT GCS_MAVLINK::handle_command_do_set_roi_sysid(const uint8_t sysid)
|
||||
{
|
||||
|
@ -5150,8 +5145,10 @@ MAV_RESULT GCS_MAVLINK::handle_command_int_packet(const mavlink_command_int_t &p
|
|||
return handle_command_do_set_roi(packet);
|
||||
case MAV_CMD_DO_SET_ROI_SYSID:
|
||||
return handle_command_do_set_roi_sysid(packet);
|
||||
#if HAL_MOUNT_ENABLED
|
||||
case MAV_CMD_DO_SET_ROI_NONE:
|
||||
return handle_command_do_set_roi_none();
|
||||
#endif
|
||||
case MAV_CMD_DO_SET_HOME:
|
||||
return handle_command_do_set_home(packet);
|
||||
#if AP_AHRS_POSITION_RESET_ENABLED
|
||||
|
@ -5173,8 +5170,6 @@ MAV_RESULT GCS_MAVLINK::handle_command_int_packet(const mavlink_command_int_t &p
|
|||
return scripting->handle_command_int_packet(packet);
|
||||
}
|
||||
#endif // AP_SCRIPTING_ENABLED
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return MAV_RESULT_UNSUPPORTED;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue