From 4054d7ff1ccfcb5771ee36cfbc98feebef42de45 Mon Sep 17 00:00:00 2001 From: kimble4 Date: Tue, 8 Oct 2024 21:56:23 +0100 Subject: [PATCH] Empty method for non-TFT LCD --- src/lcd.cpp | 5 +++++ src/lcd.h | 3 +++ src/net_manager.cpp | 10 ---------- 3 files changed, 8 insertions(+), 10 deletions(-) diff --git a/src/lcd.cpp b/src/lcd.cpp index 4374ab9a..bb7e93e7 100644 --- a/src/lcd.cpp +++ b/src/lcd.cpp @@ -735,6 +735,11 @@ void LcdTask::onButton(int long_press) } } +void LcdTask::setWifiMode(bool client, bool connected) +{ +//only used by the TFT display +} + LcdTask lcd; #endif // ENABLE_SCREEN_LCD_TFT diff --git a/src/lcd.h b/src/lcd.h index dc6819ef..a9246ec2 100644 --- a/src/lcd.h +++ b/src/lcd.h @@ -129,6 +129,7 @@ class LcdTask : public MicroTasks::Task void setInfoLine(LcdInfoLine info); void onButton(int event); + LcdInfoLine getNextInfoLine(LcdInfoLine info); @@ -154,6 +155,8 @@ class LcdTask : public MicroTasks::Task void display(const __FlashStringHelper *msg, int x, int y, int time, uint32_t flags); void display(String &msg, int x, int y, int time, uint32_t flags); void display(const char *msg, int x, int y, int time, uint32_t flags); + + void setWifiMode(bool client, bool connected); }; #endif // ENABLE_SCREEN_LCD_TFT diff --git a/src/net_manager.cpp b/src/net_manager.cpp index c93e05ea..68a41284 100644 --- a/src/net_manager.cpp +++ b/src/net_manager.cpp @@ -135,9 +135,7 @@ void NetManagerTask::wifiStartAccessPoint() _lcd.display(String(F("Pass: ")) + _softAP_password, 0, 1, 15 * 1000, LCD_CLEAR_LINE); _led.setWifiMode(false, false); -#ifdef ENABLE_SCREEN_LCD_TFT _lcd.setWifiMode(false, false); -#endif //ENABLE_SCREEN_LCD_TFT _apClients = 0; _state = NetState::AccessPointConnecting; } @@ -157,9 +155,7 @@ void NetManagerTask::wifiStartClient() wifiClientConnect(); _led.setWifiMode(true, false); -#ifdef ENABLE_SCREEN_LCD_TFT _lcd.setWifiMode(true, false); -#endif //ENABLE_SCREEN_LCD_TFT _state = NetState::StationClientConnecting; } @@ -211,9 +207,7 @@ void NetManagerTask::haveNetworkConnection(IPAddress myAddress) Mongoose.ipConfigChanged(); _led.setWifiMode(true, true); -#ifdef ENABLE_SCREEN_LCD_TFT _lcd.setWifiMode(true, true); -#endif //ENABLE_SCREEN_LCD_TFT _time.setHost(sntp_hostname.c_str()); _apAutoApStopTime = millis() + ACCESS_POINT_AUTO_STOP_TIMEOUT; @@ -290,9 +284,7 @@ void NetManagerTask::wifiOnAPModeStationConnected(const WiFiEventSoftAPModeStati _lcd.display(_ipaddress, 0, 1, (0 == _apClients ? 15 : 5) * 1000, LCD_CLEAR_LINE); _led.setWifiMode(false, true); -#ifdef ENABLE_SCREEN_LCD_TFT _lcd.setWifiMode(false, true); -#endif //ENABLE_SCREEN_LCD_TFT _apClients++; } @@ -302,9 +294,7 @@ void NetManagerTask::wifiOnAPModeStationDisconnected(const WiFiEventSoftAPModeSt if(0 == _apClients && NetState::AccessPointConnecting == _state) { _led.setWifiMode(false, false); -#ifdef ENABLE_SCREEN_LCD_TFT _lcd.setWifiMode(false, false); -#endif //ENABLE_SCREEN_LCD_TFT } }