Compiles
This commit is contained in:
parent
e82c9e07ad
commit
0929f103c5
@ -12,3 +12,4 @@
|
||||
platform = espressif32
|
||||
board = lolin_s2_mini
|
||||
framework = arduino
|
||||
lib_deps = adafruit/Adafruit SSD1306@^2.5.13
|
||||
|
@ -1,6 +1,6 @@
|
||||
#include <ESP8266WiFi.h>
|
||||
#include <WiFi.h>
|
||||
#include <WiFiClient.h>
|
||||
#include <ESP8266WebServer.h>
|
||||
#include <WebServer.h>
|
||||
#include <LittleFS.h>
|
||||
#include <DNSServer.h>
|
||||
#include <map>
|
||||
@ -24,7 +24,7 @@ public:
|
||||
|
||||
private:
|
||||
Adafruit_SSD1306& display;
|
||||
std::unique_ptr<ESP8266WebServer> server;
|
||||
std::unique_ptr<WebServer> server;
|
||||
std::map<String, String> _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 += "<tr><td><button onclick=\"location.href='/select?ssid=" + urlEncode(ssid) + "'\">" + ssid + "</button></td><td>" + (openNetwork ? "(Open)" : "(Secured)") + "</td><td>" + String(rssi) + " dBm</td></tr>";
|
||||
|
Loading…
Reference in New Issue
Block a user