Add support for temperatures in tenths of a degree Celsius

Change-Id: I3aa7c3d193715b8c309a99afd23e753a559e3083
This commit is contained in:
HandyMenny
2014-10-15 21:39:12 +02:00
committed by Andrea Mennillo
parent 466dc9764b
commit b603345e32

View File

@@ -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;