From f2ac141ebfb4cfbc1dfb3f06119f46bf1b3f39cc Mon Sep 17 00:00:00 2001 From: Cao Sen Miao Date: Fri, 2 Sep 2022 15:58:18 +0800 Subject: [PATCH] temperature_sensor: Fix issue that value is not accurate on ESP32-S3 --- components/driver/esp32s3/rtc_tempsensor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/driver/esp32s3/rtc_tempsensor.c b/components/driver/esp32s3/rtc_tempsensor.c index af456ec24a..62cbb7a535 100644 --- a/components/driver/esp32s3/rtc_tempsensor.c +++ b/components/driver/esp32s3/rtc_tempsensor.c @@ -144,7 +144,7 @@ static float parse_temp_sensor_raw_value(uint32_t tsens_raw, const int dac_offse if (isnan(s_deltaT)) { //suggests that the value is not initialized read_delta_t_from_efuse(); } - float result = (TSENS_ADC_FACTOR * (float)tsens_raw - TSENS_DAC_FACTOR * dac_offset - TSENS_SYS_OFFSET) - s_deltaT; + float result = (TSENS_ADC_FACTOR * (float)tsens_raw - TSENS_DAC_FACTOR * dac_offset - TSENS_SYS_OFFSET) - s_deltaT/10.0; return result; }