if self.pulse_width != 0:
self.clocks.append(self.pulse_width)
self.state = 'GET SECOND PULSE WIDTH'
if self.pulse_width != 0:
self.clocks.append(self.pulse_width)
self.state = 'GET SECOND PULSE WIDTH'
self.ss_edge = self.samplenum
def find_second_pulse_width(self):
if self.pulse_width > (self.clocks[0] * 1.3) or \
self.pulse_width <= (self.clocks[0] * 0.75):
self.ss_edge = self.samplenum
def find_second_pulse_width(self):
if self.pulse_width > (self.clocks[0] * 1.3) or \
self.pulse_width <= (self.clocks[0] * 0.75):
self.pulse_width <= (self.clocks[0] * 0.75)) \
and (self.pulse_width > (self.clocks[1] * 1.3) or \
self.pulse_width <= (self.clocks[1] * 0.75))):
self.pulse_width <= (self.clocks[0] * 0.75)) \
and (self.pulse_width > (self.clocks[1] * 1.3) or \
self.pulse_width <= (self.clocks[1] * 0.75))):
self.ss_edge = self.samplenum
# The message of the calculated bitrate should start at this sample
# (right after the synchronisation).
self.ss_edge = self.samplenum
# The message of the calculated bitrate should start at this sample
# (right after the synchronisation).