Skip to content

Commit

Permalink
Merge pull request #1315 from LKuemmel/fix
Browse files Browse the repository at this point in the history
fix fault state handling
  • Loading branch information
LKuemmel authored Dec 20, 2023
2 parents 167ac4e + 0bb58a7 commit 85e4a96
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ def clear_rfid(self) -> None:
req.get_http_session().get('http://'+ip_address+'/clearRfid', timeout=(timeout, None))

def interrupt_cp(self, duration: int) -> None:
with SingleComponentUpdateContext(self.component_info, False):
with SingleComponentUpdateContext(self.fault_state, False):
with self.__client_error_context:
ip_address = self.config.configuration.ip_address
timeout = self.config.configuration.timeout
Expand Down
2 changes: 1 addition & 1 deletion packages/modules/devices/lg/bat.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def update(self, response) -> None:
try:
soc = float(response["statistics"]["bat_user_soc"])
except ValueError:
self.component_info.fault_state.warning('Speicher-SOC ist nicht numerisch und wird auf 0 gesetzt.')
self.fault_state.warning('Speicher-SOC ist nicht numerisch und wird auf 0 gesetzt.')
soc = 0

imported, exported = self.sim_counter.sim_count(power)
Expand Down
2 changes: 1 addition & 1 deletion packages/modules/devices/rct/bat.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def update(self, rct_client: RCT) -> None:
self.store.set(bat_state)
if (stat1.value + stat2.value + stat3.value) > 0:
# Werte werden trotz Fehlercode übermittelt.
self.component_info.fault_state.warning(
self.fault_state.warning(
f"Alarm Status Speicher ist ungleich 0. Status 1: {stat1.value}, Status 2: {stat2.value}, "
f"Status 3: {stat3.value}")

Expand Down
2 changes: 1 addition & 1 deletion packages/modules/devices/rct/counter.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def update(self, rct_client: RCT):
self.store.set(counter_state)
if (stat1.value + stat2.value + stat3.value + stat4.value) > 0:
# Werte werden trotz Fehlercode übermittelt.
self.component_info.fault_state.warning(
self.fault_state.warning(
f"Alarm Status Speicher ist ungleich 0. Status 1: {stat1.value}, Status 2: {stat2.value}, "
f"Status 3: {stat3.value}, Status 4: {stat4.value},")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ def _loop():
if self.cp1:
self.cp1.update(data["global_data"], data["cp1"].data, data["rfid_data"])
time.sleep(1.1)
with SingleComponentUpdateContext(self.cp0.module.component_info):
with SingleComponentUpdateContext(self.cp0.module.fault_state):
# Allgemeine Fehlermeldungen an LP 1:
if self.cp1_client_handler is None:
with self.cp0_client_handler.client:
Expand Down

0 comments on commit 85e4a96

Please sign in to comment.