mirror of
https://gitee.com/Lyon1998/pikapython.git
synced 2025-01-29 17:22:56 +08:00
update modbus
This commit is contained in:
parent
abb557093a
commit
69236b37e5
@ -52,8 +52,7 @@ class ModBus(_modbus._ModBus):
|
||||
|
||||
def deserializeReadRegisters(self, msg: bytes) -> list:
|
||||
self.readBuff = msg
|
||||
length = len(msg)
|
||||
dest = super().deserializeReadRegisters(length)
|
||||
dest = super().deserializeReadRegisters(len(msg))
|
||||
ret = []
|
||||
for i in range(0, len(dest), 2):
|
||||
ret.append(int(dest[i]) + int(dest[i + 1]) * 256)
|
||||
|
Loading…
x
Reference in New Issue
Block a user