Screen update event.

This commit is contained in:
Balazs Kelemen
2022-01-13 09:19:36 +01:00
parent f7c8cabdfe
commit c5b95ed3c0
7 changed files with 55 additions and 19 deletions

View File

@@ -40,6 +40,7 @@ class Screen
#include "concurrency/OSThread.h"
#include "power.h"
#include <string>
#include "mesh/MeshPlugin.h"
// 0 to 255, though particular variants might define different defaults
#ifndef BRIGHTNESS_DEFAULT
@@ -90,8 +91,8 @@ class Screen : public concurrency::OSThread
CallbackObserver<Screen, const meshtastic::Status *>(this, &Screen::handleStatusUpdate);
CallbackObserver<Screen, const MeshPacket *> textMessageObserver =
CallbackObserver<Screen, const MeshPacket *>(this, &Screen::handleTextMessage);
CallbackObserver<Screen, const meshtastic::Status *> cannedMessageObserver =
CallbackObserver<Screen, const meshtastic::Status *>(this, &Screen::handleCannedMessage);
CallbackObserver<Screen, const UIFrameEvent *> uiFrameEventObserver =
CallbackObserver<Screen, const UIFrameEvent *>(this, &Screen::handleUIFrameEvent);
public:
Screen(uint8_t address, int sda = -1, int scl = -1);
@@ -220,7 +221,7 @@ class Screen : public concurrency::OSThread
int handleStatusUpdate(const meshtastic::Status *arg);
int handleTextMessage(const MeshPacket *arg);
int handleCannedMessage(const meshtastic::Status *arg);
int handleUIFrameEvent(const UIFrameEvent *arg);
/// Used to force (super slow) eink displays to draw critical frames
void forceDisplay();