From f0e8ebb2acc2fc0a90cdb441cf1ab949b202f524 Mon Sep 17 00:00:00 2001 From: Lorenz Meier Date: Sat, 29 Jul 2017 10:45:41 +0200 Subject: [PATCH] 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. --- src/modules/mavlink/mavlink_receiver.cpp | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/src/modules/mavlink/mavlink_receiver.cpp b/src/modules/mavlink/mavlink_receiver.cpp index a530a69e0b..5a4ccf1555 100644 --- a/src/modules/mavlink/mavlink_receiver.cpp +++ b/src/modules/mavlink/mavlink_receiver.cpp @@ -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();