| | |
| | | import safeluck.drive.evaluation.bean.ExamPlatformData; |
| | | import safeluck.drive.evaluation.bean.MCUInfo; |
| | | import safeluck.drive.evaluation.bean.MapInfoHead; |
| | | import safeluck.drive.evaluation.bean.ProductTestData; |
| | | import safeluck.drive.evaluation.cEventCenter.CEventCenter; |
| | | import safeluck.drive.evaluation.cEventCenter.ICEventListener; |
| | | import safeluck.drive.evaluation.util.CThreadPoolExecutor; |
| | |
| | | private ICEventListener icEventListener = new ICEventListener() { |
| | | @Override |
| | | public void onCEvent(String topic, int msgCode, int resultCode, Object obj) { |
| | | datas.clear(); |
| | | if (msgCode == Constant.MCU_SN){ |
| | | String mcuinfoStr = (String)obj; |
| | | if (gson != null){ |
| | | final MCUInfo mcuInfo=gson.fromJson(mcuinfoStr, MCUInfo.class); |
| | | Field [] fields = mcuInfo.getClass().getDeclaredFields(); |
| | | datas.clear(); |
| | | |
| | | |
| | | for (int i = 0; i < fields.length; i++) { |
| | | fields[i].setAccessible(true); |
| | |
| | | |
| | | } |
| | | } |
| | | if (msgCode == Constant.ID_SM_CAN_BRIEF){ |
| | | ProductTestData productTestData = gson.fromJson((String) obj, ProductTestData.class); |
| | | |
| | | datas.add(new BaseDataUIBean(str2SpannableString("输入状态"),R.mipmap.version_pic,str2FouregourdSpannableString(productTestData.getGpio()+""),"",1,null)); |
| | | datas.add(new BaseDataUIBean(str2SpannableString("发动机转速"),R.mipmap.version_pic,str2FouregourdSpannableString(productTestData.getRpm()+""),"",1,null)); |
| | | datas.add(new BaseDataUIBean(str2SpannableString("车速"),R.mipmap.version_pic,str2FouregourdSpannableString(productTestData.getSpeed()+""),"",1,null)); |
| | | datas.add(new BaseDataUIBean(str2SpannableString("电压"),R.mipmap.version_pic,str2FouregourdSpannableString(productTestData.getVoltage()+""),"",1,null)); |
| | | } |
| | | } |
| | | }; |
| | | |