Skip to content

Commit

Permalink
evse.cpp: Fix storing mode in nonvolatile memory
Browse files Browse the repository at this point in the history
  • Loading branch information
dingo35 committed May 5, 2023
1 parent 10e1403 commit ba8ba06
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion SmartEVSE-3/src/evse.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -559,13 +559,15 @@ void setMode(uint8_t NewMode) {
setAccess(0); //switch to OFF
if (LoadBl == 1) ModbusWriteSingleRequest(BROADCAST_ADR, 0x0003, NewMode);
Mode = NewMode;
write_settings();
setAccess(1);
return;
}
}

if (LoadBl == 1) ModbusWriteSingleRequest(BROADCAST_ADR, 0x0003, NewMode);
Mode = NewMode;
write_settings();
}
/**
* Set the solar stop timer
Expand Down Expand Up @@ -3146,7 +3148,6 @@ void StartwebServer(void) {
//we couldn't parse the string, so we are NOT Delayed Charging
StartTime.epoch2 = STARTTIME;
//TODO no delayed charging when RFID reader is installed?!?
write_settings();
doc["starttime"] = (StartTime.epoch2 ? StartTime.epoch2 + EPOCH2_OFFSET : 0);
}

Expand Down

0 comments on commit ba8ba06

Please sign in to comment.