summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsashwinbalaji <sashwinbalaji@google.com>2023-05-24 12:57:47 +0800
committersashwinbalaji <sashwinbalaji@google.com>2023-05-24 13:00:35 +0800
commit8b499332bd1ecf73d93a41c7532a0d0e11682120 (patch)
tree0802facf54e433f0f38fa46dee3e5928540e818b
parent75d5f503a007bcd8ff4618f5ff8d0e425b76ac56 (diff)
downloadpixel-8b499332bd1ecf73d93a41c7532a0d0e11682120.tar.gz
thermal: metrics: Fix recorded temp value
Instead of recording the raw temp value record the temp value after multiplying with its multiplier Bug: 277187738 Test: Build and verify residency logs Change-Id: I62cbc42ff67ff88f2ca5c961378a27d653c53595
-rw-r--r--thermal/thermal-helper.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/thermal/thermal-helper.cpp b/thermal/thermal-helper.cpp
index 796da4e1..d8883a40 100644
--- a/thermal/thermal-helper.cpp
+++ b/thermal/thermal-helper.cpp
@@ -944,8 +944,8 @@ bool ThermalHelper::readThermalSensor(std::string_view sensor_name, float *temp,
sensor_status.thermal_cached.temp = *temp;
sensor_status.thermal_cached.timestamp = now;
}
-
- thermal_stats_helper_.updateSensorTempStatsByThreshold(sensor_name, *temp);
+ auto real_temp = (*temp) * sensor_info.multiplier;
+ thermal_stats_helper_.updateSensorTempStatsByThreshold(sensor_name, real_temp);
return true;
}