From: Uwe Hermann Date: Fri, 10 Apr 2020 20:07:04 +0000 (+0200) Subject: ltc242x: Rename the 'ref' option to 'vref'. X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=2b61ff3d32c97494d6e065a382760e47edf59a71;p=libsigrokdecode.git ltc242x: Rename the 'ref' option to 'vref'. --- diff --git a/decoders/ltc242x/pd.py b/decoders/ltc242x/pd.py index 4999a4d..9bb6cc3 100644 --- a/decoders/ltc242x/pd.py +++ b/decoders/ltc242x/pd.py @@ -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)