replace screens with unique_ptr (#11163)

This commit is contained in:
Jorropo
2026-07-25 11:51:13 +00:00
committed by GitHub
co-authored by GitHub
parent abf217c38d
commit 9e529da460
15 changed files with 19 additions and 18 deletions
+2 -1
View File
@@ -6,6 +6,7 @@
#include "mesh/generated/meshtastic/config.pb.h"
#include <OLEDDisplay.h>
#include <functional>
#include <memory>
#include <string>
#include <vector>
@@ -842,6 +843,6 @@ class Screen : public concurrency::OSThread
// Extern declarations for function symbols used in UIRenderer
extern std::vector<std::string> functionSymbol;
extern std::string functionSymbolString;
extern graphics::Screen *screen;
extern std::unique_ptr<graphics::Screen> screen;
#endif
+1 -1
View File
@@ -38,7 +38,7 @@
using namespace meshtastic;
// External variables
extern graphics::Screen *screen;
extern std::unique_ptr<graphics::Screen> screen;
extern PowerStatus *powerStatus;
extern NodeStatus *nodeStatus;
extern GPSStatus *gpsStatus;
+1 -1
View File
@@ -23,7 +23,7 @@
// External declarations
extern bool hasUnreadMessage;
extern graphics::Screen *screen;
extern std::unique_ptr<graphics::Screen> screen;
using graphics::Emote;
using graphics::emotes;
+1 -1
View File
@@ -18,7 +18,7 @@
#include <algorithm>
// Global screen instance
extern graphics::Screen *screen;
extern std::unique_ptr<graphics::Screen> screen;
#if defined(OLED_TINY)
static uint32_t lastSwitchTime = 0;
+1 -1
View File
@@ -28,7 +28,7 @@
#include <gps/RTC.h>
// External variables
extern graphics::Screen *screen;
extern std::unique_ptr<graphics::Screen> screen;
#if defined(OLED_TINY)
static uint32_t lastSwitchTime = 0;
#endif