| | |
| | | private RouteCross routeCross; |
| | | |
| | | //要插入数据库的触发线信息 |
| | | private RouteTriggerLine routeTriggerLine; |
| | | private RouteTriggerLine routeTriggerLine = new RouteTriggerLine(); |
| | | |
| | | private List<Integer> btn_ids = new ArrayList<Integer>(); |
| | | private HashMap<String,Integer> routeCollect_btn_ids = new HashMap<>(); |
| | |
| | | if (exam_type != Constant.NONE_BEEN_START_EXAM){ |
| | | if (ROUTE_COLLECT == exam_type){ |
| | | btn_start_exam.setText("结束采集"); |
| | | routeCollectController.startRoadListener(); |
| | | }else{ |
| | | |
| | | btn_start_exam.setText("结束训练"); |
| | |
| | | private void initView(View view) { |
| | | |
| | | tv_route_collect_info = view.findViewById(R.id.tv_route_info); |
| | | routeCollectController = new RouteCollectController(this); |
| | | // routeCollectController = new RouteCollectController(this); |
| | | routeCollectController = RouteCollectController.getInstance(); |
| | | routeCollectController.setRouteCollectController(this); |
| | | items = view.findViewById(R.id.items); |
| | | items_score=view.findViewById(R.id.items_score); |
| | | route_collect=view.findViewById(R.id.route_collect); |
| | |
| | | ExamPlatformData.getInstance().setTrainingMode(ExamPlatformData.ROUTE_MODE); |
| | | exam_type = 5; |
| | | sendExamJson(1,exam_type); |
| | | |
| | | examStatusViewModel.updateStartExam(exam_type); |
| | | items.setVisibility(View.GONE); |
| | | items_score.setVisibility(View.GONE); |
| | |
| | | |
| | | Toast.makeText(_mActivity, "结束采集", Toast.LENGTH_SHORT).show(); |
| | | routeLineViewModel.updateCurrCollectFlag(""); |
| | | routeCollectController.endRoadListener(); |
| | | ExamPlatformData.getInstance().setTrainingMode(ExamPlatformData.MODE_NONE); |
| | | exam_type = 0; |
| | | examStatusViewModel.updateStartExam(exam_type); |
| | |
| | | remoteRouteCollect.setScheme(routeCollects); |
| | | String str = new Gson().toJson(remoteRouteCollect); |
| | | Log.i(TAG,"json====="+str); |
| | | //todo 发送线路 |
| | | AYSdk.getInstance().sendCmd(0x8017,str); |
| | | sendMessage(); |
| | | break; |
| | | } |
| | |
| | | @Override |
| | | public void beginCollectView() { |
| | | Log.i(TAG,"BIND_RTK_INFO_MAP"); |
| | | CThreadPoolExecutor.runOnMainThread(()->{ |
| | | StatusDialog.with(_mActivity).setType(StatusDialog.Type.PROGRESS).setCancelable(true).show(); |
| | | }); |
| | | // CThreadPoolExecutor.runOnMainThread(()->{ |
| | | // StatusDialog.with(_mActivity).setType(StatusDialog.Type.PROGRESS).setCancelable(true).show(); |
| | | // }); |
| | | |
| | | } |
| | | |
| | |
| | | |
| | | if (roadInfo != null && roadInfo.getStatus()==1){ |
| | | Log.i(TAG,"在某个路里面"+roadInfo.getRoad_id()); |
| | | stringBuilder.append(String.format("在%d号路里面",roadInfo.getRoad_id())); |
| | | stringBuilder.append("\n"); |
| | | routeTriggerLine.setX(collectPointResult.getX()); |
| | | routeTriggerLine.setY(collectPointResult.getY()); |
| | | routeTriggerLine.setType(ExamPlatformData.getInstance().getCurrRouteItem()); |
| | |
| | | public void roadinfo(RoadInfo roadInfo) { |
| | | Log.i(TAG,String.format("道路信息%s",roadInfo.toString())); |
| | | //道路信息是没有进行本地保存的,如果崩溃的话,就有问题 |
| | | ExamPlatformData.getInstance().setRouteCollectRoadInfo(roadInfo); |
| | | stringBuilder.append(String.format("道路信息%s",roadInfo.toString())); |
| | | stringBuilder.append("\n"); |
| | | showRouteCollectInfoText(); |