加入路口、路段查询功能;在选中当前采集线路下开始查询并设置监听;进入路口弹框选择,出路口弹框消失
4个文件已修改
26 ■■■■■ 已修改文件
app/src/main/java/safeluck/drive/evaluation/Constant.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/safeluck/drive/evaluation/fragment/TrainFragment.java 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/safeluck/drive/evaluation/routecollect/RouteCollectController.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/safeluck/drive/evaluation/routecollect/impl/RouteModel.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/safeluck/drive/evaluation/Constant.java
@@ -80,6 +80,7 @@
    public static final int MCU_SN = 8;
    public static final int IC_ID = 0x0011;//4.    返回IC卡信息
    public static final int ID_MS_INQ_ROAD_CROSSING = 0x8018;              // 主动查询当前路段和路口;
    public static final int SEND_CONFIG_SIGNAL = 0x8008;
    public static final String STU_INFO_PLATFORM = "STU_INFO_PLATFORM";
    public static final int SHUTDOWN_TIME = 16;
app/src/main/java/safeluck/drive/evaluation/fragment/TrainFragment.java
@@ -409,6 +409,7 @@
                    for (int i = 0; i < routeBeans.size(); i++) {
                        if (routeBeans.get(i).getCurrentCollectFlag()==1){
                            currRouteBean = routeBeans.get(i);
                            routeCollectController.checkWetherRoadIn();
                            ExamPlatformData.getInstance().setRouteCollectLineName(currRouteBean.getRouteName());
                            stringBuilder.delete(0,stringBuilder.length());
                            stringBuilder.append("当前采集线路名称:"+currRouteBean.getRouteName());
@@ -1090,6 +1091,7 @@
        super.onDetach();
        Log.i(TAG,"onDetach");
        CEventCenter.onBindEvent(false,icEventListener,Constant.BIND_SPEED_TOPIC);
        routeCollectController.endRoadListener();
    }
@@ -1165,7 +1167,7 @@
            stringBuilder.append("\n");
            showRouteCollectInfoText();
    }
    SelectDialogThree roadCrossDialog;
    @Override
    public void roadcrossInfo(RoadCrossInfo roadCrossInfo) {
        Log.i(TAG,String.format("道路路口信息%s",roadCrossInfo.toString()));
@@ -1184,9 +1186,9 @@
                    CThreadPoolExecutor.runOnMainThread(new Runnable() {
                        @Override
                        public void run() {
                            SelectDialogThree selectDialogThree = SelectDialogThree.newInstance("路口直行","路口左转弯","路口右转弯","路口掉头");
                            selectDialogThree.show(getFragmentManager(),"aaa");
                            selectDialogThree.setSelectedListener(new SelectDialogThree.OnSelectedListener() {
                            roadCrossDialog = SelectDialogThree.newInstance("路口直行","路口左转弯","路口右转弯","路口掉头");
                            roadCrossDialog.show(getFragmentManager(),"aaa");
                            roadCrossDialog.setSelectedListener(new SelectDialogThree.OnSelectedListener() {
                                @Override
                                public void makeYourChoice(int res) {
                                    switch (res){
@@ -1218,6 +1220,8 @@
                            });
                        }
                    });
                }else{
                    roadCrossDialog.dismiss();
                }
@@ -1236,4 +1240,6 @@
        }
        return -1;
    }
}
app/src/main/java/safeluck/drive/evaluation/routecollect/RouteCollectController.java
@@ -4,6 +4,7 @@
import com.anyun.exam.lib.AYSdk;
import safeluck.drive.evaluation.Constant;
import safeluck.drive.evaluation.fragment.TrainFragment;
import safeluck.drive.evaluation.routecollect.bean.RoadCrossInfo;
import safeluck.drive.evaluation.routecollect.bean.RoadInfo;
@@ -39,6 +40,12 @@
        routeModel.setLoadListener(this);
    }
    /**
     * 查询是否在某一路口(路段)内
     */
    public void checkWetherRoadIn(){
        AYSdk.getInstance().sendCmd(Constant.ID_MS_INQ_ROAD_CROSSING,"");
    }
    public void startCollect() {
        if (iCollectView != null){
app/src/main/java/safeluck/drive/evaluation/routecollect/impl/RouteModel.java
@@ -83,10 +83,6 @@
    @Override
    public void startCollect() {
        //调用AYSdk 方法启动采点
        //set IRouteRemotePointCallback
        //如果采用application的callback ,可能需要注册一个CEventLisntener
        CEventCenter.onBindEvent(true,icEventListener, Constant.BIND_RTK_INFO_MAP);
    }