ook: Fix two typos which affect the decoding results.
authorUwe Hermann <uwe@hermann-uwe.de>
Sat, 13 Oct 2018 15:49:04 +0000 (17:49 +0200)
committerUwe Hermann <uwe@hermann-uwe.de>
Sat, 13 Oct 2018 15:49:04 +0000 (17:49 +0200)
decoders/ook/pd.py

index b4971b621d3a330391c92e5388bfb35297794ffb..d3e2eee0731e226d3132a0f78e3d2f728c32ed7e 100644 (file)
@@ -189,7 +189,7 @@ class Decoder(srd.Decoder):
         # Filter incoming pulses to remove random noise.
         if self.state == 'DECODE_TIMEOUT':
             self.preamble = []
-            self.edge_count == 0
+            self.edge_count = 0
             self.word_first = self.samplenum
             self.sample_first = self.samplenum - self.samplenumber_last
             self.state = 'WAITING_FOR_PREAMBLE'
@@ -205,7 +205,7 @@ class Decoder(srd.Decoder):
                 self.preamble = [] # Clear buffer.
                 self.preamble.append([self.samplenumber_last,
                                      pre_samples, state])
-                self.edge_count == 0
+                self.edge_count = 0
                 self.samplenumber_last = self.samplenum
                 self.word_first = self.samplenum
             else: