From 44789507022fe44660a6920bb7133d18839994a6 Mon Sep 17 00:00:00 2001
From: Uwe Hermann <uwe@hermann-uwe.de>
Date: Fri, 23 Feb 2018 16:57:22 +0100
Subject: dali: Avoid CamelCase in most places.

---
 decoders/dali/lists.py |  8 ++++----
 decoders/dali/pd.py    | 18 +++++++++---------
 2 files changed, 13 insertions(+), 13 deletions(-)

(limited to 'decoders')

diff --git a/decoders/dali/lists.py b/decoders/dali/lists.py
index 24e6bc4..e9d3a4b 100644
--- a/decoders/dali/lists.py
+++ b/decoders/dali/lists.py
@@ -17,8 +17,8 @@
 ## along with this program.  If not, see <http://www.gnu.org/licenses/>.
 ##
 
-# DALI Extended commands
-extendedCommands = {
+# DALI extended commands
+extended_commands = {
     0xA1: ['Terminate special processes', 'Terminate'],
     0xA3: ['DTR = DATA', 'DTR'],
     0xA5: ['INITIALISE', 'INIT'],
@@ -39,7 +39,7 @@ extendedCommands = {
 }
 
 # List of commands
-DALICommands = {
+dali_commands = {
     0x00: ['Immediate Off', 'IOFF'],
     0x01: ['Up 200ms', 'Up'],
     0x02: ['Down 200ms', 'Down'],
@@ -89,7 +89,7 @@ DALICommands = {
 }
 
 # DALI device type 8
-DALIDeviceType8 = {
+dali_device_type8 = {
     0xE0: ['Set Temp X-Y Coordinate', 'Set X-Y'],
     0xE2: ['Activate Colour Set point', 'Activate SetPoint'],
     0xE7: ['Set Colour Temperature Tc', 'DTRs->ColTemp'],
diff --git a/decoders/dali/pd.py b/decoders/dali/pd.py
index 5dd577d..bf842ad 100644
--- a/decoders/dali/pd.py
+++ b/decoders/dali/pd.py
@@ -63,7 +63,7 @@ class Decoder(srd.Decoder):
         self.samplenum = None
         self.edges, self.bits, self.ss_es_bits = [], [], []
         self.state = 'IDLE'
-        self.devType = None
+        self.dev_type = None
 
     def start(self):
         self.out_ann = self.register(srd.OUTPUT_ANN)
@@ -133,8 +133,8 @@ class Decoder(srd.Decoder):
             self.putb(1, 7, [5, s])
         elif f >= 160: # Extended command 0b10100000
             if f == 0xC1: # DALI_ENABLE_DEVICE_TYPE_X
-                self.devType = -1
-            x = extendedCommands.get(f, ['Unknown', 'Unk'])
+                self.dev_type = -1
+            x = extended_commands.get(f, ['Unknown', 'Unk'])
             s = ['Extended Command: %02X (%s)' % (f, x[0]),
                  'XC: %02X (%s)' % (f, x[1]),
                  'XC: %02X' % f, 'X: %02X' % f, 'X']
@@ -158,12 +158,12 @@ class Decoder(srd.Decoder):
 
         # Bits[9:16]: Command/data (MSB-first)
         if f >= 160 and f < 254:
-            if self.devType == -1:
-                self.devType = c
+            if self.dev_type == -1:
+                self.dev_type = c
                 s = ['Type: %d' % c, 'Typ: %d' % c,
                      'Typ: %d' % c, 'T: %d' % c, 'D']
             else:
-                self.devType = None
+                self.dev_type = None
                 s = ['Data: %d' % c, 'Dat: %d' % c,
                      'Dat: %d' % c, 'D: %d' % c, 'D']
         elif b[8][1] == 1:
@@ -182,12 +182,12 @@ class Decoder(srd.Decoder):
             elif un == 0xB0:
                 x = ['Query Scene %d Level' % ln, 'Sc %d Level' % ln]
             elif c >= 224: # Application specific commands
-                if self.devType == 8:
-                    x = DALIDeviceType8.get(c, ['Unknown App', 'Unk'])
+                if self.dev_type == 8:
+                    x = dali_device_type8.get(c, ['Unknown App', 'Unk'])
                 else:
                     x = ['Application Specific Command %d' % c, 'App Cmd %d' % c]
             else:
-                x = DALICommands.get(c, ['Unknown', 'Unk'])
+                x = dali_commands.get(c, ['Unknown', 'Unk'])
             s = ['Command: %d (%s)' % (c, x[0]), 'Com: %d (%s)' % (c, x[1]),
                  'Com: %d' % c, 'C: %d' % c, 'C']
         else:
-- 
cgit v1.2.3-70-g09d2