From: Ryan Jarvis Date: Sat, 19 Jan 2019 07:49:47 +0000 (-0800) Subject: Fix obvious typos with string formatters X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=2eeca7bd81d1d8c9c82e33d1896f081a9a095363;p=libsigrokdecode.git Fix obvious typos with string formatters --- diff --git a/decoders/ds243x/pd.py b/decoders/ds243x/pd.py index c7869a8..c93395d 100644 --- a/decoders/ds243x/pd.py +++ b/decoders/ds243x/pd.py @@ -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)]]) diff --git a/decoders/usb_power_delivery/pd.py b/decoders/usb_power_delivery/pd.py index 9368429..7c26768 100644 --- a/decoders/usb_power_delivery/pd.py +++ b/decoders/usb_power_delivery/pd.py @@ -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)