From 39b073ac40b50d47280b9b33518aff3734c29d6a Mon Sep 17 00:00:00 2001 From: mino Date: Tue, 12 Jul 2022 14:22:37 +0200 Subject: [PATCH] wip --- src/components/modbus_component.py | 4 ++-- src/components/tecna_marposs_provaset_t3.py | 1 + src/test/tecna.py | 2 +- src/ui/test_leak/test_leak.py | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/components/modbus_component.py b/src/components/modbus_component.py index 70b987b..2ad3018 100644 --- a/src/components/modbus_component.py +++ b/src/components/modbus_component.py @@ -52,7 +52,7 @@ class ModbusComponent(Component): read = self.client.read_holding_registers(register, count=count) self.lock.unlock() if read.isError(): - self.log.exception(traceback.format_exception(read)) + self.log.exception(traceback.format_exception(type(read), read, read.__traceback__)) return None return read @@ -61,7 +61,7 @@ class ModbusComponent(Component): wrote = self.client.write_registers(register, value, skip_encode=True) self.lock.unlock() if wrote.isError(): - self.log.exception(traceback.format_exception(wrote)) + self.log.exception(traceback.format_exception(type(wrote), wrote, wrote.__traceback__)) return False return True diff --git a/src/components/tecna_marposs_provaset_t3.py b/src/components/tecna_marposs_provaset_t3.py index 08e2a67..dd0819f 100644 --- a/src/components/tecna_marposs_provaset_t3.py +++ b/src/components/tecna_marposs_provaset_t3.py @@ -129,6 +129,7 @@ class TecnaMarpossProvasetT3(ModbusComponent): # "pressure_ramp": self.pressure_ramp_sb, # "stabilization_cycles": self.stabilization_cycles_sb, recipe = { + "Selection number of test table on which you intend to work": table, "Type of test": "LEAK TEST", # "Test flags": recipe.spec[""], "T0 - Pre-filling time": recipe.spec["pre_filling_time"], diff --git a/src/test/tecna.py b/src/test/tecna.py index 4092ddf..ccf13b9 100644 --- a/src/test/tecna.py +++ b/src/test/tecna.py @@ -2,7 +2,7 @@ import pymodbus.exceptions import serial from pymodbus.client.sync import ModbusSerialClient as ModbusClient -client = ModbusClient(method="rtu", port="COM3", stopbits=serial.STOPBITS_ONE, bytesize=serial.EIGHTBITS, parity=serial.PARITY_NONE, baudrate=115200, timeout=1, strict=False) +client = ModbusClient(method="rtu", port="/dev/ttyUSB0", stopbits=serial.STOPBITS_ONE, bytesize=serial.EIGHTBITS, parity=serial.PARITY_NONE, baudrate=115200, timeout=1, strict=False) status = client.connect() read_data = client.read_holding_registers(1, count=1) if type(read_data) is not pymodbus.exceptions.ModbusIOException: diff --git a/src/ui/test_leak/test_leak.py b/src/ui/test_leak/test_leak.py index 01a73d0..8f224e5 100644 --- a/src/ui/test_leak/test_leak.py +++ b/src/ui/test_leak/test_leak.py @@ -28,7 +28,7 @@ class Test_Leak(Test_Test): super().get([{ "time": data.get("time", None), "results": { - "ok": type(data["tecna_t3"]["Running test: result"]) is str and "passed" in data["tecna_t3"]["Running test: result"].lower(), + "ok": False and type(data["tecna_t3"]["Running test: result"]) is str and "passed" in data["tecna_t3"]["Running test: result"].lower(), "result": data["tecna_t3"]["Running test: result"], "data": data["tecna_t3"], },