You've already forked meshtastic-device-ui
mirror of
https://github.com/m5stack/meshtastic-device-ui.git
synced 2026-05-20 11:51:03 -07:00
405ca49532
* preliminary impl * update initialization * adapt to limited Portduino Ethernet(WiFi)Client * fixed space left calculation * inherit from SerialClient * updates Eth/SerialClient * update cmake files * protected declaration (for unit tests) * fix warning * tryfix: call lv_tick_inc() directly instead of lv_tick_set_cb() * added isStandalone() to determine use case * add reboot/shutdown for standalone; suppress animations during startup * add debug log * add error log * revert lv_tick_inc / lv_tick_set_cb * fix debug log * workaround sporadic map error * connection status handling * define pure virtual functions * adapt dimensions to allow map resize * replace [] by .at() when erasing * fix all communication issues; add thread names for logging * fix warnings * trunk fmt * cleanup * fix lv_tick interface for esp32 (revert to previous one as Indicator is frozen) * added client connection states to boot screen * fix reboot for standalone case * fix warning * fix UART connection timeout
35 lines
810 B
C++
35 lines
810 B
C++
#pragma once
|
|
|
|
#include "comms/IClientBase.h"
|
|
#include "graphics/DeviceGUI.h"
|
|
#include "graphics/driver/DisplayDriverConfig.h"
|
|
|
|
#if defined(ARDUINO_ARCH_ESP32)
|
|
#include "esp_sleep.h"
|
|
#endif
|
|
|
|
/**
|
|
* @brief DeviceScreen - sets up the GUI and display drivers
|
|
*
|
|
*/
|
|
class DeviceScreen
|
|
{
|
|
public:
|
|
static DeviceScreen &create(void);
|
|
static DeviceScreen &create(const DisplayDriverConfig *cfg);
|
|
static DeviceScreen &create(DisplayDriverConfig &&cfg);
|
|
|
|
void init(IClientBase *client);
|
|
void task_handler(void);
|
|
|
|
#if defined(ARDUINO_ARCH_ESP32)
|
|
int prepareSleep(void *);
|
|
int wakeUp(esp_sleep_wakeup_cause_t cause);
|
|
#endif
|
|
void sleep(uint32_t sleepTime = 5);
|
|
|
|
private:
|
|
DeviceScreen(const DisplayDriverConfig *cfg);
|
|
DeviceScreen(DisplayDriverConfig &&cfg);
|
|
DeviceGUI *gui;
|
|
}; |