diff --git a/src/graphics/Screen.cpp b/src/graphics/Screen.cpp index 136964006..643c1c74e 100644 --- a/src/graphics/Screen.cpp +++ b/src/graphics/Screen.cpp @@ -20,6 +20,7 @@ along with this program. If not, see . */ #include "configuration.h" +#ifndef NO_SCREEN #include #include "GPS.h" @@ -1652,3 +1653,4 @@ int Screen::handleUIFrameEvent(const UIFrameEvent *event) } } // namespace graphics +#endif // NO_SCREEN \ No newline at end of file diff --git a/src/graphics/Screen.h b/src/graphics/Screen.h index 259598b80..6d9147e79 100644 --- a/src/graphics/Screen.h +++ b/src/graphics/Screen.h @@ -1,6 +1,7 @@ #pragma once #ifdef NO_SCREEN +#include "power.h" namespace graphics { // Noop class for boards without screen. @@ -15,6 +16,8 @@ class Screen void adjustBrightness(){} void doDeepSleep() {} void forceDisplay() {} + void startBluetoothPinScreen(uint32_t pin) {} + void stopBluetoothPinScreen() {} }; } diff --git a/src/mesh/http/ContentHandler.cpp b/src/mesh/http/ContentHandler.cpp index ba78b4ea5..1ce2c293d 100644 --- a/src/mesh/http/ContentHandler.cpp +++ b/src/mesh/http/ContentHandler.cpp @@ -798,7 +798,9 @@ void handleBlinkLED(HTTPRequest *req, HTTPResponse *res) count = count - 1; } } else { +#ifndef NO_SCREEN screen->blink(); +#endif } Json jsonObjOuter = Json::object{{"status", "ok"}}; diff --git a/src/mesh/http/WebServer.cpp b/src/mesh/http/WebServer.cpp index 1f376390b..271adc6c2 100644 --- a/src/mesh/http/WebServer.cpp +++ b/src/mesh/http/WebServer.cpp @@ -152,10 +152,11 @@ void createSSLCert() yield(); esp_task_wdt_reset(); - +#ifndef NO_SCREEN if (millis() / 1000 >= 3) { screen->setSSLFrames(); } +#endif } runLoop = false; } else { diff --git a/src/modules/CannedMessageModule.cpp b/src/modules/CannedMessageModule.cpp index aa52cf6cd..d526f5712 100644 --- a/src/modules/CannedMessageModule.cpp +++ b/src/modules/CannedMessageModule.cpp @@ -1,4 +1,5 @@ #include "configuration.h" +#ifndef NO_SCREEN #include "CannedMessageModule.h" #include "PowerFSM.h" // neede for button bypass #include "MeshService.h" @@ -548,3 +549,4 @@ void CannedMessageModule::handleSetCannedMessageModulePart4(const char *from_msg this->saveProtoForModule(); } } +#endif \ No newline at end of file diff --git a/src/modules/CannedMessageModule.h b/src/modules/CannedMessageModule.h index 9a755c54e..f393882d5 100644 --- a/src/modules/CannedMessageModule.h +++ b/src/modules/CannedMessageModule.h @@ -1,4 +1,6 @@ #pragma once +#ifdef NO_SCREEN +#else #include "ProtobufModule.h" #include "input/InputBroker.h" @@ -84,3 +86,4 @@ class CannedMessageModule : }; extern CannedMessageModule *cannedMessageModule; +#endif \ No newline at end of file diff --git a/src/modules/Modules.cpp b/src/modules/Modules.cpp index 0221418e6..2d308ca43 100644 --- a/src/modules/Modules.cpp +++ b/src/modules/Modules.cpp @@ -47,7 +47,9 @@ void setupModules() cardKbI2cImpl->init(); facesKbI2cImpl = new FacesKbI2cImpl(); facesKbI2cImpl->init(); +#ifndef NO_SCREEN cannedMessageModule = new CannedMessageModule(); +#endif #ifndef PORTDUINO new DeviceTelemetryModule(); new EnvironmentTelemetryModule(); diff --git a/src/modules/Telemetry/EnvironmentTelemetry.h b/src/modules/Telemetry/EnvironmentTelemetry.h index 48360312f..9f1551d92 100644 --- a/src/modules/Telemetry/EnvironmentTelemetry.h +++ b/src/modules/Telemetry/EnvironmentTelemetry.h @@ -15,7 +15,11 @@ class EnvironmentTelemetryModule : private concurrency::OSThread, public Protobu lastMeasurementPacket = nullptr; } virtual bool wantUIFrame() override; +#ifdef NO_SCREEN + void drawFrame(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y); +#else virtual void drawFrame(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y) override; +#endif protected: /** Called to handle a particular incoming message