Reverting UITask.h changes

This commit is contained in:
hank
2025-06-01 20:45:18 -07:00
parent 33d5f85556
commit 884d8f1a98

View File

@@ -1,4 +1,5 @@
#pragma once #pragma once
#include <MeshCore.h> #include <MeshCore.h>
#include <helpers/ui/DisplayDriver.h> #include <helpers/ui/DisplayDriver.h>
#include <stddef.h> #include <stddef.h>
@@ -7,10 +8,18 @@
#include <helpers/ui/buzzer.h> #include <helpers/ui/buzzer.h>
#endif #endif
#include "Button.h"
#include "NodePrefs.h" #include "NodePrefs.h"
#include "Button.h"
enum class UIEventType { none, contactMessage, channelMessage, roomMessage, newContactMessage, ack }; enum class UIEventType
{
none,
contactMessage,
channelMessage,
roomMessage,
newContactMessage,
ack
};
class UITask { class UITask {
DisplayDriver* _display; DisplayDriver* _display;
@@ -45,14 +54,14 @@ class UITask {
void handleButtonTriplePress(); void handleButtonTriplePress();
void handleButtonLongPress(); void handleButtonLongPress();
public: public:
UITask(mesh::MainBoard *board) : _board(board), _display(NULL)
{ UITask(mesh::MainBoard* board) : _board(board), _display(NULL) {
_next_refresh = 0; _next_refresh = 0;
_connected = false; _connected = false;
} }
void begin(DisplayDriver *display, NodePrefs *node_prefs, const char *build_date, void begin(DisplayDriver* display, NodePrefs* node_prefs, const char* build_date, const char* firmware_version, uint32_t pin_code);
const char *firmware_version, uint32_t pin_code);
void setHasConnection(bool connected) { _connected = connected; } void setHasConnection(bool connected) { _connected = connected; }
bool hasDisplay() const { return _display != NULL; } bool hasDisplay() const { return _display != NULL; }