From b603345e32ab2b3eb5ecf58d2796829b056a456d Mon Sep 17 00:00:00 2001 From: HandyMenny Date: Wed, 15 Oct 2014 21:39:12 +0200 Subject: Add support for temperatures in tenths of a degree Celsius Change-Id: I3aa7c3d193715b8c309a99afd23e753a559e3083 --- data.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/data.cpp b/data.cpp index 0e46b3bdb..0d05c3d59 100644 --- a/data.cpp +++ b/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; -- cgit v1.2.3