Skip to content

Commit

Permalink
Merge pull request #2768 from LKuemmel/fix
Browse files Browse the repository at this point in the history
fix rct
  • Loading branch information
LKuemmel authored Aug 3, 2023
2 parents ffa5ab4 + ac6be1e commit fab8b83
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
8 changes: 4 additions & 4 deletions packages/modules/devices/rct/bat.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,14 @@ def update(self, rct_client: RCT) -> None:
# read all parameters
rct_client.read(my_tab)

if (int(stat1.value) + int(stat2.value) + int(stat3.value)) > 0:
if (stat1.value + stat2.value + stat3.value) > 0:
raise FaultState.error("Alarm Status Speicher ist ungleich 0.")

bat_state = BatState(
power=int(watt1.value) * -1,
power=watt1.value * -1,
soc=socx.value * 100,
imported=int(watt2.value),
exported=int(watt3.value)
imported=watt2.value,
exported=watt3.value
)
self.store.set(bat_state)

Expand Down
14 changes: 7 additions & 7 deletions packages/modules/devices/rct/counter.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,16 +35,16 @@ def update(self, rct_client: RCT):
# read all parameters
rct_client.read(my_tab)

if (int(stat1) + int(stat2) + int(stat3) + int(stat4)) > 0:
if (stat1.value + stat2.value + stat3.value + stat4.value) > 0:
raise FaultState.error("Alarm Status Zähler ist ungleich 0.")

counter_state = CounterState(
imported=int(imported.value),
exported=int(exported.value)*-1.0,
power=int(power.value),
frequency=int(freq.value),
powers=[int(power1.value), int(power2.value), int(power3.value)],
voltages=[int(volt1.value), int(volt2.value), int(volt3.value)]
imported=imported.value,
exported=exported.value*-1.0,
power=power.value,
frequency=freq.value,
powers=[power1.value, power2.value, power3.value],
voltages=[volt1.value, volt2.value, volt3.value]
)
self.store.set(counter_state)

Expand Down

0 comments on commit fab8b83

Please sign in to comment.