]> sigrok.org Git - libsigrokdecode.git/commitdiff
Fix obvious typos with string formatters
authorRyan Jarvis <redacted>
Sat, 19 Jan 2019 07:49:47 +0000 (23:49 -0800)
committerUwe Hermann <redacted>
Tue, 29 Jan 2019 23:08:39 +0000 (00:08 +0100)
decoders/ds243x/pd.py
decoders/usb_power_delivery/pd.py

index c7869a8d9c4af3ab2b39dcd4d4edc50b4ccdce58..c93395d400a68485315635e37b477d9cb7c90899 100644 (file)
@@ -110,7 +110,7 @@ class Decoder(srd.Decoder):
                 self.family, self.commands = family_codes[val & 0xff]
                 s = 'is 0x%02x, %s detected' % (self.family_code, self.family)
             else:
-                s = '%x%02x unknown' % (self.family_code)
+                s = '0x%02x unknown' % (self.family_code)
 
             self.putx([0, ['ROM: 0x%016x (%s)' % (val, 'family code ' + s),
                            'ROM: 0x%016x (%s)' % (val, self.family)]])
index 936842921ba7463283c8f921e992ea0ea916d30f..7c267682c7f4eef2ebc5dc7638105d8b3a63a260 100644 (file)
@@ -270,7 +270,7 @@ class Decoder(srd.Decoder):
         if pos in self.stored_pdos.keys():
             t_pdo = '#%d: %s' % (pos, self.stored_pdos[pos])
         else:
-            t_pdo = '#d' % (pos)
+            t_pdo = '#%d' % (pos)
 
         return '(PDO %s) %s%s' % (t_pdo, t_settings, t_flags)