diff options
author | Uwe Hermann <uwe@hermann-uwe.de> | 2019-04-19 00:25:31 +0200 |
---|---|---|
committer | Uwe Hermann <uwe@hermann-uwe.de> | 2019-04-19 00:33:16 +0200 |
commit | 42ca52b50cc0985c6be6969ff383d4cdb1490aa2 (patch) | |
tree | 2c2160e29cb524b4095988d098d6a76725463931 /decoders | |
parent | a782243ca99896030aa9004533b7140b860e8049 (diff) | |
download | libsigrokdecode-42ca52b50cc0985c6be6969ff383d4cdb1490aa2.tar.gz libsigrokdecode-42ca52b50cc0985c6be6969ff383d4cdb1490aa2.zip |
cc1101: Remove 0x prefixes and unneeded quotation marks.
The format "0xAA BB CC ..." looks a bit strange, use "AA BB CC" instead,
it's relatively obvious that the data is hex-encoded.
The quotation marks around some names/values are unneeded and reduce
readability a bit, so drop them.
Diffstat (limited to 'decoders')
-rw-r--r-- | decoders/cc1101/pd.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/decoders/cc1101/pd.py b/decoders/cc1101/pd.py index 8c4c631..fd13540 100644 --- a/decoders/cc1101/pd.py +++ b/decoders/cc1101/pd.py @@ -121,7 +121,7 @@ class Decoder(srd.Decoder): return self.cmd if self.cmd == 'Strobe': reg = strobes.get(self.dat, 'unknown strobe') - return '{} "{}"'.format(self.cmd, reg) + return '{} {}'.format(self.cmd, reg) else: return 'TODO Cmd {}'.format(self.cmd) @@ -170,7 +170,7 @@ class Decoder(srd.Decoder): if regid not in regs: self.warn(pos, 'unknown register') return - name = '{} (0x{:02X})'.format(regs[regid], regid) + name = '{} ({:02X})'.format(regs[regid], regid) else: name = regid @@ -203,7 +203,7 @@ class Decoder(srd.Decoder): else: longtext_fifo = '{} bytes free in TX FIFO'.format(fifo_bytes) - text = '{} = "0x{:02X}"'.format(label, status) + text = '{} = {:02X}'.format(label, status) longtext = ''.join([text, '; ', longtext_chiprdy, longtext_state, longtext_fifo]) self.putp2(pos, ann, longtext, text) @@ -215,7 +215,7 @@ class Decoder(srd.Decoder): return '{:02X}'.format(b) data = ' '.join([escape(b) for b in data]) - text = '{} = "0x{}"'.format(label, data) + text = '{} = {}'.format(label, data) self.putp(pos, ann, text) def finish_command(self, pos): |