Compare commits
No commits in common. "e1cdde0fc9f8d696816119dbfe97c76b62ca19aa" and "76d8416a41e16ad8cf577c7d6744d08cc83cd679" have entirely different histories.
e1cdde0fc9
...
76d8416a41
3 changed files with 4 additions and 33 deletions
|
@ -52,8 +52,6 @@ String DEVICE_NAME = "weatherstation";
|
|||
//#define HTTP_CALL_ON_WINDSPEED_EXCEED
|
||||
//#define HTTP_CALL_SEND_JSON_DATA
|
||||
//#define SHOW_SENSOR_DATA_ON_WEBUPDATER_MAIN_PAGE
|
||||
//#define DEBUG_RESET_REASON
|
||||
#define WEB_RESET
|
||||
|
||||
/********************************************************************************/
|
||||
|
||||
|
|
|
@ -88,6 +88,10 @@ void setup() {
|
|||
Serial.begin(SERIAL_BAUD_RATE);
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG_RESET_REASON
|
||||
debugResetReason();
|
||||
#endif
|
||||
|
||||
// Pin settings
|
||||
pinMode(BAT_CHARGED_PIN, INPUT);
|
||||
pinMode(BAT_CHARGING_PIN, INPUT);
|
||||
|
@ -117,10 +121,6 @@ void setup() {
|
|||
//It's magic! leave in
|
||||
delay(100);
|
||||
|
||||
#ifdef DEBUG_RESET_REASON
|
||||
debugResetReason();
|
||||
#endif
|
||||
|
||||
#ifdef BATTERY_POWERED
|
||||
debug("battery powered");
|
||||
|
||||
|
|
|
@ -54,9 +54,6 @@ void setupWebUpdater(String device, String ip)
|
|||
#ifdef DEBUG_WINDSPEED_MEASUREMENT
|
||||
httpServer.on("/measWind", measureWindspeed);
|
||||
#endif
|
||||
#ifdef WEB_RESET
|
||||
httpServer.on("/resetESP", resetESP);
|
||||
#endif
|
||||
#ifdef USE_LOGGER
|
||||
httpServer.on("/showlog", showLog);
|
||||
#endif
|
||||
|
@ -128,9 +125,6 @@ void showHTMLMain(void)
|
|||
#ifdef HOMEBRIDGE_WEBSTAT
|
||||
"<br><a href=\"http://" + _webUpdater_ip + ":8080/hbWebstat\">homebridge websatt</a><br>"
|
||||
#endif
|
||||
#ifdef WEB_RESET
|
||||
"<br><a href=\"http://" + _webUpdater_ip + ":8080/resetESP\">reset ESP</a><br>"
|
||||
#endif
|
||||
#ifdef SHOW_SENSOR_DATA_ON_WEBUPDATER_MAIN_PAGE
|
||||
"<br><br><table>"
|
||||
TR_TD_START_STR + "temperature" + TD_TD_MID_STR + String(_webUpdater_sensValues[SENSOR_TEMPERATURE]) + TR_TD_END_STR
|
||||
|
@ -188,27 +182,6 @@ void hb_webstat_send(void)
|
|||
|
||||
//*************************************************************************//
|
||||
|
||||
#ifdef WEB_RESET
|
||||
|
||||
void resetESP()
|
||||
{
|
||||
|
||||
String message = "<html><head><title>OKO Weatherstation - " + String(_webUpdater_dev) + " - reset WiFi manager</title>"
|
||||
"<meta http-equiv=\"refresh\" content=\"20\">"
|
||||
"</head><body>"
|
||||
"Rebooting...<br>"
|
||||
"</body></html>";
|
||||
|
||||
httpServer.send(200, "text/html", message);
|
||||
|
||||
delay(5000);
|
||||
|
||||
// manual reset after restart is required
|
||||
ESP.restart();
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#ifndef DISABLE_WIFIMANAGER
|
||||
|
||||
void resetWifiManager()
|
||||
|
|
Loading…
Reference in a new issue