| | |
| | | import com.ard.tianyu.model.dto.converter.UavSignalInfoConverter; |
| | | import com.ard.tianyu.model.dto.converter.UavStateConverter; |
| | | import com.ard.tianyu.model.dto.converter.UavTelemetryDataConverter; |
| | | import com.ard.tianyu.model.dto.manual.ReturnHomeDTO; |
| | | import com.ard.tianyu.model.dto.manual.SwitchUavControlDTO; |
| | | import com.ard.tianyu.model.dto.manual.TakeOffDTO; |
| | | import com.ard.tianyu.model.dto.signal.SignalInfo; |
| | |
| | | import com.ard.tianyu.netty.command.control.AbsAngleControlCmd; |
| | | import com.ard.tianyu.netty.command.control.AngleControlCmd; |
| | | import com.ard.tianyu.netty.command.control.SpeedControlCmd; |
| | | import com.ard.tianyu.netty.command.manual.SwitchUavControlCmd; |
| | | import com.ard.tianyu.netty.command.manual.TakeOffCmd; |
| | | 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; |
| | |
| | | } |
| | | |
| | | /** |
| | | * 返航 |
| | | */ |
| | | @Override |
| | | public void returnHome(ReturnHomeDTO returnHomeDTO) { |
| | | ReturnHomeCmd returnHomeCmd=new ReturnHomeCmd(returnHomeDTO); |
| | | this.sendMessage(tyConfiguration.getIpPort(), returnHomeCmd); |
| | | } |
| | | |
| | | /** |
| | | * 获取无人机状态 |
| | | */ |
| | | @Override |
| | |
| | | TakeOffReplyCmd takeOffReplyCommand = (TakeOffReplyCmd) tyCommand; |
| | | log.info("收到无人机起飞回复:{} 错误码:{}", String.format("0x%02X", takeOffReplyCommand.getResult() & 0xFF), takeOffReplyCommand.getErrorCode()); |
| | | } |
| | | //返航回复 |
| | | if (tyCommand instanceof ReturnHomeReplyCmd) { |
| | | ReturnHomeReplyCmd returnHomeReplyCmd = (ReturnHomeReplyCmd) tyCommand; |
| | | log.info("收到无人机返航回复:{} 错误码:{}", String.format("0x%02X", returnHomeReplyCmd.getResult() & 0xFF), returnHomeReplyCmd.getErrorCode()); |
| | | } |
| | | break; |
| | | default: |
| | | // 处理其他消息 |