Compare commits

..

No commits in common. "e1cdde0fc9f8d696816119dbfe97c76b62ca19aa" and "76d8416a41e16ad8cf577c7d6744d08cc83cd679" have entirely different histories.

3 changed files with 4 additions and 33 deletions

View file

@ -52,8 +52,6 @@ String DEVICE_NAME = "weatherstation";
//#define HTTP_CALL_ON_WINDSPEED_EXCEED //#define HTTP_CALL_ON_WINDSPEED_EXCEED
//#define HTTP_CALL_SEND_JSON_DATA //#define HTTP_CALL_SEND_JSON_DATA
//#define SHOW_SENSOR_DATA_ON_WEBUPDATER_MAIN_PAGE //#define SHOW_SENSOR_DATA_ON_WEBUPDATER_MAIN_PAGE
//#define DEBUG_RESET_REASON
#define WEB_RESET
/********************************************************************************/ /********************************************************************************/

View file

@ -88,6 +88,10 @@ void setup() {
Serial.begin(SERIAL_BAUD_RATE); Serial.begin(SERIAL_BAUD_RATE);
#endif #endif
#ifdef DEBUG_RESET_REASON
debugResetReason();
#endif
// Pin settings // Pin settings
pinMode(BAT_CHARGED_PIN, INPUT); pinMode(BAT_CHARGED_PIN, INPUT);
pinMode(BAT_CHARGING_PIN, INPUT); pinMode(BAT_CHARGING_PIN, INPUT);
@ -117,10 +121,6 @@ void setup() {
//It's magic! leave in //It's magic! leave in
delay(100); delay(100);
#ifdef DEBUG_RESET_REASON
debugResetReason();
#endif
#ifdef BATTERY_POWERED #ifdef BATTERY_POWERED
debug("battery powered"); debug("battery powered");

View file

@ -54,9 +54,6 @@ void setupWebUpdater(String device, String ip)
#ifdef DEBUG_WINDSPEED_MEASUREMENT #ifdef DEBUG_WINDSPEED_MEASUREMENT
httpServer.on("/measWind", measureWindspeed); httpServer.on("/measWind", measureWindspeed);
#endif #endif
#ifdef WEB_RESET
httpServer.on("/resetESP", resetESP);
#endif
#ifdef USE_LOGGER #ifdef USE_LOGGER
httpServer.on("/showlog", showLog); httpServer.on("/showlog", showLog);
#endif #endif
@ -128,9 +125,6 @@ void showHTMLMain(void)
#ifdef HOMEBRIDGE_WEBSTAT #ifdef HOMEBRIDGE_WEBSTAT
"<br><a href=\"http://" + _webUpdater_ip + ":8080/hbWebstat\">homebridge websatt</a><br>" "<br><a href=\"http://" + _webUpdater_ip + ":8080/hbWebstat\">homebridge websatt</a><br>"
#endif #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 #ifdef SHOW_SENSOR_DATA_ON_WEBUPDATER_MAIN_PAGE
"<br><br><table>" "<br><br><table>"
TR_TD_START_STR + "temperature" + TD_TD_MID_STR + String(_webUpdater_sensValues[SENSOR_TEMPERATURE]) + TR_TD_END_STR 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 #ifndef DISABLE_WIFIMANAGER
void resetWifiManager() void resetWifiManager()