feature: preparation for stateUnrecoverableError

This commit is contained in:
uhi22 2023-05-03 21:57:36 +02:00
parent c762389806
commit de13253342
2 changed files with 8 additions and 0 deletions

View file

@ -32,4 +32,5 @@
- [ ] configurable serial interface and baud rate
- [ ] add plausibilization between EVSEPresentVoltage and physicalVoltage before closing contactors (configurable)
- [ ] find out how a normal end of charging session works (Stopped on charger, stopped on car)
- [ ] PevMode: Evaluate the error code reported by the charger, and enter into state stateUnrecoverableError.
- [ ] (and some more)

View file

@ -30,6 +30,7 @@ stateWaitForCurrentDemandResponse = 13
stateWaitForWeldingDetectionResponse = 14
stateWaitForSessionStopResponse = 15
stateChargingFinished = 16
stateUnrecoverableError = 88
stateSequenceTimeout = 99
@ -578,6 +579,11 @@ class fsmPev():
# lower layers SLAC, SDP, together with the connection manager. Nothing to do here.
self.publishStatus("ERROR Timeout")
def stateFunctionUnrecoverableError(self):
# Here we end, if the EVSE reported an error code, which terminates the charging session.
# This is an end of the PEV state machine. The re-init is performed by the lower layers. Nothing more to do here.
self.publishStatus("ERROR reported")
stateFunctions = {
stateNotYetInitialized: stateFunctionNotYetInitialized,
stateConnecting: stateFunctionConnecting,
@ -596,6 +602,7 @@ class fsmPev():
stateWaitForWeldingDetectionResponse: stateFunctionWaitForWeldingDetectionResponse,
stateWaitForSessionStopResponse: stateFunctionWaitForSessionStopResponse,
stateChargingFinished: stateFunctionChargingFinished,
stateUnrecoverableError: stateFunctionUnrecoverableError,
stateSequenceTimeout: stateFunctionSequenceTimeout
}