]> sigrok.org Git - libsigrokdecode.git/commitdiff
nrf905: More readable annotation byte values.
authorUwe Hermann <redacted>
Tue, 26 May 2020 20:06:03 +0000 (22:06 +0200)
committerUwe Hermann <redacted>
Tue, 26 May 2020 20:09:44 +0000 (22:09 +0200)
Drop the 0x prefix for each byte in annotations (for improved readability).

Also, use 02X instead of 02x (printf-style formats).

decoders/nrf905/pd.py

index cc22e930274c0ee0443fe426f78edf7378000004..3192c476df13a0840babfa1ba94dcebe4cd9c05b 100644 (file)
@@ -173,7 +173,7 @@ class Decoder(srd.Decoder):
         ss, es = cmd_bytes[1][1], 0
         data = ''
         for byte in cmd_bytes[1:]:
-            data += '0x' + format(byte[0], '02x') + ' '
+            data += format(byte[0], '02X') + ' '
             es = byte[2]
         self.put(ss, es, self.out_ann, [ann, [prefix + data]])