From d94fa3c9cb9fd3885929a7da3192527a3ded0abb Mon Sep 17 00:00:00 2001 From: Daniel Dias Date: Fri, 10 Mar 2023 00:59:59 +0000 Subject: [PATCH] Fix getVoltage. Requeres a reading from vOut --- LMP91000.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/LMP91000.cpp b/LMP91000.cpp index eb50733..1d2270f 100755 --- a/LMP91000.cpp +++ b/LMP91000.cpp @@ -560,8 +560,8 @@ double LMP91000::getTemp(uint8_t sensor, double adc_ref, uint8_t adc_bits) const write(LMP91000_MODECN_REG, data); delay(100); - - return (getVoltage(sensor, adc_ref, adc_bits)-TEMP_INTERCEPT)/TEMPSLOPE; + + return (getVoltage(getOutput(sensor), adc_ref, adc_bits)-TEMP_INTERCEPT)/TEMPSLOPE; }