fix(commander): allow reboot in termination state

This commit is contained in:
danielbuleandra authored and Silvan Fuhrer committed 2026-10-02 09:37:41 +02:00
1 parent 29decda537
commit 2a4ce5dd86
2 files changed
+2 -1

No files matched your search

+1 -1
View File
@@ -1400,7 +1400,7 @@ Commander::handle_command(const vehicle_command_s &cmd)
#if defined(CONFIG_BOARDCTL_RESET)
} else if ((param1 == 1) && !isArmed() && (px4_reboot_request(REBOOT_REQUEST, 400_ms) == 0)) {
} else if ((param1 == 1) && (!isArmed() || isTerminated()) && (px4_reboot_request(REBOOT_REQUEST, 400_ms) == 0)) {
// 1: Reboot autopilot
answer_command(cmd, vehicle_command_ack_s::VEHICLE_CMD_RESULT_ACCEPTED);