From c74e5ed5ac4c8ef05497b0610b4cf87efde2ba52 Mon Sep 17 00:00:00 2001 From: fvanroie Date: Sat, 7 Mar 2020 21:06:31 +0100 Subject: [PATCH] Add telnet --- src/hasp_config.cpp | 27 +++++++++++++++++++++++---- 1 file changed, 23 insertions(+), 4 deletions(-) diff --git a/src/hasp_config.cpp b/src/hasp_config.cpp index a1a8b386..4b7cd1ce 100644 --- a/src/hasp_config.cpp +++ b/src/hasp_config.cpp @@ -17,6 +17,7 @@ // #include "hasp_tft.h" #include "hasp_ota.h" #include "hasp_spiffs.h" +#include "hasp_telnet.h" #include "hasp.h" void confDebugSet(const char * name) @@ -139,15 +140,33 @@ void configWriteConfig() debugPrintln(String(F("CONF: Config LOADED first ")) + configFile); bool changed = true; + +#if HASP_USE_WIFI + changed |= wifiGetConfig(settings[F("wifi")].to()); + +#if HASP_USE_MQTT + changed |= mqttGetConfig(settings[F("mqtt")].to()); +#endif + +#if HASP_USE_TELNET + changed |= telnetGetConfig(settings[F("telnet")].to()); +#endif + +#if HASP_USE_MDNS + changed |= mdnsGetConfig(settings[F("mdns")].to()); +#endif + +#if HASP_USE_HTTP + changed |= httpGetConfig(settings[F("http")].to()); +#endif + +#endif + changed |= debugGetConfig(settings[F("debug")].to()); changed |= guiGetConfig(settings[F("gui")].to()); changed |= haspGetConfig(settings[F("hasp")].to()); - changed |= httpGetConfig(settings[F("http")].to()); - // changed |= mdnsGetConfig(settings[F("mdns")].to()); - changed |= mqttGetConfig(settings[F("mqtt")].to()); // changed |= otaGetConfig(settings[F("ota")].to()); // changed |= tftGetConfig(settings[F("tft")].to()); - changed |= wifiGetConfig(settings[F("wifi")].to()); if(changed) { File file = SPIFFS.open(configFile, "w");