| | |
| | | public static final String RTK_INFO_SAT_QF = "RTK_INFO_SAT_QF";//从RTK info中获取的卫星颗数和qf 组成的json |
| | | public static final int SUBJECT_III = 3;//路考 |
| | | public static final int LEFT_RIGHT_DISTANCE = 0x0020; |
| | | public static final int RTK_MODLUE_STATUS= 0x0023; |
| | | public static final String NEED_MAPS_CAR = "need_maps_car"; |
| | | //用于地图车辆移动 坐标 |
| | | public static final String BIND_RTK_INFO_MAP = "bind_rtk_info_map"; |
| | |
| | | } |
| | | CEventCenter.dispatchEvent(Constant.BIND_MCUINFO_TOPIC,cmd,0,json); |
| | | break; |
| | | case Constant.RTK_MODLUE_STATUS: |
| | | ExamPlatformData.getInstance().setRTKModuleInfo(json); |
| | | break; |
| | | case Constant.IC_ID: |
| | | |
| | | CEventCenter.dispatchEvent(Constant.BIND_SPEED_TOPIC,cmd,0,json); |
| | |
| | | MyLog.i(DataInitKt.getSendVehiSucc()?String.format("车辆模型发送成功"):"车辆模型发送失败"); |
| | | Toast.makeText(app.getAppContext(), "地图或车模型不存在,请检查平台配置或手工配置", Toast.LENGTH_SHORT).show(); |
| | | } |
| | | },1, TimeUnit.SECONDS); |
| | | },2, TimeUnit.SECONDS); |
| | | |
| | | |
| | | }else{ |
| | |
| | | public String getSMCanBrief(){ |
| | | return smCanBriefString; |
| | | } |
| | | private String rtkModuleInfoStr; |
| | | public void setRTKModuleInfo(String json) { |
| | | if (rtkModuleInfoStr != null && rtkModuleInfoStr.equalsIgnoreCase(json)){ |
| | | |
| | | }else{ |
| | | rtkModuleInfoStr = json; |
| | | } |
| | | } |
| | | |
| | | /*** |
| | | * code = 0x0023; |
| | | * { |
| | | * "model":"K726", |
| | | * "status":1 // 1 - ok, 0 - failure 严重问题 |
| | | * } |
| | | * @return |
| | | */ |
| | | public String getRTKMoudleInfo(){ |
| | | return rtkModuleInfoStr; |
| | | } |
| | | |
| | | public void setMcuSN(String sn) { |
| | | this.mcuSN = sn; |
New file |
| | |
| | | package safeluck.drive.evaluation.bean; |
| | | |
| | | /** |
| | | * DriveJudge |
| | | * Created by lzw on 2020/12/28. 17:03:57 |
| | | * 邮箱:632393724@qq.com |
| | | * All Rights Saved! Chongqing AnYun Tech co. LTD |
| | | */ |
| | | public class RTKModuleInfo { |
| | | |
| | | /** |
| | | * model : K726 |
| | | * status : 1 // 1 - ok, 0 - failure 严重问题 |
| | | */ |
| | | |
| | | private String model; |
| | | private int status; |
| | | |
| | | public String getModel() { |
| | | return model; |
| | | } |
| | | |
| | | public void setModel(String model) { |
| | | this.model = model; |
| | | } |
| | | |
| | | public int getStatus() { |
| | | return status; |
| | | } |
| | | |
| | | public void setStatus(int status) { |
| | | this.status = status; |
| | | } |
| | | } |
| | |
| | | import safeluck.drive.evaluation.bean.MCUInfo; |
| | | import safeluck.drive.evaluation.bean.MapInfoHead; |
| | | import safeluck.drive.evaluation.bean.ProductTestData; |
| | | import safeluck.drive.evaluation.bean.RTKModuleInfo; |
| | | import safeluck.drive.evaluation.cEventCenter.CEventCenter; |
| | | import safeluck.drive.evaluation.cEventCenter.ICEventListener; |
| | | import safeluck.drive.evaluation.util.CThreadPoolExecutor; |
| | |
| | | final MCUInfo mcuInfo=gson.fromJson(mcuinfoStr, MCUInfo.class); |
| | | Field [] fields = mcuInfo.getClass().getDeclaredFields(); |
| | | String canBrief = ExamPlatformData.getInstance().getSMCanBrief(); |
| | | String rtkMoudleInfoStr = ExamPlatformData.getInstance().getRTKMoudleInfo(); |
| | | if (!TextUtils.isEmpty(canBrief)){ |
| | | ProductTestData productTestData = gson.fromJson(canBrief, ProductTestData.class); |
| | | String Binarystr = Integer.toBinaryString(productTestData.getGpio()); |
| | |
| | | datas.add(new BaseDataUIBean(str2SpannableString("电压"),R.mipmap.version_pic,str2FouregourdSpannableString(productTestData.getVoltage()+""),"",1,null)); |
| | | } |
| | | |
| | | if (!TextUtils.isEmpty(rtkMoudleInfoStr)){ |
| | | RTKModuleInfo rtkModuleInfo = gson.fromJson(rtkMoudleInfoStr,RTKModuleInfo.class); |
| | | datas.add(new BaseDataUIBean(str2SpannableString("模块型号"),R.mipmap.version_pic,str2FouregourdSpannableString(rtkModuleInfo.getModel()+""),"",1,null)); |
| | | datas.add(new BaseDataUIBean(str2SpannableString("模块状态"),R.mipmap.version_pic,str2FouregourdSpannableString(rtkModuleInfo.getStatus()==1?"正常":"严重错误"),"",1,null)); |
| | | } |
| | | |
| | | for (int i = 0; i < fields.length; i++) { |
| | | fields[i].setAccessible(true); |
| | | try { |