logextract: Improve handling of TMC UART read/write register commands
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
parent
c9b81e698e
commit
ddb795bccc
|
@ -130,7 +130,9 @@ class TMCUartHelper:
|
||||||
def pretty_print(self, addr, reg, val=None):
|
def pretty_print(self, addr, reg, val=None):
|
||||||
if val is None:
|
if val is None:
|
||||||
return "(%x@%x)" % (reg, addr)
|
return "(%x@%x)" % (reg, addr)
|
||||||
return "(%x@%x=%08x)" % (reg, addr, val)
|
if reg & 0x80:
|
||||||
|
return "(%x@%x=%08x)" % (reg & ~0x80, addr, val)
|
||||||
|
return "(%x@%x==%08x)" % (reg, addr, val)
|
||||||
def parse_msg(self, msg):
|
def parse_msg(self, msg):
|
||||||
data = bytearray(msg)
|
data = bytearray(msg)
|
||||||
if len(data) == 10:
|
if len(data) == 10:
|
||||||
|
|
Loading…
Reference in New Issue