From: TrillGates Date: Sat, 20 Nov 2021 02:59:12 +0000 (+0800) Subject: 调整了体温上传数据的位置,体温和腕温对调,才符合协议的要求 X-Git-Url: http://git.snicker.com.cn/css/static/gitweb.css?a=commitdiff_plain;h=85ad5b0b0bd356196a08b8f901f6fa560322e908;p=icsupport.git 调整了体温上传数据的位置,体温和腕温对调,才符合协议的要求 --- diff --git a/app/src/main/java/com/enqualcomm/support/LocationClient.java b/app/src/main/java/com/enqualcomm/support/LocationClient.java index f178e01b..5f68a43c 100644 --- a/app/src/main/java/com/enqualcomm/support/LocationClient.java +++ b/app/src/main/java/com/enqualcomm/support/LocationClient.java @@ -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(); diff --git a/app/src/main/java/com/ic/protocols/protocol_beehome.java b/app/src/main/java/com/ic/protocols/protocol_beehome.java index 009e63c7..c0b990bc 100644 --- a/app/src/main/java/com/ic/protocols/protocol_beehome.java +++ b/app/src/main/java/com/ic/protocols/protocol_beehome.java @@ -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()); }