Fix reboot in stm32

This commit is contained in:
Oleg Kalachev
2026-08-15 22:26:30 +03:00
parent 6064ee18f3
commit 9b84538cf3
2 changed files with 9 additions and 1 deletions
+1 -1
View File
@@ -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());
}
+8
View File
@@ -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: