From 8c6535d809ac4cf0338a2d90fecb401635dcddfb Mon Sep 17 00:00:00 2001 From: anno73 Date: Thu, 17 Dec 2020 21:10:59 +0100 Subject: [PATCH] Compiles in Arduino 1.8.13 --- src/ESP_Badlicht.ino | 17 +++++------------ src/iotWebConf.ino | 6 +++--- src/ntp.ino | 9 +++++---- 3 files changed, 13 insertions(+), 19 deletions(-) diff --git a/src/ESP_Badlicht.ino b/src/ESP_Badlicht.ino index f0a4a62..5ed342b 100644 --- a/src/ESP_Badlicht.ino +++ b/src/ESP_Badlicht.ino @@ -2,8 +2,7 @@ #include #include #include -//#include -//#include + //#include // https://arduinojson.org/v6/doc/ @@ -154,10 +153,10 @@ void setup() iotWebConf.setApTimeoutMs(0); // -- Set up required URL handlers on the web server. - server.on("/", handleRoot); - //server.on("/boot", handleBoot); - server.on("/config", []{ iotWebConf.handleConfig(); }); - server.onNotFound([](){ iotWebConf.handleNotFound(); }); + webServer.on("/", handleRoot); + //webServer.on("/boot", handleBoot); + webServer.on("/config", []{ iotWebConf.handleConfig(); }); + webServer.onNotFound([](){ iotWebConf.handleNotFound(); }); /* Serial << F("Initialize SPIFFS...\n"); @@ -209,9 +208,3 @@ void handleBoot() Serial << F("Reboot requested.\n"); needReset = true; } - - - - - - diff --git a/src/iotWebConf.ino b/src/iotWebConf.ino index 724798b..8032bc1 100644 --- a/src/iotWebConf.ino +++ b/src/iotWebConf.ino @@ -91,7 +91,7 @@ void setupIotWebConf() { iotWebConf.addParameter(&iotNtpTzOffset); - iotWebConf.setStatusPin(STATUS_PIN); + iotWebConf.setStatusPin(IOTWC_STATUS_PIN); iotWebConf.setConfigPin(IOTWC_BUTTON_PIN); iotWebConf.setConfigSavedCallback(&configSaved); @@ -137,7 +137,7 @@ void iotWebConfConvertStringParameters() { mqttHeartbeatIntervalInt = atoi(mqttHeartbeatInterval); - parolaCountModulesInt = atoi(parolaCountModules); +// parolaCountModulesInt = atoi(parolaCountModules); // parolaCountModulesInt = 12; mqttTopicPraefixLength = strlen(mqttTopicPraefix); @@ -209,4 +209,4 @@ bool formValidator() { return valid; -} // formValidator \ No newline at end of file +} // formValidator diff --git a/src/ntp.ino b/src/ntp.ino index 7daf39d..6ae6b41 100644 --- a/src/ntp.ino +++ b/src/ntp.ino @@ -36,9 +36,10 @@ void setupNtp () { // void loopNtp () { - static unsigned int oldSec = 0; +// static unsigned int oldSec = 0; static unsigned int oldMin = 0; - unsigned int nowSec, nowMin, nowHour; +// unsigned int nowSec, nowMin, nowHour; + unsigned int nowSec, nowMin; if ( ntpClient == NULL ) { return; @@ -59,7 +60,7 @@ void loopNtp () { nowSec = ntpClient->getSeconds(); nowMin = ntpClient->getMinutes(); - nowHour = ntpClient->getHours(); +// nowHour = ntpClient->getHours(); // Print current time once in a while if ((nowSec == 0) && (oldMin != nowMin)) { @@ -74,4 +75,4 @@ void loopNtp () { parolaSetTime(nowHour, nowMin, nowSec); } */ -} // loopNtp \ No newline at end of file +} // loopNtp