Add raspbian reboot and shutdown behavior
This commit is contained in:
+11
-1
@@ -1,6 +1,8 @@
|
||||
#include "api/WiFiServerAPI.h"
|
||||
#include "buzz.h"
|
||||
#include "configuration.h"
|
||||
#include "graphics/Screen.h"
|
||||
#include "input/LinuxInputImpl.h"
|
||||
#include "main.h"
|
||||
#include "power.h"
|
||||
|
||||
@@ -15,7 +17,13 @@ void powerCommandsCheck()
|
||||
#elif defined(ARCH_RP2040)
|
||||
rp2040.reboot();
|
||||
#elif defined(ARCH_RASPBERRY_PI)
|
||||
exit(EXIT_SUCCESS);
|
||||
deInitApiServer();
|
||||
if (aLinuxInputImpl)
|
||||
aLinuxInputImpl->deInit();
|
||||
SPI.end();
|
||||
Wire.end();
|
||||
Serial1.end();
|
||||
reboot();
|
||||
#else
|
||||
rebootAtMsec = -1;
|
||||
LOG_WARN("FIXME implement reboot for this platform. Note that some settings require a restart to be applied.\n");
|
||||
@@ -33,6 +41,8 @@ void powerCommandsCheck()
|
||||
#if defined(ARCH_NRF52) || defined(ARCH_ESP32)
|
||||
playShutdownMelody();
|
||||
power->shutdown();
|
||||
#elif ARCH_RASPBERRY_PI
|
||||
exit(EXIT_SUCCESS);
|
||||
#else
|
||||
LOG_WARN("FIXME implement shutdown for this platform");
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user