diff options
author | Uwe Hermann <uwe@hermann-uwe.de> | 2017-06-16 12:14:28 +0200 |
---|---|---|
committer | Uwe Hermann <uwe@hermann-uwe.de> | 2017-06-16 12:48:39 +0200 |
commit | 3b44d89ee67b7dce3f6e2d7a948d94bd18d5b26c (patch) | |
tree | 6428b30f490c08dbdebd561bdb8efdf578470fad | |
parent | 02760d3b6096ab5afb1a2cfb746fcb5540ccd4c5 (diff) | |
download | libsigrokdecode-3b44d89ee67b7dce3f6e2d7a948d94bd18d5b26c.tar.gz libsigrokdecode-3b44d89ee67b7dce3f6e2d7a948d94bd18d5b26c.zip |
dali: Change 'self.dali' to 'dali'.
-rw-r--r-- | decoders/dali/pd.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/decoders/dali/pd.py b/decoders/dali/pd.py index 51d8284..bdb3fe6 100644 --- a/decoders/dali/pd.py +++ b/decoders/dali/pd.py @@ -202,23 +202,23 @@ class Decoder(srd.Decoder): bit = 0 while True: # TODO: Come up with more appropriate self.wait() conditions. - (self.dali,) = self.wait({'skip': 1}) + (dali,) = self.wait({'skip': 1}) if self.options['polarity'] == 'active-high': - self.dali ^= 1 # Invert. + dali ^= 1 # Invert. # State machine. if self.state == 'IDLE': # Wait for any edge (rising or falling). - if self.old_dali == self.dali: + if self.old_dali == dali: continue self.edges.append(self.samplenum) self.state = 'PHASE0' - self.old_dali = self.dali + self.old_dali = dali continue - if (self.old_dali != self.dali): + if self.old_dali != dali: self.edges.append(self.samplenum) - elif (self.samplenum == (self.edges[-1] + int(self.halfbit * 1.5))): + elif self.samplenum == (self.edges[-1] + int(self.halfbit * 1.5)): self.edges.append(self.samplenum - int(self.halfbit * 0.5)) else: continue @@ -238,4 +238,4 @@ class Decoder(srd.Decoder): self.bits.append([self.edges[-3], bit]) self.state = 'PHASE0' - self.old_dali = self.dali + self.old_dali = dali |