Skip to content

Commit

Permalink
fix crash caused by PR#134
Browse files Browse the repository at this point in the history
  • Loading branch information
lincomatic committed Feb 9, 2021
1 parent 2be2fde commit 985f682
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
4 changes: 4 additions & 0 deletions firmware/open_evse/CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
Change Log

202100208 SCL V7.1.2
- fix spontaneous reboot caused by PR#134 RAPI_BTN code
-> when button disabled, didn't pat the watchdog before m_Btn.read()

20210111 SCL V7.1.1
- added ECVF_TIME_LIMIT, ECVF_CHARGE_LIMIT
- move ECVF_AMMETER_CAL to 0x8000
Expand Down
7 changes: 3 additions & 4 deletions firmware/open_evse/open_evse.ino
Original file line number Diff line number Diff line change
Expand Up @@ -2186,9 +2186,11 @@ int8_t BtnHandler::DoShortPress(int8_t infaultstate)

void BtnHandler::ChkBtn()
{
WDT_RESET();
m_Btn.read();

if (!g_EvseController.ButtonIsEnabled()) {
#ifdef RAPI_BTN
m_Btn.read();
if (m_Btn.shortPress()) {
RapiSendButtonPress(0);
} else if (m_Btn.longPress()) {
Expand All @@ -2198,11 +2200,8 @@ void BtnHandler::ChkBtn()
return;
}

WDT_RESET();

int8_t infaultstate = g_EvseController.InFaultState();

m_Btn.read();
if (m_Btn.shortPress()) {
if (DoShortPress(infaultstate)) {
goto longpress;
Expand Down

0 comments on commit 985f682

Please sign in to comment.