|
@@ -100,6 +100,8 @@ public class APIModuleGis extends UZModule {
|
|
|
|
|
|
private volatile static String logCorsStatus = "0";//cors 登录控制变量 0 从未登录过, 1 登录中 2 登录过程完成
|
|
|
|
|
|
+ private volatile static String gnssInfoJson = "";
|
|
|
+
|
|
|
private void initData(){
|
|
|
wgslng = "0.0";
|
|
|
wgslat = "0.0";
|
|
@@ -111,6 +113,7 @@ public class APIModuleGis extends UZModule {
|
|
|
ramMountName = null;
|
|
|
ramCorsUserName = null;
|
|
|
ramCorsPassword = null;
|
|
|
+ gnssInfoJson = "";
|
|
|
}
|
|
|
|
|
|
//TODO Lx 统一断开所有的服务
|
|
@@ -144,7 +147,8 @@ public class APIModuleGis extends UZModule {
|
|
|
try {
|
|
|
res.put("code",code);
|
|
|
res.put("msg",msg);
|
|
|
- res.put("version","1.2.0");
|
|
|
+ res.put("version","1.2.2");
|
|
|
+ res.put("gnssInfoJson",gnssInfoJson);
|
|
|
|
|
|
BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter();
|
|
|
if (adapter == null) {
|
|
@@ -271,7 +275,7 @@ public class APIModuleGis extends UZModule {
|
|
|
res.put("msg","连接已断开,正在重启,请稍后");
|
|
|
return new ModuleResult(res);
|
|
|
}
|
|
|
- if(!"0".equals(logCorsCod)&&!"1".equals(logCorsStatus)) {
|
|
|
+ if("0".equals(connectCode)&&!"0".equals(logCorsCod)&&!"1".equals(logCorsStatus)) {
|
|
|
DiffConnectManager.loginCors(this.context(), ip, port, mountName, userName, passWord,diffType,stationId,type);
|
|
|
logCorsStatus = "1";
|
|
|
}
|
|
@@ -633,7 +637,7 @@ public class APIModuleGis extends UZModule {
|
|
|
res.put("msg","传递参数不完整");
|
|
|
return new ModuleResult(res);
|
|
|
}
|
|
|
- if(!"0".equals(logCorsCod)&&!"1".equals(logCorsStatus)) {
|
|
|
+ if("0".equals(connectCode)&&!"0".equals(logCorsCod)&&!"1".equals(logCorsStatus)) {
|
|
|
DiffConnectManager.loginCors(this.context(),ip,port,mountName,userName,passWord,diffType,stationId,type);
|
|
|
}else{
|
|
|
code = "0";
|
|
@@ -930,6 +934,11 @@ public class APIModuleGis extends UZModule {
|
|
|
@Subscribe(threadMode = ThreadMode.MAIN,sticky =true)
|
|
|
public void onEventMainThread(GnssInfo gnssinfo) {
|
|
|
connectCode = "0";
|
|
|
+ try {
|
|
|
+ gnssInfoJson = com.qx.wz.external.fastjson.JSONObject.toJSONString(gnssinfo);
|
|
|
+ }catch(Exception ex){
|
|
|
+ Log.e(TAG,ex.getLocalizedMessage());
|
|
|
+ }
|
|
|
Log.i(TAG,String.valueOf(gnssinfo.latitude));
|
|
|
Log.i(TAG,String.valueOf(gnssinfo.longitude));
|
|
|
Log.i(TAG,String.valueOf(gnssinfo.altitude));
|