| | |
| | | boolean ackStatus = getAckStatus(opCmd, opCmdAck); |
| | | if (ackStatus) {//操作成功 |
| | | return new Response().set(1, true, "更新完成"); |
| | | } else { |
| | | continue; |
| | | } |
| | | Thread.sleep(250); |
| | | } |
| | | return new Response().set(1, false, "网络连接失败,更新失败"); |
| | | }catch (NoSuchFieldException | IllegalAccessException e){ |
| | | }catch (NoSuchFieldException | IllegalAccessException | InterruptedException e){ |
| | | return new Response().set(0,e.toString()); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 持续更新cmd和cmdAck对应关系 |
| | | * @param opCmd |
| | | * @param opCmdAck |
| | | * @return |
| | | */ |
| | | private static boolean getAckStatus(Integer opCmd,Integer opCmdAck) { |
| | | switch (opCmd){ |
| | | case CMD_Constant.CMD_SetACDCARK_Telemetry:{ |