| | |
| | | import com.ard.tianyu.netty.command.camera.CapturePicReplyCmd; |
| | | import com.ard.tianyu.netty.command.camera.RecordStartReplyCmd; |
| | | import com.ard.tianyu.netty.command.camera.RecordStopReplyCmd; |
| | | import com.ard.tianyu.netty.command.manual.ReturnHomeReplyCmd; |
| | | import com.ard.tianyu.netty.command.manual.TakeOffReplyCmd; |
| | | import com.ard.tianyu.netty.command.manual.*; |
| | | import com.ard.tianyu.netty.command.notice.BoxPowerStatusReplyCmd; |
| | | import com.ard.tianyu.netty.command.notice.FlyWayEndReplyCmd; |
| | | import com.ard.tianyu.netty.command.notice.UavReadyReplyCmd; |
| | |
| | | baseCmd = new ReturnHomeReplyCmd(boxSn, result, errorCode); |
| | | log.debug("返航回复: {}", boxSn); |
| | | break; |
| | | case 0x13: |
| | | result = in.readByte(); |
| | | errorCode = in.readInt(); |
| | | uavData = new byte[15]; |
| | | in.readBytes(uavData); |
| | | boxSn = new String(uavData); |
| | | baseCmd = new ReturnHomeCancelReplyCmd(boxSn, result, errorCode); |
| | | log.debug("取消返航回复: {}", boxSn); |
| | | break; |
| | | case 0x14: |
| | | result = in.readByte(); |
| | | errorCode = in.readInt(); |
| | | uavData = new byte[15]; |
| | | in.readBytes(uavData); |
| | | boxSn = new String(uavData); |
| | | baseCmd = new LandReplyCmd(boxSn, result, errorCode); |
| | | log.debug("降落回复: {}", boxSn); |
| | | break; |
| | | case 0x15: |
| | | result = in.readByte(); |
| | | errorCode = in.readInt(); |
| | | uavData = new byte[15]; |
| | | in.readBytes(uavData); |
| | | boxSn = new String(uavData); |
| | | baseCmd = new LandCancelReplyCmd(boxSn, result, errorCode); |
| | | log.debug("取消降落回复: {}", boxSn); |
| | | break; |
| | | case 0x29: |
| | | result = in.readByte(); |
| | | errorCode = in.readInt(); |
| | | uavData = new byte[15]; |
| | | in.readBytes(uavData); |
| | | boxSn = new String(uavData); |
| | | baseCmd = new LandForcedReplyCmd(boxSn, result, errorCode); |
| | | log.debug("强制降落回复: {}", boxSn); |
| | | break; |
| | | case 0x32: |
| | | result = in.readByte(); |
| | | errorCode = in.readInt(); |
| | | uavData = new byte[15]; |
| | | in.readBytes(uavData); |
| | | boxSn = new String(uavData); |
| | | baseCmd = new EmergencyBrakeReplyCmd(boxSn, result, errorCode); |
| | | log.debug("紧急制动回复: {}", boxSn); |
| | | break; |
| | | case 0x39: |
| | | result = in.readByte(); |
| | | errorCode = in.readInt(); |
| | | uavData = new byte[15]; |
| | | in.readBytes(uavData); |
| | | boxSn = new String(uavData); |
| | | baseCmd = new PointControlReachedReplyCmd(boxSn, result, errorCode); |
| | | log.debug("到达指点飞行位置回复: {}", boxSn); |
| | | break; |
| | | case 0x22: |
| | | result = in.readByte(); |
| | | errorCode = in.readInt(); |