mirror of
https://github.com/uhi22/pyPLC.git
synced 2024-11-20 01:13:58 +00:00
fix: state B at end of charging. Improvement: slower soc simulation
This commit is contained in:
parent
132e71f16d
commit
e7b222ca4c
2 changed files with 3 additions and 2 deletions
|
@ -424,6 +424,7 @@ class fsmPev():
|
|||
# req -508
|
||||
# Todo: close the TCP connection here.
|
||||
# Todo: Unlock the connector lock.
|
||||
self.hardwareInterface.setStateB()
|
||||
self.addToTrace("Charging is finished")
|
||||
self.enterState(stateChargingFinished)
|
||||
if (self.isTooLong()):
|
||||
|
|
|
@ -103,8 +103,8 @@ class hardwareInterface():
|
|||
def mainfunction(self):
|
||||
if (self.simulatedSoc<100):
|
||||
if ((self.outvalue & 2)!=0):
|
||||
# while the relay is closes, simulate increasing SOC
|
||||
self.simulatedSoc = self.simulatedSoc + 1.0
|
||||
# while the relay is closed, simulate increasing SOC
|
||||
self.simulatedSoc = self.simulatedSoc + 0.05
|
||||
self.loopcounter+=1
|
||||
if (self.isInterfaceOk):
|
||||
if (self.loopcounter>15):
|
||||
|
|
Loading…
Reference in a new issue