Skip to content

Commit

Permalink
Merge pull request #39 from jsphuebner/Fix/EvseCurrent
Browse files Browse the repository at this point in the history
Reset EvseCurrent to 0 when outside state CurrentDemand
  • Loading branch information
uhi22 authored Oct 6, 2024
2 parents 073988f + 6cf33e8 commit 25a20f8
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion ccs/pevStateMachine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1115,11 +1115,14 @@ static void pev_runFsm(void)
if (connMgr_getConnectionLevel()==CONNLEVEL_80_TCP_RUNNING)
{
/* We have a TCP connection. This is the trigger for us. */
if (pev_state==PEV_STATE_NotYetInitialized) pev_enterState(PEV_STATE_Connected);
if (pev_state == PEV_STATE_NotYetInitialized) pev_enterState(PEV_STATE_Connected);
}

stateFunctions[pev_state](); //call state function

if (pev_state != PEV_STATE_WaitForCurrentDemandResponse) //only in currentDemand we have meaningful current values
Param::SetInt(Param::EvseCurrent, 0);

if (pev_isTooLong())
pev_enterState(PEV_STATE_SequenceTimeout);
}
Expand Down

0 comments on commit 25a20f8

Please sign in to comment.