Skip to content

Commit

Permalink
Compiles in Arduino 1.8.13
Browse files Browse the repository at this point in the history
  • Loading branch information
anno73 committed Dec 17, 2020
1 parent ac9ade0 commit 8c6535d
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 19 deletions.
17 changes: 5 additions & 12 deletions src/ESP_Badlicht.ino
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
#include <ESP8266WebServer.h>
#include <ESP8266HTTPUpdateServer.h>
#include <DNSServer.h>
//#include <MQTT.h>
//#include <IotWebConf.h>

//#include <FS.h>

// https://arduinojson.org/v6/doc/
Expand Down Expand Up @@ -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");
Expand Down Expand Up @@ -209,9 +208,3 @@ void handleBoot()
Serial << F("Reboot requested.\n");
needReset = true;
}






6 changes: 3 additions & 3 deletions src/iotWebConf.ino
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -137,7 +137,7 @@ void iotWebConfConvertStringParameters() {

mqttHeartbeatIntervalInt = atoi(mqttHeartbeatInterval);

parolaCountModulesInt = atoi(parolaCountModules);
// parolaCountModulesInt = atoi(parolaCountModules);
// parolaCountModulesInt = 12;

mqttTopicPraefixLength = strlen(mqttTopicPraefix);
Expand Down Expand Up @@ -209,4 +209,4 @@ bool formValidator() {


return valid;
} // formValidator
} // formValidator
9 changes: 5 additions & 4 deletions src/ntp.ino
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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)) {
Expand All @@ -74,4 +75,4 @@ void loopNtp () {
parolaSetTime(nowHour, nowMin, nowSec);
}
*/
} // loopNtp
} // loopNtp

0 comments on commit 8c6535d

Please sign in to comment.