diff options
author | Uwe Hermann <uwe@hermann-uwe.de> | 2014-10-12 14:58:25 +0200 |
---|---|---|
committer | Uwe Hermann <uwe@hermann-uwe.de> | 2014-10-12 14:59:56 +0200 |
commit | cda1352a7ce0248e6db1996d9ddb9dbee2f91e8b (patch) | |
tree | 84a066dc139dedf51f3a109e4455200b2fdbdc34 /decoders/am230x | |
parent | f87162978a3f804d43ae12208c3d6a4a86382c1c (diff) | |
download | libsigrokdecode-cda1352a7ce0248e6db1996d9ddb9dbee2f91e8b.tar.gz libsigrokdecode-cda1352a7ce0248e6db1996d9ddb9dbee2f91e8b.zip |
am230x: Change option to 'device' to allow for more devices.
Diffstat (limited to 'decoders/am230x')
-rw-r--r-- | decoders/am230x/pd.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/decoders/am230x/pd.py b/decoders/am230x/pd.py index 9a783b9..02f8af2 100644 --- a/decoders/am230x/pd.py +++ b/decoders/am230x/pd.py @@ -47,8 +47,8 @@ class Decoder(srd.Decoder): {'id': 'sda', 'name': 'SDA', 'desc': 'Single wire serial data line'}, ) options = ( - {'id': 'dht11', 'desc': 'DHT11 compatibility mode', - 'default': 'no', 'values': ('no', 'yes')}, + {'id': 'device', 'desc': 'Device type', + 'default': 'am230x', 'values': ('am230x', 'dht11')}, ) annotations = ( ('start', 'Start'), @@ -101,7 +101,7 @@ class Decoder(srd.Decoder): def calculate_humidity(self, bitlist): h = 0 - if self.options['dht11'] == 'yes': + if self.options['device'] == 'dht11': h = self.bits2num(bitlist[0:8]) else: h = self.bits2num(bitlist) / 10 @@ -109,7 +109,7 @@ class Decoder(srd.Decoder): def calculate_temperature(self, bitlist): t = 0 - if self.options['dht11'] == 'yes': + if self.options['device'] == 'dht11': t = self.bits2num(bitlist[0:8]) else: t = self.bits2num(bitlist[1:]) / 10 |