mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-10 18:08:30 -04:00
GCS_MAVLink: add support for MAV_CMD_RUN_PREARM_CHECKS
This commit is contained in:
parent
32bb616bb5
commit
8d9d3ca437
@ -463,6 +463,7 @@ protected:
|
||||
bool telemetry_delayed() const;
|
||||
virtual uint32_t telem_delay() const = 0;
|
||||
|
||||
MAV_RESULT handle_command_run_prearm_checks(const mavlink_command_long_t &packet);
|
||||
MAV_RESULT handle_command_preflight_set_sensor_offsets(const mavlink_command_long_t &packet);
|
||||
MAV_RESULT handle_command_flash_bootloader(const mavlink_command_long_t &packet);
|
||||
|
||||
|
@ -3802,6 +3802,15 @@ MAV_RESULT GCS_MAVLINK::handle_command_preflight_calibration(const mavlink_comma
|
||||
return _handle_command_preflight_calibration(packet);
|
||||
}
|
||||
|
||||
MAV_RESULT GCS_MAVLINK::handle_command_run_prearm_checks(const mavlink_command_long_t &packet)
|
||||
{
|
||||
if (hal.util->get_soft_armed()) {
|
||||
return MAV_RESULT_TEMPORARILY_REJECTED;
|
||||
}
|
||||
(void)AP::arming().pre_arm_checks(true);
|
||||
return MAV_RESULT_ACCEPTED;
|
||||
}
|
||||
|
||||
MAV_RESULT GCS_MAVLINK::handle_command_preflight_can(const mavlink_command_long_t &packet)
|
||||
{
|
||||
#if HAL_MAX_CAN_PROTOCOL_DRIVERS
|
||||
@ -4173,6 +4182,10 @@ MAV_RESULT GCS_MAVLINK::handle_command_long_packet(const mavlink_command_long_t
|
||||
result = handle_command_preflight_can(packet);
|
||||
break;
|
||||
|
||||
case MAV_CMD_RUN_PREARM_CHECKS:
|
||||
result = handle_command_run_prearm_checks(packet);
|
||||
break;
|
||||
|
||||
case MAV_CMD_FLASH_BOOTLOADER:
|
||||
result = handle_command_flash_bootloader(packet);
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user