mirror of
https://github.com/JoelBender/modpypes
synced 2025-10-19 21:30:44 +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
|
||||
register = int(register)
|
||||
if len(args) == 4:
|
||||
rcount = int(args[3])
|
||||
else:
|
||||
rcount = 1
|
||||
if _debug: ConsoleClient._debug(" - register, rcount: %r, %r", register, rcount)
|
||||
if _debug: ConsoleClient._debug(" - register: %r", register)
|
||||
|
||||
# decode the register into a type
|
||||
digits = int(math.log10(register)) + 1
|
||||
|
@ -281,7 +277,7 @@ class ConsoleClient(ConsoleCmd):
|
|||
|
||||
# write responses
|
||||
if isinstance(iocb.ioResponse, WriteSingleCoilResponse):
|
||||
print(" ::= " + str(iocb.ioResponse.bits))
|
||||
print(" ::= " + str(iocb.ioResponse.value))
|
||||
|
||||
elif isinstance(iocb.ioResponse, WriteSingleRegisterResponse):
|
||||
print(" ::= " + str(iocb.ioResponse.value))
|
||||
|
|
Loading…
Reference in New Issue
Block a user