(Consistently use single-quotes for all Python strings everywhere)
# Save the sample number for the rising edge.
self.rise = self.samplenum
self.putfr([2, ['Reset', 'Rst', 'R']])
# Save the sample number for the rising edge.
self.rise = self.samplenum
self.putfr([2, ['Reset', 'Rst', 'R']])
- self.state = "WAIT FOR PRESENCE DETECT"
+ self.state = 'WAIT FOR PRESENCE DETECT'
# Otherwise this is assumed to be a data bit.
else:
# Otherwise this is assumed to be a data bit.
else:
- self.state = "WAIT FOR FALLING EDGE"
+ self.state = 'WAIT FOR FALLING EDGE'
elif self.state == 'WAIT FOR PRESENCE DETECT':
# Sample presence status.
t = self.samplenum - self.rise
elif self.state == 'WAIT FOR PRESENCE DETECT':
# Sample presence status.
t = self.samplenum - self.rise
rgb_value |= int(blue)
self.cmd_es = es
rgb_value |= int(blue)
self.cmd_es = es
- self.putx([0, ["#%.6x" % rgb_value]])
+ self.putx([0, ['#%.6x' % rgb_value]])
self.out_ann = self.register(srd.OUTPUT_ANN)
def handle_11bits(self):
self.out_ann = self.register(srd.OUTPUT_ANN)
def handle_11bits(self):
- s = "".join(str(i) for i in self.bits[:2])
+ s = ''.join(str(i) for i in self.bits[:2])
self.dac_select = s = dacs[int(s, 2)]
self.put(self.ss_dac, self.es_dac, self.out_ann,
[0, ['DAC select: %s' % s, 'DAC sel: %s' % s,
self.dac_select = s = dacs[int(s, 2)]
self.put(self.ss_dac, self.es_dac, self.out_ann,
[0, ['DAC select: %s' % s, 'DAC sel: %s' % s,
self.put(self.ss_gain, self.es_gain, self.out_ann,
[1, ['Gain: x%d' % g, 'G: x%d' % g, 'x%d' % g]])
self.put(self.ss_gain, self.es_gain, self.out_ann,
[1, ['Gain: x%d' % g, 'G: x%d' % g, 'x%d' % g]])
- s = "".join(str(i) for i in self.bits[3:])
+ s = ''.join(str(i) for i in self.bits[3:])
self.dac_value = v = int(s, 2)
self.put(self.ss_value, self.es_value, self.out_ann,
[2, ['DAC value: %d' % v, 'Value: %d' % v, 'Val: %d' % v,
self.dac_value = v = int(s, 2)
self.put(self.ss_value, self.es_value, self.out_ann,
[2, ['DAC value: %d' % v, 'Value: %d' % v, 'Val: %d' % v,