Skip to content

Commit b4dea63

Browse files
authored
Gatting off BaseUI code from screenless devices and InkHUD (#8384)
1 parent 30022c9 commit b4dea63

File tree

6 files changed

+17
-2
lines changed

6 files changed

+17
-2
lines changed

src/graphics/SharedUIDisplay.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1-
#include "graphics/SharedUIDisplay.h"
1+
#include "configuration.h"
2+
#if HAS_SCREEN
23
#include "RTC.h"
34
#include "graphics/ScreenFonts.h"
5+
#include "graphics/SharedUIDisplay.h"
46
#include "graphics/draw/UIRenderer.h"
57
#include "main.h"
68
#include "meshtastic/config.pb.h"
@@ -423,3 +425,4 @@ std::string sanitizeString(const std::string &input)
423425
}
424426

425427
} // namespace graphics
428+
#endif

src/graphics/VirtualKeyboard.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
#include "VirtualKeyboard.h"
21
#include "configuration.h"
2+
#if HAS_SCREEN
3+
#include "VirtualKeyboard.h"
34
#include "graphics/Screen.h"
45
#include "graphics/ScreenFonts.h"
56
#include "graphics/SharedUIDisplay.h"
@@ -736,3 +737,4 @@ bool VirtualKeyboard::isTimedOut() const
736737
}
737738

738739
} // namespace graphics
740+
#endif

src/graphics/draw/CompassRenderer.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#include "configuration.h"
2+
#if HAS_SCREEN
13
#include "CompassRenderer.h"
24
#include "NodeDB.h"
35
#include "UIRenderer.h"
@@ -135,3 +137,4 @@ uint16_t getCompassDiam(uint32_t displayWidth, uint32_t displayHeight)
135137

136138
} // namespace CompassRenderer
137139
} // namespace graphics
140+
#endif

src/graphics/emotes.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#include "configuration.h"
2+
#if HAS_SCREEN
13
#include "emotes.h"
24

35
namespace graphics
@@ -275,3 +277,4 @@ const unsigned char bell_icon[] PROGMEM = {
275277
#endif
276278

277279
} // namespace graphics
280+
#endif

src/modules/Telemetry/EnvironmentTelemetry.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -361,6 +361,7 @@ bool EnvironmentTelemetryModule::wantUIFrame()
361361
return moduleConfig.telemetry.environment_screen_enabled;
362362
}
363363

364+
#if HAS_SCREEN
364365
void EnvironmentTelemetryModule::drawFrame(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y)
365366
{
366367
// === Setup display ===
@@ -510,6 +511,7 @@ void EnvironmentTelemetryModule::drawFrame(OLEDDisplay *display, OLEDDisplayUiSt
510511
currentY += rowHeight;
511512
}
512513
}
514+
#endif
513515

514516
bool EnvironmentTelemetryModule::handleReceivedProtobuf(const meshtastic_MeshPacket &mp, meshtastic_Telemetry *t)
515517
{

src/modules/Telemetry/PowerTelemetry.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ bool PowerTelemetryModule::wantUIFrame()
108108
return moduleConfig.telemetry.power_screen_enabled;
109109
}
110110

111+
#if HAS_SCREEN
111112
void PowerTelemetryModule::drawFrame(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y)
112113
{
113114
display->clear();
@@ -165,6 +166,7 @@ void PowerTelemetryModule::drawFrame(OLEDDisplay *display, OLEDDisplayUiState *s
165166
drawLine("Ch3", m.ch3_voltage, m.ch3_current);
166167
}
167168
}
169+
#endif
168170

169171
bool PowerTelemetryModule::handleReceivedProtobuf(const meshtastic_MeshPacket &mp, meshtastic_Telemetry *t)
170172
{

0 commit comments

Comments
 (0)