From 40ba55e074dff3394a928d09a5540a3ae9324933 Mon Sep 17 00:00:00 2001 From: Thomas Herrmann Date: Sat, 24 Feb 2024 11:53:11 +0100 Subject: [PATCH] protect screen specific code with #if HAS_SCREEN --- src/modules/esp32/PaxcounterModule.cpp | 3 +++ src/modules/esp32/PaxcounterModule.h | 2 ++ 2 files changed, 5 insertions(+) diff --git a/src/modules/esp32/PaxcounterModule.cpp b/src/modules/esp32/PaxcounterModule.cpp index bf7772c36a..1d51eed728 100644 --- a/src/modules/esp32/PaxcounterModule.cpp +++ b/src/modules/esp32/PaxcounterModule.cpp @@ -87,6 +87,8 @@ int32_t PaxcounterModule::runOnce() } } +#if HAS_SCREEN + // TODO / FIXME: This code is copied from src/graphics/Screen.cpp // It appears (in slightly variants) also in other modules like // src/modules/Telemetry/PowerTelemetry.cpp, src/modules/Telemetry/EnvironmentTelemetry.cpp @@ -127,5 +129,6 @@ void PaxcounterModule::drawFrame(OLEDDisplay *display, OLEDDisplayUiState *state buffer, "WiFi: %d\nBLE: %d\nuptime: %ds", count_from_libpax.wifi_count, count_from_libpax.ble_count, millis() / 1000); } +#endif // HAS_SCREEN #endif \ No newline at end of file diff --git a/src/modules/esp32/PaxcounterModule.h b/src/modules/esp32/PaxcounterModule.h index 437d3f02a6..c8e15155e8 100644 --- a/src/modules/esp32/PaxcounterModule.h +++ b/src/modules/esp32/PaxcounterModule.h @@ -25,8 +25,10 @@ class PaxcounterModule : private concurrency::OSThread, public ProtobufModule