🪄 Formats SleepService

This commit is contained in:
Rune Harlyk
2024-07-09 20:00:42 +02:00
committed by Rune Harlyk
parent 03e21beddd
commit ba41f520b0
2 changed files with 12 additions and 24 deletions
+5 -9
View File
@@ -29,25 +29,21 @@
#define WAKEUP_SIGNAL 0
#endif
class SleepService
{
public:
class SleepService {
public:
SleepService(PsychicHttpServer *server, SecurityManager *securityManager);
void begin();
static void sleepNow();
void attachOnSleepCallback(void (*callbackSleep)())
{
_callbackSleep = callbackSleep;
}
void attachOnSleepCallback(void (*callbackSleep)()) { _callbackSleep = callbackSleep; }
private:
private:
PsychicHttpServer *_server;
SecurityManager *_securityManager;
esp_err_t sleep(PsychicRequest *request);
protected:
protected:
static void (*_callbackSleep)();
};