summaryrefslogtreecommitdiff
path: root/decoders/ltc242x
diff options
context:
space:
mode:
authorUwe Hermann <uwe@hermann-uwe.de>2020-04-10 22:07:04 +0200
committerUwe Hermann <uwe@hermann-uwe.de>2020-04-11 15:09:15 +0200
commit2b61ff3d32c97494d6e065a382760e47edf59a71 (patch)
treeeee1f74f196fd1043992179cf5ec2bd9dda28e26 /decoders/ltc242x
parenta3b9585c554843a6db0c8468b2f37598dbe29bac (diff)
downloadlibsigrokdecode-2b61ff3d32c97494d6e065a382760e47edf59a71.tar.gz
libsigrokdecode-2b61ff3d32c97494d6e065a382760e47edf59a71.zip
ltc242x: Rename the 'ref' option to 'vref'.
Diffstat (limited to 'decoders/ltc242x')
-rw-r--r--decoders/ltc242x/pd.py4
1 files changed, 2 insertions, 2 deletions
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)