mirror of
https://github.com/okalachev/flix.git
synced 2026-08-16 00:38:56 +00:00
Fix reboot in stm32
This commit is contained in:
+1
-1
@@ -193,7 +193,7 @@ void doCommand(String str, bool echo = false) {
|
||||
attitude = Quaternion();
|
||||
gyroBiasFilter.reset();
|
||||
} else if (command == "reboot") {
|
||||
ESP.restart();
|
||||
reboot();
|
||||
} else {
|
||||
print("Invalid command: %s\n", command.c_str());
|
||||
}
|
||||
|
||||
@@ -70,6 +70,14 @@ public:
|
||||
};
|
||||
#endif
|
||||
|
||||
void reboot() {
|
||||
#if defined(ESP32)
|
||||
ESP.restart();
|
||||
#elif defined(ARDUINO_ARCH_STM32)
|
||||
NVIC_SystemReset();
|
||||
#endif
|
||||
}
|
||||
|
||||
// Rate limiter
|
||||
class Rate {
|
||||
public:
|
||||
|
||||
Reference in New Issue
Block a user