reboot: Add reboot to ISP option

This commit is contained in:
Peter van der Perk
2024-01-04 11:17:16 -05:00
committed by Daniel Agar
parent 8ba18a78af
commit 84093a07a2
13 changed files with 56 additions and 19 deletions
+2 -2
View File
@@ -1201,7 +1201,7 @@ Commander::handle_command(const vehicle_command_s &cmd)
#if defined(CONFIG_BOARDCTL_RESET)
} else if ((param1 == 1) && !isArmed() && (px4_reboot_request(false, 400_ms) == 0)) {
} else if ((param1 == 1) && !isArmed() && (px4_reboot_request(REBOOT_REQUEST, 400_ms) == 0)) {
// 1: Reboot autopilot
answer_command(cmd, vehicle_command_ack_s::VEHICLE_CMD_RESULT_ACCEPTED);
@@ -1221,7 +1221,7 @@ Commander::handle_command(const vehicle_command_s &cmd)
#if defined(CONFIG_BOARDCTL_RESET)
} else if ((param1 == 3) && !isArmed() && (px4_reboot_request(true, 400_ms) == 0)) {
} else if ((param1 == 3) && !isArmed() && (px4_reboot_request(REBOOT_TO_BOOTLOADER, 400_ms) == 0)) {
// 3: Reboot autopilot and keep it in the bootloader until upgraded.
answer_command(cmd, vehicle_command_ack_s::VEHICLE_CMD_RESULT_ACCEPTED);
+1 -1
View File
@@ -177,7 +177,7 @@ void WorkerThread::threadEntry()
param_reset_specific(reset_cal, sizeof(reset_cal) / sizeof(reset_cal[0]));
_ret_value = param_save_default(true);
#if defined(CONFIG_BOARDCTL_RESET)
px4_reboot_request(false, 400_ms);
px4_reboot_request(REBOOT_REQUEST, 400_ms);
#endif // CONFIG_BOARDCTL_RESET
break;
}