From 11959ea30b0274034874e18776d7385900cb78b5 Mon Sep 17 00:00:00 2001 From: Patrick Balsiger Date: Fri, 9 Nov 2018 20:02:51 +0100 Subject: [PATCH] use port property --- src/IlluCat.h | 2 +- src/config.h | 1 + src/wifi/main.cpp | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/IlluCat.h b/src/IlluCat.h index 90355f9..f3ac3c1 100644 --- a/src/IlluCat.h +++ b/src/IlluCat.h @@ -25,7 +25,7 @@ class IlluCat : public Sprocket { sprocketConfig = cfg; webConfig = webCfg; - server = new AsyncWebServer(80); + server = new AsyncWebServer(webConfig.port); server->serveStatic(PIXEL_CONFIG_FILE, SPIFFS, "pixelConfig.json"); addPlugin(new PixelPlugin()); addPlugin(new WebServerPlugin(webConfig, server)); diff --git a/src/config.h b/src/config.h index 936dde4..0225b6d 100644 --- a/src/config.h +++ b/src/config.h @@ -36,6 +36,7 @@ #define WEB_CONTEXT_PATH "/" #define WEB_DOC_ROOT "/www" #define WEB_DEFAULT_FILE "index.html" +#define WEB_PORT 80 // NeoPixel #define LED_STRIP_PIN D2 diff --git a/src/wifi/main.cpp b/src/wifi/main.cpp index 49579a3..fa696f8 100644 --- a/src/wifi/main.cpp +++ b/src/wifi/main.cpp @@ -9,7 +9,7 @@ void setup() { sprocket = new IlluCat( {STARTUP_DELAY, SERIAL_BAUD_RATE}, - {WEB_CONTEXT_PATH, WEB_DOC_ROOT, WEB_DEFAULT_FILE}); + {WEB_CONTEXT_PATH, WEB_DOC_ROOT, WEB_DEFAULT_FILE, WEB_PORT}); network = new WiFiNet( SPROCKET_MODE, STATION_SSID,