From dd73904109c02308a562251e68ba164a54842832 Mon Sep 17 00:00:00 2001 From: Nicolas Date: Sun, 19 Nov 2023 23:57:26 +0100 Subject: [PATCH] ModBusBK9050 argument watchdog fixed --- pyhoff.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyhoff.py b/pyhoff.py index 0af5935..cb134f3 100644 --- a/pyhoff.py +++ b/pyhoff.py @@ -25,7 +25,7 @@ class ModBusBK9050(ModbusClient): default state. A value of 0 deactivates the watchdog. """ - ModbusClient.__init__(self, host, port, auto_open=True, debug=debug, timeout=timeout, watchdog=watchdog) + ModbusClient.__init__(self, host, port, auto_open=True, debug=debug, timeout=timeout) self.bus_terminals = list() self.next_output_bit_offset = 0 self.next_input_bit_offset = 0 @@ -36,7 +36,7 @@ class ModBusBK9050(ModbusClient): #config watchdog on page 58 #set time-out/deactivate watchdog timer (deactivate: timeout = 0): - self.write_single_register(0x1120, timeout * 1000) #ms + self.write_single_register(0x1120, watchdog * 1000) #ms #reset watchdog timer: self.write_single_register(0x1121, 0xBECF)