AP_Periph: added reboot for scripting

This commit is contained in:
Andrew Tridgell 2024-01-15 09:09:43 +11:00
parent 46f65aec4e
commit 59fe2c9d4e
2 changed files with 12 additions and 1 deletions

View File

@ -594,6 +594,14 @@ void AP_Periph_FW::prepare_reboot()
hal.scheduler->delay(40);
}
/*
reboot, optionally holding in bootloader. For scripting
*/
void AP_Periph_FW::reboot(bool hold_in_bootloader)
{
hal.scheduler->reboot(hold_in_bootloader);
}
AP_Periph_FW *AP_Periph_FW::_singleton;
AP_Periph_FW& AP::periph()

View File

@ -469,6 +469,9 @@ public:
CanardTransferType transfer_type,
uint8_t source_node_id);
// reboot the peripheral, optionally holding in bootloader
void reboot(bool hold_in_bootloader);
#if AP_UART_MONITOR_ENABLED
void handle_tunnel_Targetted(CanardInstance* canard_instance, CanardRxTransfer* transfer);
void send_serial_monitor_data();