diff --git a/adi/ad719x.py b/adi/ad719x.py index c8ae4a9f6..beade3eb2 100644 --- a/adi/ad719x.py +++ b/adi/ad719x.py @@ -23,7 +23,7 @@ def __init__(self, uri="", device_name=""): """Constructor for AD719x class.""" context_manager.__init__(self, uri, self._device_name) - compatible_parts = ["ad7190", "ad7192", "ad7193", "ad7194", "ad7195"] + compatible_parts = ["ad7190", "ad7191","ad7192", "ad7193", "ad7194", "ad7195"] self._ctrl = None @@ -89,14 +89,15 @@ def offset(self, value): def to_volts(self, index, val): """Converts raw value to SI.""" _scale = self.channel[index].scale + _offset = self.channel[index].offset ret = None if isinstance(val, np.int32): - ret = val * _scale + ret = (val+_offset)/1000 * _scale if isinstance(val, np.ndarray): - ret = [x * _scale for x in val] + ret = [((x+_offset)/1000) * _scale for x in val] if ret is None: raise Exception("Error in converting to actual voltage") diff --git a/supported_parts.md b/supported_parts.md index 313da888c..3dee33a0c 100644 --- a/supported_parts.md +++ b/supported_parts.md @@ -82,6 +82,7 @@ - AD7176-2 - AD7177-2 - AD7190 +- AD7191 - AD7192 - AD7193 - AD7194