* new ui/DisplayDriver classes (just SSD1306Display impl for now)
* companion radio: now with optional UITask (enabled by DISPLAY_CLASS config in target/env)
This commit is contained in:
22
examples/companion_radio/UITask.h
Normal file
22
examples/companion_radio/UITask.h
Normal file
@@ -0,0 +1,22 @@
|
||||
#pragma once
|
||||
|
||||
#include <helpers/ui/DisplayDriver.h>
|
||||
|
||||
class UITask {
|
||||
DisplayDriver* _display;
|
||||
unsigned long _next_read, _next_refresh, _auto_off;
|
||||
int _prevBtnState;
|
||||
const char* _node_name;
|
||||
const char* _build_date;
|
||||
char _origin[62];
|
||||
char _msg[80];
|
||||
|
||||
void renderCurrScreen();
|
||||
public:
|
||||
UITask(DisplayDriver& display) : _display(&display) { _next_read = _next_refresh = 0; }
|
||||
void begin(const char* node_name, const char* build_date);
|
||||
|
||||
void clearMsgPreview();
|
||||
void showMsgPreview(uint8_t path_len, const char* from_name, const char* text);
|
||||
void loop();
|
||||
};
|
||||
Reference in New Issue
Block a user