From 4b82f2af242ffc0be1e47cd08336425128d2fb84 Mon Sep 17 00:00:00 2001 From: Yannic Labonte Date: Tue, 4 Jul 2023 03:37:26 +0200 Subject: [PATCH] Fix value calculation formula --- src/__init__.py | 0 src/proconip/definitions.py | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) create mode 100644 src/__init__.py diff --git a/src/__init__.py b/src/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/src/proconip/definitions.py b/src/proconip/definitions.py index 7d24b86..d0b1bad 100644 --- a/src/proconip/definitions.py +++ b/src/proconip/definitions.py @@ -103,7 +103,7 @@ def __init__(self, column: int, name: str, unit: str, offset: float, gain: float self._offset = offset self._gain = gain self._raw_value = value - self._value = (value - offset) * gain + self._value = self._offset + (self._gain * self._raw_value) if column == 0: self._category = CATEGORY_TIME