commander handle shutdown command (#8000)

This commit is contained in:
James Goppert
2017-09-23 10:35:36 -04:00
committed by Daniel Agar
parent d82806869f
commit 13e64d00a8
3 changed files with 49 additions and 51 deletions
+6
View File
@@ -4217,6 +4217,12 @@ void *commander_low_prio_loop(void *arg)
/* reboot */
px4_shutdown_request(true, false);
} else if (((int)(cmd.param1)) == 2) {
answer_command(cmd, vehicle_command_s::VEHICLE_CMD_RESULT_ACCEPTED, command_ack_pub);
usleep(100000);
/* shutdown */
px4_shutdown_request(false, false);
} else if (((int)(cmd.param1)) == 3) {
answer_command(cmd, vehicle_command_s::VEHICLE_CMD_RESULT_ACCEPTED, command_ack_pub);
usleep(100000);