]> sigrok.org Git - libsigrokdecode.git/commitdiff
srd: i2c: Drop unneeded %s usage.
authorUwe Hermann <redacted>
Thu, 12 Jan 2012 21:07:50 +0000 (22:07 +0100)
committerUwe Hermann <redacted>
Thu, 12 Jan 2012 21:31:11 +0000 (22:31 +0100)
decoders/i2c.py

index 15ef9c617dfb1526f6baf17914d71f2eca578cd5..083fbb315324067451facefbc70e732d69de315f 100644 (file)
@@ -240,16 +240,10 @@ class Decoder(srd.Decoder):
             cmd = 'DATA_READ'
 
         self.put(self.out_proto, [cmd, d, ack_bit])
-        self.put(self.out_ann, [ANN_SHIFTED, [
-                '%s' % protocol[cmd][0],
-                '0x%02x' % d,
-                '%s' % protocol[ack_bit][0]]
-            ])
-        self.put(self.out_ann, [ANN_SHIFTED_SHORT, [
-                '%s' % protocol[cmd][1],
-                '0x%02x' % d,
-                '%s' % protocol[ack_bit][1]]
-            ])
+        self.put(self.out_ann, [ANN_SHIFTED,
+                 [protocol[cmd][0], '0x%02x' % d, protocol[ack_bit][0]]])
+        self.put(self.out_ann, [ANN_SHIFTED_SHORT,
+                 [protocol[cmd][1], '0x%02x' % d, protocol[ack_bit][1]]])
 
         self.bitcount = self.databyte = 0
         self.startsample = -1