From 0929f103c5e4d6f42db56bf5ae9f328edf798921 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomislav=20Kopi=C4=87?= Date: Tue, 19 Nov 2024 08:30:20 +0100 Subject: [PATCH] Compiles --- platformio.ini | 1 + src/SmartCube/cubeWifiManager.h | 10 +++++----- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/platformio.ini b/platformio.ini index ed4078e..9fd694a 100644 --- a/platformio.ini +++ b/platformio.ini @@ -12,3 +12,4 @@ platform = espressif32 board = lolin_s2_mini framework = arduino +lib_deps = adafruit/Adafruit SSD1306@^2.5.13 diff --git a/src/SmartCube/cubeWifiManager.h b/src/SmartCube/cubeWifiManager.h index b1f94b5..8a3f426 100644 --- a/src/SmartCube/cubeWifiManager.h +++ b/src/SmartCube/cubeWifiManager.h @@ -1,6 +1,6 @@ -#include +#include #include -#include +#include #include #include #include @@ -24,7 +24,7 @@ public: private: Adafruit_SSD1306& display; - std::unique_ptr server; + std::unique_ptr server; std::map _ssids; String _ssid, _pass; bool _hidden; @@ -176,7 +176,7 @@ void cubeWifiManager::createAP() { display.println(WiFi.softAPIP().toString()); display.display(); - server.reset(new ESP8266WebServer(80)); + server.reset(new WebServer(80)); DNSServer dnsServer; dnsServer.start(53, "*", WiFi.softAPIP()); @@ -303,7 +303,7 @@ void cubeWifiManager::handleRoot() { // Get SSID and signal strength String ssid = WiFi.SSID(i); int rssi = WiFi.RSSI(i); - bool openNetwork = (WiFi.encryptionType(i) == ENC_TYPE_NONE); + bool openNetwork = (WiFi.encryptionType(i) == WIFI_AUTH_OPEN); // Show network with button to select result += "" + (openNetwork ? "(Open)" : "(Secured)") + "" + String(rssi) + " dBm";