- if owr:
- # Check if this was a reset cycle.
- t = self.samplenum - self.fall
- if t > self.cnt_normal_reset:
- # Save the sample number for the falling edge.
- self.rise = self.samplenum
- self.state = 'WAIT FOR PRESENCE DETECT'
- # Exit overdrive mode.
- if self.overdrive:
- self.put(self.fall, self.cnt_bit[self.overdrive],
- self.out_ann, [0, ['EXIT OVERDRIVE MODE']])
- self.overdrive = 0
- # Clear command bit counter and data register.
- self.bit_cnt = 0
- self.command = 0
- elif (t > self.cnt_overdrive_reset) and self.overdrive:
- # Save the sample number for the falling edge.
- self.rise = self.samplenum
- self.state = "WAIT FOR PRESENCE DETECT"
- # Otherwise this is assumed to be a data bit.
- else:
- self.state = "WAIT FOR FALLING EDGE"
+ if owr != 1:
+ continue
+
+ # Check if this was a reset cycle.
+ t = self.samplenum - self.fall
+ if t > self.cnt_normal_reset:
+ # Save the sample number for the falling edge.
+ self.rise = self.samplenum
+ self.state = 'WAIT FOR PRESENCE DETECT'
+ # Exit overdrive mode.
+ if self.overdrive:
+ self.put(self.fall, self.cnt_bit[self.overdrive],
+ self.out_ann, [0, ['EXIT OVERDRIVE MODE']])
+ self.overdrive = 0
+ # Clear command bit counter and data register.
+ self.bit_cnt = 0
+ self.command = 0
+ elif (t > self.cnt_overdrive_reset) and self.overdrive:
+ # Save the sample number for the falling edge.
+ self.rise = self.samplenum
+ self.state = "WAIT FOR PRESENCE DETECT"
+ # Otherwise this is assumed to be a data bit.
+ else:
+ self.state = "WAIT FOR FALLING EDGE"