mirror of
https://github.com/uhi22/pyPLC.git
synced 2024-11-20 01:13:58 +00:00
feature: preparation for stateUnrecoverableError
This commit is contained in:
parent
c762389806
commit
de13253342
2 changed files with 8 additions and 0 deletions
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue