Skip to content

Commit f711f31

Browse files
committed
integrate reset call update
1 parent 701ab96 commit f711f31

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

src/ocpp.cpp

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,6 @@
1717

1818
#include "emonesp.h" //for VOLTAGE_DEFAULT
1919

20-
#include "net_manager.h" //shut down network connection before reset
21-
#include "espal.h"
22-
2320
#define LCD_DISPLAY(X) if (lcd) lcd->display((X), 0, 1, 5 * 1000, LCD_CLEAR_LINE);
2421

2522

@@ -287,11 +284,13 @@ unsigned long ArduinoOcppTask::loop(MicroTasks::WakeReason reason) {
287284

288285
if (resetTriggered) {
289286
if (millis() - resetTime >= 10000UL) { //wait for 10 seconds after reset command to send the conf msg
287+
resetTriggered = false; //execute only once
288+
290289
if (resetHard) {
291290
//TODO send reset command to all peripherals
292291
}
293-
net_wifi_disconnect();
294-
ESPAL.reset();
292+
293+
restart_system();
295294
}
296295
}
297296

0 commit comments

Comments
 (0)