Add support for temperatures in tenths of a degree Celsius
Change-Id: I3aa7c3d193715b8c309a99afd23e753a559e3083
This commit is contained in:
committed by
Andrea Mennillo
parent
466dc9764b
commit
b603345e32
4
data.cpp
4
data.cpp
@@ -903,7 +903,9 @@ int DataManager::GetMagicValue(const string varName, string& value)
|
||||
convert_temp = strtoul(results.c_str(), NULL, 0) / 1000;
|
||||
if (convert_temp <= 0)
|
||||
convert_temp = strtoul(results.c_str(), NULL, 0);
|
||||
cpuSecCheck = curTime.tv_sec + 5;
|
||||
if (convert_temp >= 150)
|
||||
convert_temp = strtoul(results.c_str(), NULL, 0) / 10;
|
||||
cpuSecCheck = curTime.tv_sec + 5;
|
||||
}
|
||||
value = TWFunc::to_string(convert_temp);
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user