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);
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);
}
}
ICLogger.logToFile("GPS", msg);
- } else if (timeout == true) {
+ } else if (timeout) {
//timeout + noLBS +noGPS
ICLogger.i("timeout no location ");
stopCheckLocationResult();
//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());
}