Skip to content

Commit 2540fd5

Browse files
committed
Set the charge rate on the schedule
This is to ensure that the eco mode does not conflict ad the timer will operate as a boost if used at the same as echo mode.
1 parent 5c7050e commit 2540fd5

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/scheduler.cpp

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -222,9 +222,13 @@ unsigned long Scheduler::loop(MicroTasks::WakeReason reason)
222222
DBUGF("Starting %s claim",
223223
currentEvent.getState().toString());
224224
EvseProperties properties(currentEvent.getState());
225-
_evse->claim(EvseClient_OpenEVSE_Schedule,
226-
EvseState::Active == currentEvent.getState() ? EvseManager_Priority_Timer : EvseManager_Priority_Default,
227-
properties);
225+
int priority = EvseManager_Priority_Default;
226+
if(EvseState::Active == currentEvent.getState())
227+
{
228+
priority = EvseManager_Priority_Timer;
229+
properties.setChargeCurrent(_evse->getMaxHardwareCurrent());
230+
}
231+
_evse->claim(EvseClient_OpenEVSE_Schedule, priority, properties);
228232
} else {
229233
// No scheduled events, release any claims
230234
DBUGLN("releasing claims");

0 commit comments

Comments
 (0)