| | |
| | | import safeluck.drive.evaluation.bean.MCUInfo; |
| | | import safeluck.drive.evaluation.bean.MapInfoHead; |
| | | import safeluck.drive.evaluation.bean.ProductTestData; |
| | | import safeluck.drive.evaluation.bean.RTKInfoBean; |
| | | import safeluck.drive.evaluation.bean.RTKModuleInfo; |
| | | import safeluck.drive.evaluation.cEventCenter.CEventCenter; |
| | | import safeluck.drive.evaluation.cEventCenter.ICEventListener; |
| | |
| | | datas.add(new BaseDataUIBean(str2SpannableString("RTK平台状态"),R.mipmap.conn_status,str2FouregourdSpannableString(appStatus.getRtk_connect_status()==1?(appStatus.getRtk_login_code()==0?"已登录":"未登录"):"未连接"),"",1,null)); |
| | | datas.add(new BaseDataUIBean(str2SpannableString("考试平台状态"),R.mipmap.conn_status,str2FouregourdSpannableString(ExamPlatformData.getInstance().getExamplatformStatusStr(ExamPlatformData.getInstance().getExamplatformStatus())),"",1,null)); |
| | | } |
| | | RTKInfoBean rtkinfo = ExamPlatformData.getInstance().getRtkInfoBean(); |
| | | if (rtkinfo != null){ |
| | | datas.add(new BaseDataUIBean(str2SpannableString("坐标"),R.mipmap.conn_status,str2FouregourdSpannableString(rtkinfo.getCoord_y()+","+rtkinfo.getCoord_x()),"",1,null)); |
| | | datas.add(new BaseDataUIBean(str2SpannableString("经纬度"),R.mipmap.conn_status,str2FouregourdSpannableString(rtkinfo.getLongitude()+","+rtkinfo.getLatitude()),"",1,null)); |
| | | } |
| | | HashMap<BaseDataUIBean.TYPE_, MapInfoHead> hashMaps = ExamPlatformData.getInstance().getMapInfoHeads(); |
| | | if (hashMaps != null){ |
| | | Iterator<Map .Entry<BaseDataUIBean.TYPE_,MapInfoHead>> iterator = hashMaps.entrySet().iterator(); |
| | |
| | | |
| | | } |
| | | }; |
| | | |
| | | private String lastRtkinfoStr = ""; |
| | | private ICEventListener icEventListener1 = new ICEventListener() { |
| | | @Override |
| | | public void onCEvent(String topic, int msgCode, int resultCode, Object obj) { |
| | | if (msgCode == Constant.RTK_INFO){ |
| | | String str = (String)obj; |
| | | if (!str.equalsIgnoreCase(lastRtkinfoStr)){ |
| | | RTKInfoBean rtkInfoBean = gson.fromJson(str, RTKInfoBean.class); |
| | | ExamPlatformData.getInstance().setRTKinfoBean(rtkInfoBean); |
| | | } |
| | | |
| | | } |
| | | } |
| | | }; |
| | | |
| | | private String left(String s,int pos){ |
| | | |
| | | StringBuffer sb = new StringBuffer(); |
| | |
| | | public void onAttach(Context context) { |
| | | super.onAttach(context); |
| | | CEventCenter.onBindEvent(true,icEventListener,Constant.BIND_MCUINFO_TOPIC); |
| | | CEventCenter.onBindEvent(true,icEventListener1,Constant.BIND_RTK_INFO_MAP); |
| | | } |
| | | |
| | | @Override |
| | | public void onDetach() { |
| | | super.onDetach(); |
| | | CEventCenter.onBindEvent(false,icEventListener,Constant.BIND_MCUINFO_TOPIC); |
| | | CEventCenter.onBindEvent(false,icEventListener1,Constant.BIND_RTK_INFO_MAP); |
| | | } |
| | | |
| | | @Override |