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

index d966ed947e9aa12e10531a84a95ddc265ae298f2..3d7ab7315b5479ed06d87288b383a4630a5e50ed 100644 (file)
@@ -54,7 +54,7 @@ class Decoder(srd.Decoder):
         ('data_validation', 'Data validation', (2,)),
     )
     options = (
-        {'id': 'ref', 'desc': 'Reference voltage', 'default': 1.5},
+        {'id': 'vref', 'desc': 'Reference voltage (V)', 'default': 1.5},
     )
 
     def __init__(self,):
@@ -108,7 +108,7 @@ class Decoder(srd.Decoder):
                             self.put_validation([self.start_sample, es], 'complete')
                         elif nb_bits < 16:
                             self.put_validation([self.start_sample, es], 'incomplete')
-                        vin = (self.data / ((2**12) - 1)) * self.options['ref']
+                        vin = (self.data / ((2**12) - 1)) * self.options['vref']
                         self.put_data([self.start_sample, es], vin)
                 elif nb_bits < 10:
                     self.put_mode([self.start_sample, es], 1)