]> sigrok.org Git - libsigrokdecode.git/commitdiff
ltc242x: Rename the 'ref' option to 'vref'.
authorUwe Hermann <redacted>
Fri, 10 Apr 2020 20:07:04 +0000 (22:07 +0200)
committerUwe Hermann <redacted>
Sat, 11 Apr 2020 13:09:15 +0000 (15:09 +0200)
decoders/ltc242x/pd.py

index 4999a4d51c0bae1e5b762a8e9c87d4060500aaed..9bb6cc35096ae17c5bf6264237d74a160aa9330a 100644 (file)
@@ -41,7 +41,7 @@ class Decoder(srd.Decoder):
         ('input', 'Input voltage', (1,)),
     )
     options = (
-        {'id': 'ref', 'desc': 'Reference voltage', 'default': 1.5},
+        {'id': 'vref', 'desc': 'Reference voltage (V)', 'default': 1.5},
     )
 
     def __init__(self):
@@ -65,7 +65,7 @@ class Decoder(srd.Decoder):
     def handle_input_voltage(self, data):
         input_voltage = data & 0x3FFFFF
         input_voltage = -(2**21 - input_voltage)
-        input_voltage = (input_voltage / 0xfffff) * self.options['ref']
+        input_voltage = (input_voltage / 0xfffff) * self.options['vref']
         ann = []
         for format in input_voltage_format:
             ann.append(format % input_voltage)