| | |
| | | return true; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 环绕飞行控制 |
| | | */ |
| | | @Override |
| | | public Boolean FlyRoundControl(FlyRoundControlDTO flyRoundControlDTO) { |
| | | String boxSn = flyRoundControlDTO.getBoxSn(); |
| | | ArdDroneInfo ardDroneInfo = ardDroneService.selectArdDroneByboxSn(boxSn); |
| | | if (ardDroneInfo == null) { |
| | | throw new ControlException("未找到对应的飞行器信息,boxSn:{}" + boxSn); |
| | | } |
| | | FlyRoundControlCmd flyPointControlCmd = new FlyRoundControlCmd(flyRoundControlDTO); |
| | | this.sendMessage(ardDroneInfo.getServerId(), flyPointControlCmd); |
| | | return true; |
| | | } |
| | | |
| | | /** |
| | | * 停止环绕飞行控制 |
| | | */ |
| | | @Override |
| | | public Boolean FlyRoundControlCancel(FlyRoundControlCancelDTO flyRoundControlCancelDTO) { |
| | | String boxSn = flyRoundControlCancelDTO.getBoxSn(); |
| | | ArdDroneInfo ardDroneInfo = ardDroneService.selectArdDroneByboxSn(boxSn); |
| | | if (ardDroneInfo == null) { |
| | | throw new ControlException("未找到对应的飞行器信息,boxSn:{}" + boxSn); |
| | | } |
| | | FlyRoundControlCancelCmd flyRoundControlCancelCmd = new FlyRoundControlCancelCmd(flyRoundControlCancelDTO); |
| | | this.sendMessage(ardDroneInfo.getServerId(), flyRoundControlCancelCmd); |
| | | return true; |
| | | } |
| | | |
| | | /** |
| | | * 紧急制动 |
| | | */ |
| | |
| | | logPrint("设置返航点", returnPointSettingReplyCmd.getResult(), |
| | | returnPointSettingReplyCmd.getErrorCode()); |
| | | } |
| | | //到达环绕位置回复 |
| | | if (tyCommand instanceof FlyRoundReplyCmd) { |
| | | FlyRoundReplyCmd flyRoundReplyCmd = (FlyRoundReplyCmd) tyCommand; |
| | | logPrint("到达环绕位置", flyRoundReplyCmd.getResult(), |
| | | flyRoundReplyCmd.getErrorCode()); |
| | | } |
| | | break; |
| | | case (byte) 0xD2: |
| | | //设置视频码流回复 |