From 4a6fa63ef740e0dbdbf6d5005ff1f11bb54aea1e Mon Sep 17 00:00:00 2001 From: neonb Date: Thu, 23 Jan 2025 16:15:49 +0100 Subject: [PATCH] dev pipe --- src/components/pipe_cutter_component.py | 4 ++-- src/ui/test_pipe_cutter/test_pipe_cutter.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/pipe_cutter_component.py b/src/components/pipe_cutter_component.py index 5429437..9d45e74 100644 --- a/src/components/pipe_cutter_component.py +++ b/src/components/pipe_cutter_component.py @@ -47,8 +47,6 @@ class PipeCutterComponent(ModbusComponent): try: # Read holding register at 4x767 (register 767) for a single register (count=1) response = self.read(register=766, count=1, ) - status = response - return status except KeyError as ke: self.log.error(f"KeyError while accessing Pipe Cutter register 4x766: {ke}") @@ -62,6 +60,8 @@ class PipeCutterComponent(ModbusComponent): self.log.error(f"Unexpected error in Pipe Cutter _get method at 4x766: {e}") raise + super()._get([response]) + def _convert_from_format(self, data, formatting=None, decoding_map=None): if decoding_map is not None and data in decoding_map: data = decoding_map[data] diff --git a/src/ui/test_pipe_cutter/test_pipe_cutter.py b/src/ui/test_pipe_cutter/test_pipe_cutter.py index 4c02279..9be9ef8 100644 --- a/src/ui/test_pipe_cutter/test_pipe_cutter.py +++ b/src/ui/test_pipe_cutter/test_pipe_cutter.py @@ -101,7 +101,7 @@ class Test_Pipe_Cutter(Test_Test): return data = data[-1] if self.end_cut is True: - ok = "Done" + ok = True else: ok = None