optimize temperature data.
authorkfl_614 <kfl_614@163.com>
Thu, 17 Dec 2020 09:43:28 +0000 (17:43 +0800)
committerkfl_614 <kfl_614@163.com>
Thu, 17 Dec 2020 09:43:28 +0000 (17:43 +0800)
app/release/ICSer_V736_2012171741_release.apk [moved from app/release/ICSer_V733_2012161928_release.apk with 78% similarity]
app/release/output.json
app/src/main/java/com/enqualcomm/support/utils/TempAlgUtil.java
app/version_code.properties

similarity index 78%
rename from app/release/ICSer_V733_2012161928_release.apk
rename to app/release/ICSer_V736_2012171741_release.apk
index 393aa31..16582b5 100644 (file)
Binary files a/app/release/ICSer_V733_2012161928_release.apk and b/app/release/ICSer_V736_2012171741_release.apk differ
index df933fb..91b21e1 100644 (file)
@@ -1 +1 @@
-[{"outputType":{"type":"APK"},"apkData":{"type":"MAIN","splits":[],"versionCode":733,"versionName":"2012161928","enabled":true,"outputFile":"ICSer_V733_2012161928_release.apk","fullName":"release","baseName":"release"},"path":"ICSer_V733_2012161928_release.apk","properties":{}}]
\ No newline at end of file
+[{"outputType":{"type":"APK"},"apkData":{"type":"MAIN","splits":[],"versionCode":736,"versionName":"2012171741","enabled":true,"outputFile":"ICSer_V736_2012171741_release.apk","fullName":"release","baseName":"release"},"path":"ICSer_V736_2012171741_release.apk","properties":{}}]
\ No newline at end of file
index 5ede242..c0eabd0 100644 (file)
@@ -49,7 +49,6 @@ public class TempAlgUtil {
         }
     }
 
-
     //thermal_zone0
     public static final String CMD_CPU_TEM = "/sys/class/thermal/thermal_zone0/temp";
     public static final String CMD_CPU_TYPE = "/sys/class/thermal/thermal_zone0/type";
@@ -135,12 +134,12 @@ public class TempAlgUtil {
             String envDy = Util.getSystemProperties("persist.sys.envAlgDy", "");
             ICLogger.d("envSlope == > " + envSlope + " envDy == >  " + envDy);
             double resultEnvTemp = evnTemp;
-            if (!TextUtils.isEmpty(envDy) && !TextUtils.isEmpty(envSlope)) {
+            if (!TextUtils.isEmpty(envDy) && !TextUtils.isEmpty(envSlope) && boardTemp > 45) {
                 //进行换算
                 ICLogger.d("env temp with board temp...");
                 resultEnvTemp = evnTemp - (Float.parseFloat(envSlope) * boardTemp + Float.parseFloat(envDy));
-            } else if (boardTemp <= 38 && boardTemp >= 32) {
-                IcLog.d(TAG, "in range of 32 to 38");
+            } else if (boardTemp <= 45 && boardTemp >= 32) {
+                ICLogger.d("in range of 32 to 38");
                 //Ut = St-(Bt*0.869-27.167) Bt∈[32,38)
                 resultEnvTemp = evnTemp - (0.869 * boardTemp - 27.167);
             } else {
@@ -162,6 +161,7 @@ public class TempAlgUtil {
             if (resultBodyTemp < 0) {
                 return null;
             }
+
             try {
                 //发送消息给launcher显示
                 TemperatureItem temperatureItem = new TemperatureItem(
index 0ad84f7..48f2a03 100644 (file)
@@ -1,2 +1,2 @@
-#Wed Dec 16 19:28:36 CST 2020
-VERSION_CODE=733
+#Thu Dec 17 17:41:27 CST 2020
+VERSION_CODE=736