Until now you could get e.g. "d" or "df" as hex output from the UART PD.
This will now be a common-length "0D" and "DF". When all data byte
annotations are of the same lengths the readability in GUI traces is a lot
better. Also, hardcode hex characters to be upper-case (for now).
The same applies to oct ("021" instead of "21") and bin output
("
00001001" instead of "1001").
elif f == 'dec':
self.putx(rxtx, [0, [s + str(b)]])
elif f == 'hex':
elif f == 'dec':
self.putx(rxtx, [0, [s + str(b)]])
elif f == 'hex':
- self.putx(rxtx, [0, [s + hex(b)[2:]]])
+ self.putx(rxtx, [0, [s + hex(b)[2:].zfill(2).upper()]])
- self.putx(rxtx, [0, [s + oct(b)[2:]]])
+ self.putx(rxtx, [0, [s + oct(b)[2:].zfill(3)]])
- self.putx(rxtx, [0, [s + bin(b)[2:]]])
+ self.putx(rxtx, [0, [s + bin(b)[2:].zfill(8)]])
else:
raise Exception('Invalid data format option: %s' % f)
else:
raise Exception('Invalid data format option: %s' % f)