mirror of
https://gitlab.com/zwirbel/illucat.git
synced 2025-12-18 02:36:40 +01:00
reenable ota
This commit is contained in:
@@ -9,6 +9,7 @@
|
||||
#include <PixelPlugin.h>
|
||||
#include <IrcPlugin.h>
|
||||
#include <OtaTcpPlugin.cpp>
|
||||
#include <MqttPlugin.h>
|
||||
|
||||
WiFiNet *network;
|
||||
Sprocket *sprocket;
|
||||
@@ -18,6 +19,7 @@ WebApiPlugin *webApiPlugin;
|
||||
PixelPlugin *pixelPlugin;
|
||||
IrcPlugin *ircPlugin;
|
||||
OtaTcpPlugin *otaTcp;
|
||||
MqttPlugin *mqttPlugin;
|
||||
|
||||
void setup()
|
||||
{
|
||||
@@ -25,6 +27,7 @@ void setup()
|
||||
sprocket = new Sprocket({STARTUP_DELAY, SERIAL_BAUD_RATE});
|
||||
pixelPlugin = new PixelPlugin({LED_STRIP_PIN, LED_STRIP_LENGTH, LED_STRIP_BRIGHTNESS, LED_STRIP_UPDATE_INTERVAL});
|
||||
ircPlugin = new IrcPlugin({IRC_SERVER, IRC_PORT, chipName, chipName});
|
||||
mqttPlugin = new MqttPlugin({MQTT_CLIENT_NAME, MQTT_HOST, MQTT_PORT, MQTT_ROOT_TOPIC});
|
||||
webServerPlugin = new WebServerPlugin({WEB_CONTEXT_PATH, WEB_DOC_ROOT, WEB_DEFAULT_FILE, WEB_PORT});
|
||||
webConfigPlugin = new WebConfigPlugin(webServerPlugin->server);
|
||||
webApiPlugin = new WebApiPlugin(webServerPlugin->server);
|
||||
@@ -36,6 +39,7 @@ void setup()
|
||||
sprocket->addPlugin(webApiPlugin);
|
||||
sprocket->addPlugin(otaTcp);
|
||||
sprocket->addPlugin(ircPlugin);
|
||||
sprocket->addPlugin(mqttPlugin);
|
||||
|
||||
network = new WiFiNet(
|
||||
WIFI_MODE,
|
||||
@@ -49,6 +53,7 @@ void setup()
|
||||
|
||||
webServerPlugin->server->serveStatic(PIXEL_CONFIG_FILE, SPIFFS, "pixelConfig.json");
|
||||
webServerPlugin->server->serveStatic(IRC_CONFIG_FILE, SPIFFS, "ircConfig.json");
|
||||
webServerPlugin->server->serveStatic(MQTT_CONFIG_FILE, SPIFFS, "mqttConfig.json");
|
||||
|
||||
sprocket->subscribe("irc/connected", [](String msg) {
|
||||
if (atoi(msg.c_str()))
|
||||
|
||||
Reference in New Issue
Block a user