We use the [XX] notation for non-printable characters, which is what
various other logic analyzer software packages do too, e.g. the
CWAV USBee Suite.
This fixes bug #201.
b, f = self.databyte[rxtx], self.options['format']
if f == 'ascii':
- self.putx(rxtx, [rxtx, [chr(b)]])
+ c = chr(b) if chr(b).isprintable() else '[%02X]' % b
+ self.putx(rxtx, [rxtx, [c]])
elif f == 'dec':
self.putx(rxtx, [rxtx, [str(b)]])
elif f == 'hex':