]> sigrok.org Git - libsigrokdecode.git/commitdiff
rfm12: Avoid using the Python 'range' keyword as variable.
authorUwe Hermann <redacted>
Mon, 8 Sep 2014 09:54:25 +0000 (11:54 +0200)
committerUwe Hermann <redacted>
Mon, 8 Sep 2014 09:54:25 +0000 (11:54 +0200)
decoders/rfm12/pd.py

index c82a898f8e062c87eb9c27dd27de947dc3e63aca..bacd8b15f38d3388d77408851a95219660b170bc 100644 (file)
@@ -264,17 +264,17 @@ class Decoder(srd.Decoder):
         else:
             self.advance_ann(5, 2)
 
-        range = (cmd[1] & 0x30) >> 4
+        range_limit = (cmd[1] & 0x30) >> 4
         FREQ_TABLE = [0.0, 2.5, 5.0, 7.5]
         freq_delta = FREQ_TABLE[(self.last_config & 0x30) >> 4]
 
-        if range == 0:
+        if range_limit == 0:
             self.putx(0, 2, ['Range: No limit'])
-        elif range == 1:
+        elif range_limit == 1:
             self.putx(0, 2, ['Range: +/-%dkHz' % (15 * freq_delta)])
-        elif range == 2: 
+        elif range_limit == 2:
             self.putx(0, 2, ['Range: +/-%dkHz' % (7 * freq_delta)])
-        elif range == 3:
+        elif range_limit == 3:
             self.putx(0, 2, ['Range: +/-%dkHz' % (3 * freq_delta)])
 
         if (cmd[1] & 0x30) != (self.last_afc & 0x30):