DbgMuxPeer: use %03u for logging Rx/Tx counter values

This makes the header length consistent in logging messages.
master
Vadim Yanitskiy 6 months ago committed by Vadim Yanitskiy
parent 45788b2783
commit 7c2094dc44
  1. 4
      peer.py

@ -51,7 +51,7 @@ class DbgMuxPeer:
frame = DbgMuxFrame.Frame.build(c)[:-2] # strip b'\x00\x00'
c['FCS'] = DbgMuxFrame.fcs_func(frame)
log.debug('Tx frame (Ns=%d, Nr=%d, fcs=0x%04x) %s %s',
log.debug('Tx frame (Ns=%03u, Nr=%03u, fcs=0x%04x) %s %s',
c['TxCount'], c['RxCount'], c['FCS'],
c['MsgType'], c['MsgData'].hex())
@ -64,7 +64,7 @@ class DbgMuxPeer:
def recv(self) -> Container:
c = DbgMuxFrame.Frame.parse_stream(self._sl)
log.debug('Rx frame (Ns=%d, Nr=%d, fcs=0x%04x) %s %s',
log.debug('Rx frame (Ns=%03u, Nr=%03u, fcs=0x%04x) %s %s',
c['TxCount'], c['RxCount'], c['FCS'],
c['MsgType'], c['MsgData'].hex())

Loading…
Cancel
Save