GCS_MAVLink: remove FLASH_BOOTLOADER commandd if not compiled in

removes handling of MAV_CMD_FLASH_BOOTLOADER if AP_BOOTLOADER_FLASHING_ENABLED is disabled

Side-effect of correcting the mavlink result code in that case.
This commit is contained in:
Peter Barker 2023-10-25 14:44:54 +11:00 committed by Peter Barker
parent 33962cdaf5
commit 0f6718b23d
1 changed files with 4 additions and 0 deletions

View File

@ -4291,6 +4291,7 @@ void GCS_MAVLINK::send_sim_state() const
}
#endif
#if AP_BOOTLOADER_FLASHING_ENABLED
MAV_RESULT GCS_MAVLINK::handle_command_flash_bootloader(const mavlink_command_long_t &packet)
{
if (uint32_t(packet.param5) != 290876) {
@ -4314,6 +4315,7 @@ MAV_RESULT GCS_MAVLINK::handle_command_flash_bootloader(const mavlink_command_lo
return MAV_RESULT_FAILED;
}
#endif // AP_BOOTLOADER_FLASHING_ENABLED
MAV_RESULT GCS_MAVLINK::_handle_command_preflight_calibration_baro(const mavlink_message_t &msg)
{
@ -4767,9 +4769,11 @@ MAV_RESULT GCS_MAVLINK::handle_command_long_packet(const mavlink_command_long_t
result = handle_command_run_prearm_checks(packet);
break;
#if AP_BOOTLOADER_FLASHING_ENABLED
case MAV_CMD_FLASH_BOOTLOADER:
result = handle_command_flash_bootloader(packet);
break;
#endif
default:
result = try_command_long_as_command_int(packet, msg);