From 5688c8b81e3a608e6fdd5dfc526440c3680ed744 Mon Sep 17 00:00:00 2001 From: Jm Date: Sat, 9 Jan 2021 17:50:58 -0800 Subject: [PATCH] more linux build fixes --- src/graphics/Screen.cpp | 7 ++++++- src/main.cpp | 5 +++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/graphics/Screen.cpp b/src/graphics/Screen.cpp index d4a1f5e7..97b24df3 100644 --- a/src/graphics/Screen.cpp +++ b/src/graphics/Screen.cpp @@ -31,11 +31,14 @@ along with this program. If not, see . #include "graphics/images.h" #include "main.h" #include "mesh-pb-constants.h" -#include "mesh/wifi/WiFiAPClient.h" #include "plugins/TextMessagePlugin.h" #include "target_specific.h" #include "utils.h" +#ifndef NO_ESP32 +#include "mesh/wifi/WiFiAPClient.h" +#endif + using namespace meshtastic; /** @todo remove */ namespace graphics @@ -895,10 +898,12 @@ void Screen::setFrames() // call a method on debugInfoScreen object (for more details) normalFrames[numframes++] = &Screen::drawDebugInfoSettingsTrampoline; +#ifndef NO_ESP32 if (isWifiAvailable()) { // call a method on debugInfoScreen object (for more details) normalFrames[numframes++] = &Screen::drawDebugInfoWiFiTrampoline; } +#endif ui.setFrames(normalFrames, numframes); ui.enableAllIndicators(); diff --git a/src/main.cpp b/src/main.cpp index 1b736578..605b9196 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -19,7 +19,6 @@ #include "concurrency/Periodic.h" #include "graphics/Screen.h" #include "main.h" -#include "mesh/wifi/WiFiAPClient.h" #include "plugins/Plugins.h" #include "sleep.h" #include "target_specific.h" @@ -29,6 +28,7 @@ #ifndef NO_ESP32 #include "mesh/wifi/WebServer.h" +#include "mesh/wifi/WiFiAPClient.h" #include "nimble/BluetoothUtil.h" #endif @@ -513,10 +513,11 @@ void setup() } #endif + +#ifndef NO_ESP32 // Initialize Wifi initWifi(forceSoftAP); -#ifndef NO_ESP32 // Start web server thread. webServerThread = new WebServerThread(); #endif