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 # req -508
# Todo: close the TCP connection here. # Todo: close the TCP connection here.
# Todo: Unlock the connector lock. # Todo: Unlock the connector lock.
self.hardwareInterface.setStateB()
self.addToTrace("Charging is finished") self.addToTrace("Charging is finished")
self.enterState(stateChargingFinished) self.enterState(stateChargingFinished)
if (self.isTooLong()): if (self.isTooLong()):

View file

@ -103,8 +103,8 @@ class hardwareInterface():
def mainfunction(self): def mainfunction(self):
if (self.simulatedSoc<100): if (self.simulatedSoc<100):
if ((self.outvalue & 2)!=0): if ((self.outvalue & 2)!=0):
# while the relay is closes, simulate increasing SOC # while the relay is closed, simulate increasing SOC
self.simulatedSoc = self.simulatedSoc + 1.0 self.simulatedSoc = self.simulatedSoc + 0.05
self.loopcounter+=1 self.loopcounter+=1
if (self.isInterfaceOk): if (self.isInterfaceOk):
if (self.loopcounter>15): if (self.loopcounter>15):