|
|
@ -498,11 +498,12 @@ std::string CPhoneDevice::QueryCpuTemperature()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
// /sys/devices/virtual/thermal/thermal_zone0/temp
|
|
|
|
// /sys/devices/virtual/thermal/thermal_zone0/temp
|
|
|
|
std::vector<unsigned char> data;
|
|
|
|
std::vector<unsigned char> data;
|
|
|
|
if (readFile("/sys/devices/virtual/thermal/thermal_zone0/temp", data) && !data.empty())
|
|
|
|
// /sys/class/thermal/thermal zone*/temp
|
|
|
|
|
|
|
|
if (readFile("/sys/class/thermal/thermal_zone3/temp", data) && !data.empty())
|
|
|
|
{
|
|
|
|
{
|
|
|
|
data.push_back(0);
|
|
|
|
data.push_back(0);
|
|
|
|
int temp = atoi((const char*)(&data[0]));
|
|
|
|
int temp = atoi((const char*)(&data[0]));
|
|
|
|
return std::to_string(temp / 1000);
|
|
|
|
return std::to_string((temp / 1000) + 20);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return "";
|
|
|
|
return "";
|
|
|
|