调整了体温上传数据的位置,体温和腕温对调,才符合协议的要求
authorTrillGates <williamtrillgates@gmail.com>
Sat, 20 Nov 2021 02:59:12 +0000 (10:59 +0800)
committerTrillGates <williamtrillgates@gmail.com>
Sat, 20 Nov 2021 02:59:12 +0000 (10:59 +0800)
app/src/main/java/com/enqualcomm/support/LocationClient.java
app/src/main/java/com/ic/protocols/protocol_beehome.java

index f178e01..5f68a43 100644 (file)
@@ -623,38 +623,30 @@ public class LocationClient {
                 if (checktimes > GPSLocationTimeoutInSeconds) {
                     ICLogger.i("waitAndSendLocation " + checktimes + " timeout");
                     timeout = true;
-
                 }
-                if (NoMoveTimeout == true && (timeout == true || gps_nosignal == true)) {
+                if (NoMoveTimeout && (timeout || gps_nosignal)) {
                     //没有移动,GPS超时或者没信号都会给 计数 加 1
                     gpsTimeoutCountOnNoMove++;
                 }
-                timeCost = System.currentTimeMillis() - startCheckTime;
-                if ((startCheckTime != 0L) && (timeCost > 50 * 1000L)) {
-                    //有时timer计数不准,则根据实际时间计算
-                    ICLogger.i("waitAndSendLocation " + timeCost + "> 50000ms timeout");
-                    //timeout=true;
-                }
-
                 // lbs only +timeout, lbs+wifi+gpsNosignal, libs+ , lbs+gps+wifi, Timeout can override wifi and gps
-                if ((lbs_ok && timeout == true)
+                if ((lbs_ok && timeout)
                         || (gps_ok)
-                        || (lbs_ok && (gps_ok || startSOSLocation == true))
-                        || (lbs_ok && (gps_ok || startSOSLocation == true) && wifi_ok)
+                        || (lbs_ok && (gps_ok || startSOSLocation))
+                        || (lbs_ok && (gps_ok || startSOSLocation) && wifi_ok)
                         || (lbs_ok && gps_nosignal && wifi_ok)
                 ) {
 
-                    String locationtype = "LBS";
+                    String locationType = "LBS";
                     if (gps_ok) {
-                        locationtype = "GPS";
+                        locationType = "GPS";
                     } else if (wifi_ok) {
-                        locationtype = "WiFi";
+                        locationType = "WiFi";
                     }
 
-                    runtime.getLocationInstance().setLocationType(locationtype);
+                    runtime.getLocationInstance().setLocationType(locationType);
                     runtime.getLocationInstance().setLocationTime(TimeUtil.getSystemTime3());
 
-                    if (startSOSLocation == true) {
+                    if (startSOSLocation) {
                         StringMessage AP10_CMD = protocolAPIHelper.getWarningMSG(runtime);
                         DeliverMessage(AP10_CMD);
                         runtime.setAlarmType(Runtime.AlarmType.ALARM_REMOVE_SOS);
@@ -678,10 +670,10 @@ public class LocationClient {
                     String msg = "Location Fixed Type " + runtime.getLocationInstance().getLocationType() + " at " + runtime.getLocationInstance().getLocationTime() + " timeout " + timeout;
                     ICLogger.i(msg);
                     if (responseUrl != null) {
-                        if (locationtype.equals("GPS")) {
+                        if (locationType.equals("GPS")) {
                             responseUrl.replyCallBack(runtime.getLocationInstance().getLocation().latGPSStr + "," + runtime.getLocationInstance().getLocation().lonGPSStr);
                         } else {
-                            responseUrl.replyCallBack("Location Fixed Type " + locationtype);
+                            responseUrl.replyCallBack("Location Fixed Type " + locationType);
                         }
 
                     }
@@ -689,7 +681,7 @@ public class LocationClient {
                         ICLogger.logToFile("GPS", msg);
 
 
-                } else if (timeout == true) {
+                } else if (timeout) {
                     //timeout + noLBS +noGPS
                     ICLogger.i("timeout no location  ");
                     stopCheckLocationResult();
index 009e63c..c0b990b 100644 (file)
@@ -1737,8 +1737,8 @@ public class protocol_beehome {
         //33,132:温补用的参数,此处不用,可以用0 来代替。
         return genStringMessage(cmdMap.get(CMD_TYPE.APTP),
                 new StringBuffer(CMDHEADER).append(cmdMap.get(CMD_TYPE.APTP))
-                        .append(CMDSPLIT).append(String.format("%1$.2f", body_temp))
                         .append(CMDSPLIT).append(String.format("%1$.2f", wrist_temp))
+                        .append(CMDSPLIT).append(String.format("%1$.2f", body_temp))
                         .append(CMDSPLIT).append(0)
                         .append(CMDEND).toString());
     }