mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-18 07:33:34 +08:00
reboot: Add reboot to ISP option
This commit is contained in:
committed by
Daniel Agar
parent
8ba18a78af
commit
84093a07a2
@@ -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);
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user