Skip to content

Commit

Permalink
BUG: Merge error prevents CT mode to turn on properly (#316)
Browse files Browse the repository at this point in the history
* CT mode not enabled due to duplicate case statement
  • Loading branch information
reinhard-brandstaedter authored Dec 2, 2024
1 parent 2fe43b9 commit cefa08c
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/solarflow/solarflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,11 +237,11 @@ def processRequestedChargeThrough(self) -> bool:
return False

def updBatteryTargetSoCMax(self, value: int):
self.batteryTargetSoCMax = value / 10
self.batteryTargetSoCMax = int(value/10)
self.processRequestedChargeThrough()

def updBatteryTargetSoCMin(self, value: int):
self.batteryTargetSoCMin = value / 10
self.batteryTargetSoCMin = int(value/10)
self.processRequestedChargeThrough()

def updOutputPack(self, value:int):
Expand Down Expand Up @@ -431,8 +431,10 @@ def handleMsg(self, msg):
self.updBatterySoC(sn=sn, value=int(value))
case "minSoc":
self.updMinSoC(int(value))
self.updBatteryTargetSoCMin(int(value))
case "socSet":
self.updSocSet(int(value))
self.updBatteryTargetSoCMax(int(value))
case "totalVol":
sn = msg.topic.split('/')[-2]
self.updBatteryVol(sn=sn, value=int(value))
Expand All @@ -456,10 +458,6 @@ def handleMsg(self, msg):
self.updByPass(int(value))
case "passMode":
self.updByPassMode(int(value))
case "socSet":
self.updBatteryTargetSoCMax(int(value))
case "minSoc":
self.updBatteryTargetSoCMin(int(value))
case "chargeThroughState":
pass
case _:
Expand Down

0 comments on commit cefa08c

Please sign in to comment.