A => firmware/remote_sensors_esp32/include/config.h +8 -0
@@ 0,0 1,8 @@
+#define WANT_NTP 1
+#define WANT_OTA 1
+#define WANT_MDNS 1
+
+#define FIRMWARE_REVISION 1025
+
+#define RESET_INTERVAL (1000 * 3600 * 24 * 7)
+
M firmware/remote_sensors_esp32/platformio.ini +1 -1
@@ 10,7 10,7 @@
[env:nodemcuv2]
upload_protocol = espota
-upload_port = 192.168.5.73
+upload_port = ENVSENSOR-EC67F7.local
upload_flags = --auth=7648
platform = espressif8266
platform_packages =
M firmware/remote_sensors_esp32/src/main.cpp +8 -2
@@ 126,7 126,7 @@ void resetEverything() {
WiFi.persistent(false);
delay(250);
- ESP.reset();
+ ESP.restart();
delay(5000);
}
@@ 213,7 213,7 @@ void setup() {
if (!wifiManager.autoConnect()) {
DEBUG("WifiManager: failed to connect, we should reset as see if it connects");
delay(3000);
- ESP.reset();
+ ESP.restart();
delay(5000);
}
@@ 304,6 304,12 @@ void loop() {
ArduinoOTA.handle();
#endif /* WANT_OTA */
long tsm = millis();
+
+ if(tsm > RESET_INTERVAL) {
+ ESP.restart();
+ delay(1000);
+ }
+
btn.tick();
if((tsm/1000) > (lastreport + 30)) {