MAVLink app: Handle reboot command properly on COMMAND_INT

This commit is contained in:
Lorenz Meier
2016-10-03 22:34:41 +02:00
parent cb5728297e
commit 29a4113ce3
+1 -1
View File
@@ -433,7 +433,7 @@ MavlinkReceiver::handle_message_command_int(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);