summaryrefslogtreecommitdiff
path: root/thermalUtils.cpp
diff options
context:
space:
mode:
authorRam Chandrasekar <rkumbako@codeaurora.org>2020-08-31 15:05:42 -0700
committerRam Chandrasekar <rkumbako@codeaurora.org>2020-08-31 15:05:42 -0700
commitf61c6149d2bada4ff0873650b0c9e6775e3dc2c2 (patch)
tree6e277a7b3a757f43c36f7cd1b8c05f05307fe2de /thermalUtils.cpp
parentc49329ddcd0d43ceae025144d78a45240f7221b4 (diff)
thermal-hal: Use correct threshold severity index
Use the correct threshold severity Index when populating and retrieving the threshold. Change-Id: Ifec69778e69d9d480018782ee446a12ab5089a10
Diffstat (limited to 'thermalUtils.cpp')
-rw-r--r--thermalUtils.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/thermalUtils.cpp b/thermalUtils.cpp
index b26d512..7aaada4 100644
--- a/thermalUtils.cpp
+++ b/thermalUtils.cpp
@@ -126,9 +126,9 @@ int ThermalUtils::readTemperatures(hidl_vec<Temperature_1_0>& temp)
_temp.name = sens.t.name;
_temp.type = (TemperatureType_1_0)sens.t.type;
_temp.throttlingThreshold = sens.thresh.hotThrottlingThresholds[
- (size_t)ThrottlingSeverity::SEVERE - 1];
+ (size_t)ThrottlingSeverity::SEVERE];
_temp.shutdownThreshold = sens.thresh.hotThrottlingThresholds[
- (size_t)ThrottlingSeverity::SHUTDOWN - 1];
+ (size_t)ThrottlingSeverity::SHUTDOWN];
_temp.vrThrottlingThreshold = sens.thresh.vrThrottlingThreshold;
_temp_v.push_back(_temp);
}