Skip to content

Commit ba30226

Browse files
Merge pull request #548 from KipK/BOOTLOCK
Unlock Evse module when Wifi module is ready
2 parents c350268 + 835bf73 commit ba30226

File tree

2 files changed

+15
-2
lines changed

2 files changed

+15
-2
lines changed

platformio.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ lib_deps =
3535
jeremypoulter/[email protected]
3636
jeremypoulter/Micro [email protected]
3737
jeremypoulter/[email protected]
38-
jeremypoulter/[email protected].11
38+
jeremypoulter/[email protected].12
3939
jeremypoulter/[email protected]
4040
jeremypoulter/[email protected]
4141
jeremypoulter/[email protected]

src/evse_monitor.cpp

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,6 +273,19 @@ void EvseMonitor::evseBoot(const char *firmware)
273273
_openevse.heartbeatEnable(EVSE_HEATBEAT_INTERVAL, EVSE_HEARTBEAT_CURRENT, [this](int ret, int interval, int current, int triggered) {
274274
_heartbeat = RAPI_RESPONSE_OK == ret;
275275
});
276+
277+
// Unlock OpenEVSE if compiled with BOOTLOCK
278+
_openevse.clearBootLock([this](int ret)
279+
{
280+
if(RAPI_RESPONSE_OK == ret)
281+
{
282+
DBUGF("Unlocked OpenEVSE");
283+
}
284+
else {
285+
DBUGF("Unlock OpenEVSE failed")
286+
}
287+
288+
});
276289
}
277290

278291
void EvseMonitor::updateEvseState(uint8_t evse_state, uint8_t pilot_state, uint32_t vflags)
@@ -312,7 +325,7 @@ void EvseMonitor::updateEvseState(uint8_t evse_state, uint8_t pilot_state, uint3
312325
}
313326

314327
void EvseMonitor::verifyPilot() {
315-
// After some state changes the OpenEVSE module compiled with PP_AUTO_AMPACITY will reset to the maximum pilot level, so reset to what we expect
328+
// OpenEVSE module compiled with PP_AUTO_AMPACITY will reset to the maximum pilot level, so reset to what we expect
316329
_openevse.getCurrentCapacity([this](int ret, long min_current, long max_hardware_current, long pilot, long max_configured_current)
317330
{
318331
if(RAPI_RESPONSE_OK == ret && pilot > getPilot())

0 commit comments

Comments
 (0)