mirror of
https://github.com/HendrikRauh/dmx-interface.git
synced 2025-12-15 23:34:07 +00:00
added logic for loading available networks
This commit is contained in:
parent
5c5e8e9e5a
commit
12aa87ac90
7 changed files with 145 additions and 11 deletions
|
|
@ -46,6 +46,7 @@ void setup()
|
|||
// WiFi.begin(ssid, pwd);
|
||||
WiFi.softAP(ssid, pwd);
|
||||
WiFi.softAPConfig(ip, gateway, subnet);
|
||||
WiFi.scanNetworks(true);
|
||||
// WiFi.config(ip, gateway, subnet);
|
||||
// while (WiFi.status() != WL_CONNECTED) {
|
||||
// Serial.print(".");
|
||||
|
|
@ -54,6 +55,8 @@ void setup()
|
|||
// Serial.print("WiFi connected, IP = ");
|
||||
// Serial.println(WiFi.localIP());
|
||||
|
||||
delay(5000);
|
||||
|
||||
// Initialize Art-Net
|
||||
artnet.begin();
|
||||
|
||||
|
|
@ -94,6 +97,9 @@ void setup()
|
|||
|
||||
ESP.restart(); });
|
||||
|
||||
server.on("/networks", HTTP_GET, [](AsyncWebServerRequest *request)
|
||||
{ onGetNetworks(request); });
|
||||
|
||||
server.onRequestBody([](AsyncWebServerRequest *request, uint8_t *data, size_t len, size_t index, size_t total)
|
||||
{
|
||||
if (request->url() == "/config" && request->method() == HTTP_PUT) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue