X-Git-Url: http://sigrok.org/gitweb/?a=blobdiff_plain;f=decoders%2Fad79x0%2Fpd.py;h=3d7ab7315b5479ed06d87288b383a4630a5e50ed;hb=5b6fb5aee2237543fd9f26085d0ffa3631c6cb02;hp=d4dead9dbd42e54fd6e9a679f5e2c079f81504fb;hpb=f40e0a7379d42ce36e9d81073e16924c0ddba1b8;p=libsigrokdecode.git diff --git a/decoders/ad79x0/pd.py b/decoders/ad79x0/pd.py index d4dead9..3d7ab73 100644 --- a/decoders/ad79x0/pd.py +++ b/decoders/ad79x0/pd.py @@ -25,7 +25,7 @@ modes = { 2: ['Power Up Mode', 'Power Up', 'PU'], } -input_voltage_format = ['%fV', '%fV', '%.6fV', '%.2fV'] +input_voltage_format = ['%.6fV', '%.2fV'] validation = { 'invalid': ['Invalid data', 'Invalid', 'N/A'], @@ -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)