From 0927059d4eebab0a5bf5d3a81e781103328c09cd Mon Sep 17 00:00:00 2001 From: anschrammh Date: Wed, 15 Jan 2020 18:53:20 +0100 Subject: [PATCH] =?UTF-8?q?Ajout=20d'un=20offset=20pour=20pallier=20le=20p?= =?UTF-8?q?allier=20entre=20les=20deux=20adcs=20(pour=20une=20m=C3=AAme=20?= =?UTF-8?q?tension,=20il=20n'affichent=20pas=20exactement=20la=20m=C3=AAme?= =?UTF-8?q?=20valeur)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/MeasureUnit/Ads1115.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/MeasureUnit/Ads1115.cpp b/lib/MeasureUnit/Ads1115.cpp index 9062621..e6ba689 100644 --- a/lib/MeasureUnit/Ads1115.cpp +++ b/lib/MeasureUnit/Ads1115.cpp @@ -109,6 +109,7 @@ void Ads1115::startSample(int16_t channel, boolean sgl) if(_numOfSamples == getAdcSetting().getMeasureIteration()) { _sampledValue /= (double)_numOfSamples; + _sampledValue += channel > 3 ? 82.0 : 0.0; _state = RESULT_READY; } break;