mirror of
https://github.com/JoelBender/modpypes
synced 2025-10-26 21:49:19 +08:00
skip the rcount writes, it's not used and just confusing, output the correct PDU attribute
This commit is contained in:
parent
1f12980682
commit
8eb513af23
|
|
@ -218,11 +218,7 @@ class ConsoleClient(ConsoleCmd):
|
||||||
|
|
||||||
# get the register and count
|
# get the register and count
|
||||||
register = int(register)
|
register = int(register)
|
||||||
if len(args) == 4:
|
if _debug: ConsoleClient._debug(" - register: %r", register)
|
||||||
rcount = int(args[3])
|
|
||||||
else:
|
|
||||||
rcount = 1
|
|
||||||
if _debug: ConsoleClient._debug(" - register, rcount: %r, %r", register, rcount)
|
|
||||||
|
|
||||||
# decode the register into a type
|
# decode the register into a type
|
||||||
digits = int(math.log10(register)) + 1
|
digits = int(math.log10(register)) + 1
|
||||||
|
|
@ -281,7 +277,7 @@ class ConsoleClient(ConsoleCmd):
|
||||||
|
|
||||||
# write responses
|
# write responses
|
||||||
if isinstance(iocb.ioResponse, WriteSingleCoilResponse):
|
if isinstance(iocb.ioResponse, WriteSingleCoilResponse):
|
||||||
print(" ::= " + str(iocb.ioResponse.bits))
|
print(" ::= " + str(iocb.ioResponse.value))
|
||||||
|
|
||||||
elif isinstance(iocb.ioResponse, WriteSingleRegisterResponse):
|
elif isinstance(iocb.ioResponse, WriteSingleRegisterResponse):
|
||||||
print(" ::= " + str(iocb.ioResponse.value))
|
print(" ::= " + str(iocb.ioResponse.value))
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user