MAVLink: Remove link termination command

This is no longer required as we have a full shell available now and there is no reason to let the remote terminate the instance.
This commit is contained in:
Lorenz Meier 2017-07-29 10:45:41 +02:00
parent 37657cf99b
commit f0e8ebb2ac

View File

@ -400,17 +400,7 @@ MavlinkReceiver::handle_message_command_long(mavlink_message_t *msg)
goto out;
}
//check for MAVLINK terminate command
if (cmd_mavlink.command == MAV_CMD_PREFLIGHT_REBOOT_SHUTDOWN && ((int)cmd_mavlink.param1) == 10) {
/* This is the link shutdown command, terminate mavlink */
warnx("terminated by remote");
fflush(stdout);
usleep(50000);
/* terminate other threads and this thread */
_mavlink->_task_should_exit = true;
} else if (cmd_mavlink.command == MAV_CMD_REQUEST_AUTOPILOT_CAPABILITIES) {
if (cmd_mavlink.command == MAV_CMD_REQUEST_AUTOPILOT_CAPABILITIES) {
/* send autopilot version message */
_mavlink->send_autopilot_capabilites();