| | |
| | | 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.TakeOffReplyCmd; |
| | | import com.ard.tianyu.netty.command.notice.BoxPowerStatusReplyCmd; |
| | | import com.ard.tianyu.netty.command.notice.FlyWayEndReplyCmd; |
| | | import com.ard.tianyu.netty.command.notice.UavReadyReplyCmd; |
| | |
| | | byte encryptionFlag = in.readByte(); |
| | | byte actionCode = in.readByte(); |
| | | switch (actionCode) { |
| | | case 0x22: |
| | | case 0x11: |
| | | byte result = in.readByte(); |
| | | int errorCode = in.readInt(); |
| | | uavData = new byte[15]; |
| | | in.readBytes(uavData); |
| | | String boxSn = new String(uavData); |
| | | baseCmd = new TakeOffReplyCmd(boxSn, result, errorCode); |
| | | log.debug("起飞回复: {}", boxSn); |
| | | break; |
| | | case 0x22: |
| | | result = in.readByte(); |
| | | errorCode = in.readInt(); |
| | | uavData = new byte[15]; |
| | | in.readBytes(uavData); |
| | | boxSn = new String(uavData); |
| | | baseCmd = new CameraModeReplyCmd(boxSn, result, errorCode); |
| | | log.debug("设置相机模式回复: {}", boxSn); |
| | | break; |