fix: state B at end of charging. Improvement: slower soc simulation

This commit is contained in:
uhi22 2022-12-12 20:54:17 +01:00
parent 132e71f16d
commit e7b222ca4c
2 changed files with 3 additions and 2 deletions

View file

@ -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()):

View file

@ -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):