From 42ca52b50cc0985c6be6969ff383d4cdb1490aa2 Mon Sep 17 00:00:00 2001 From: Uwe Hermann Date: Fri, 19 Apr 2019 00:25:31 +0200 Subject: 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. --- decoders/cc1101/pd.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'decoders') 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): -- cgit v1.2.3-70-g09d2