diff options
Diffstat (limited to 'decoders/uart')
-rw-r--r-- | decoders/uart/pd.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/decoders/uart/pd.py b/decoders/uart/pd.py index f010480..d71fc23 100644 --- a/decoders/uart/pd.py +++ b/decoders/uart/pd.py @@ -222,7 +222,8 @@ class Decoder(srd.Decoder): 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': |