mirror of
https://github.com/mikecarper/MeshCore.git
synced 2026-09-12 20:45:41 +00:00
Persist separate display modes and timeouts in seconds for battery and USB power, expose four controls in WebConfig and CLI, and apply one shared policy across display-equipped roles. Detect R8 external power from a USB host or calibrated battery voltage above 4.21 V, with cached sampling and hysteresis. Add policy, persistence, browser, and R8 power-detection regression coverage.
19 lines
477 B
C++
19 lines
477 B
C++
#pragma once
|
|
|
|
#include <helpers/ui/DisplayDriver.h>
|
|
#include <helpers/CommonCLI.h>
|
|
|
|
class UITask {
|
|
DisplayDriver* _display;
|
|
unsigned long _next_read, _next_refresh;
|
|
int _prevBtnState;
|
|
NodePrefs* _node_prefs;
|
|
char _version_info[32];
|
|
|
|
void renderCurrScreen();
|
|
public:
|
|
UITask(DisplayDriver& display) : _display(&display) { _next_read = _next_refresh = 0; }
|
|
void begin(NodePrefs* node_prefs, const char* build_date, const char* firmware_version);
|
|
|
|
void loop();
|
|
}; |