From 0832081b696b58a01f50e0c65aa20cc538e19e4b Mon Sep 17 00:00:00 2001 From: endian11 <Dana_Lee1016@126.com> Date: 星期四, 17 九月 2020 17:43:23 +0800 Subject: [PATCH] 加入路口信息 --- app/src/main/java/safeluck/drive/evaluation/routecollect/impl/RouteModel.java | 37 ++++++++++++++++++++++++------------- 1 files changed, 24 insertions(+), 13 deletions(-) diff --git a/app/src/main/java/safeluck/drive/evaluation/routecollect/impl/RouteModel.java b/app/src/main/java/safeluck/drive/evaluation/routecollect/impl/RouteModel.java index 399ca2b..cdc1386 100644 --- a/app/src/main/java/safeluck/drive/evaluation/routecollect/impl/RouteModel.java +++ b/app/src/main/java/safeluck/drive/evaluation/routecollect/impl/RouteModel.java @@ -29,22 +29,33 @@ @Override public void onCEvent(String topic, int msgCode, int resultCode, Object obj) { //,"coord_x":0.974,"coord_x_dir":"N","coord_y":-0.191,"c - if (iLoadListener != null){ - CollectPointResult collectPointResult = new CollectPointResult(); - try { - JSONObject jsonObject = new JSONObject((String)obj); - double x = jsonObject.getDouble("coord_x"); - double y = jsonObject.getDouble("coord_y"); + if (msgCode==Constant.RTK_INFO){ + if (iLoadListener != null){ + CollectPointResult collectPointResult = new CollectPointResult(); + try { + JSONObject jsonObject = new JSONObject((String)obj); + double x = jsonObject.getDouble("coord_x"); + double y = jsonObject.getDouble("coord_y"); - Log.i(TAG,String.format("閲囬泦鍒扮殑鐐广�恱=%f,y=%f]",x,y)); - collectPointResult.setX(Utils.getdouble(x,4)); - collectPointResult.setY(Utils.getdouble(y,4)); - iLoadListener.finishCollectItem(collectPointResult); - } catch (JSONException e) { - e.printStackTrace(); + Log.i(TAG,String.format("閲囬泦鍒扮殑鐐广�恱=%f,y=%f]",x,y)); + collectPointResult.setX(Utils.getdouble(x,4)); + collectPointResult.setY(Utils.getdouble(y,4)); + iLoadListener.finishCollectItem(collectPointResult); + } catch (JSONException e) { + e.printStackTrace(); + } + } - } + + if (msgCode == Constant.ENTER_OR_EXIT_ROAD_ID){ + Log.i(TAG,"閬撹矾娑堟伅"+(String)obj); + } + + if (msgCode == Constant.ENTER_OR_EXIT_ROADCROSS_ID){ + Log.i(TAG,"璺彛娑堟伅"+(String)obj); + } + } }; -- Gitblit v1.8.0