diff options
author | Wei Wang <wvw@google.com> | 2019-03-21 14:54:45 -0700 |
---|---|---|
committer | Wei Wang <wvw@google.com> | 2019-03-21 15:22:43 -0700 |
commit | aae73cd2589f8b6d16dd030938b623dd32122cb8 (patch) | |
tree | 21aaae8dd43870c98c1aeaf0a669a0eb37677489 /thermal | |
parent | aea6f1156587a94c8385c093630d896626d97ed5 (diff) |
Adjust mock thermal HAL 2.0 mock data
Bug: 127269185
Test: Build
Change-Id: I7a8b83a893a51dcc1028f3f62c54877a446e1b71
Diffstat (limited to 'thermal')
-rw-r--r-- | thermal/2.0/default/Thermal.cpp | 51 |
1 files changed, 26 insertions, 25 deletions
diff --git a/thermal/2.0/default/Thermal.cpp b/thermal/2.0/default/Thermal.cpp index 0ef4b63324..bbbecb8583 100644 --- a/thermal/2.0/default/Thermal.cpp +++ b/thermal/2.0/default/Thermal.cpp @@ -38,46 +38,47 @@ using ::android::hardware::thermal::V1_0::ThermalStatusCode; std::set<sp<IThermalChangedCallback>> gCallbacks; static const Temperature_1_0 kTemp_1_0 = { - .type = static_cast<::android::hardware::thermal::V1_0::TemperatureType>(TemperatureType::CPU), - .name = "test temperature sensor", - .currentValue = 98.6, - .throttlingThreshold = 58, - .shutdownThreshold = 60.0, - .vrThrottlingThreshold = 59.0, + .type = static_cast<::android::hardware::thermal::V1_0::TemperatureType>( + TemperatureType::SKIN), + .name = "test temperature sensor", + .currentValue = 30.8, + .throttlingThreshold = 48.0, + .shutdownThreshold = 60.0, + .vrThrottlingThreshold = 49.0, }; static const Temperature_2_0 kTemp_2_0 = { - .type = TemperatureType::SKIN, - .name = "test temperature sensor", - .value = 98.6, - .throttlingStatus = ThrottlingSeverity::CRITICAL, + .type = TemperatureType::SKIN, + .name = "test temperature sensor", + .value = 30.8, + .throttlingStatus = ThrottlingSeverity::NONE, }; static const TemperatureThreshold kTempThreshold = { - .type = TemperatureType::SKIN, - .name = "test temperature sensor", - .hotThrottlingThresholds = {{NAN, NAN, NAN, NAN, NAN, NAN, NAN}}, - .coldThrottlingThresholds = {{NAN, NAN, NAN, NAN, NAN, NAN, NAN}}, - .vrThrottlingThreshold = NAN, + .type = TemperatureType::SKIN, + .name = "test temperature sensor", + .hotThrottlingThresholds = {{NAN, NAN, NAN, 48.0, NAN, NAN, 60.0}}, + .coldThrottlingThresholds = {{NAN, NAN, NAN, NAN, NAN, NAN, NAN}}, + .vrThrottlingThreshold = 49.0, }; static const CoolingDevice_1_0 kCooling_1_0 = { - .type = ::android::hardware::thermal::V1_0::CoolingType::FAN_RPM, - .name = "test cooling device", - .currentValue = 100.0, + .type = ::android::hardware::thermal::V1_0::CoolingType::FAN_RPM, + .name = "test cooling device", + .currentValue = 100.0, }; static const CoolingDevice_2_0 kCooling_2_0 = { - .type = CoolingType::CPU, - .name = "test cooling device", - .value = 1, + .type = CoolingType::FAN, + .name = "test cooling device", + .value = 100, }; static const CpuUsage kCpuUsage = { - .name = "cpu_name", - .active = 0, - .total = 0, - .isOnline = true, + .name = "cpu_name", + .active = 0, + .total = 0, + .isOnline = true, }; // Methods from ::android::hardware::thermal::V1_0::IThermal follow. |