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";