Fix issue #5501. Link termination now requires param 2 = 10

This commit is contained in:
Lorenz Meier
2016-09-16 11:34:40 +02:00
parent 4453e4201b
commit d98bbd9b82
+1 -1
View File
@@ -350,7 +350,7 @@ MavlinkReceiver::handle_message_command_long(mavlink_message_t *msg)
if (target_ok) {
//check for MAVLINK terminate command
if (cmd_mavlink.command == MAV_CMD_PREFLIGHT_REBOOT_SHUTDOWN && ((int)cmd_mavlink.param1) == 3) {
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);