| | |
| | | import com.ard.work.domain.cache.UavSignalInfoCache; |
| | | import com.ard.work.domain.cache.UavStateCache; |
| | | import com.ard.work.domain.cache.UavTelemetryDataCache; |
| | | import com.ard.work.domain.cache.UavWaylineCache; |
| | | import com.ard.work.domain.dto.BoxHistoryDTO; |
| | | import com.ard.work.domain.dto.BoxPhotosDTO; |
| | | import com.ard.work.domain.dto.BoxSettingsDTO; |
| | |
| | | if (ardDroneInfo == null) { |
| | | throw new ControlException("未找到对应的飞行器信息,boxSn:{}" + boxSn); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | TyHttpCommonReceiver<BoxStreamUrlReceiver> boxLiveUrl = tyClient.getBoxLiveUrl(ardDroneInfo.getServerId(), |
| | | boxSn); |
| | | return boxLiveUrl == null ? null : boxLiveUrl.getContent(); |
| | |
| | | throw new ControlException("未找到对应的飞行器信息,boxSn:{}" + boxSn); |
| | | } |
| | | TyHttpCommonReceiver<?> result = tyClient.updateBoxSettings(ardDroneInfo.getServerId(), boxSettingsDTO); |
| | | return result.getState() == 1; |
| | | return result.getState() == 0; |
| | | } |
| | | |
| | | /** |
| | |
| | | * 方向控制 |
| | | */ |
| | | @CheckControlRight(UavControlType.FLY) |
| | | @CheckTakeoffAltitude(minAltitude = 30.0) |
| | | @CheckTakeoffAltitude |
| | | @Override |
| | | public Boolean flyControl(FlyControlDTO flyControlDTO) { |
| | | String boxSn = flyControlDTO.getBoxSn(); |
| | |
| | | * 指点飞行控制 |
| | | */ |
| | | @CheckControlRight(UavControlType.FLY) |
| | | @CheckTakeoffAltitude(minAltitude = 30.0) |
| | | @CheckTakeoffAltitude |
| | | @CheckNoFlyZone |
| | | @Override |
| | | public Boolean flyPointControl(FlyPointControlDTO flyPointControlDTO) { |
| | |
| | | if (ardDroneInfo == null) { |
| | | throw new ControlException("未找到对应的飞行器信息,boxSn:{}" + boxSn); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | FlyPointControlCancelCmd flyPointControlCancelCmd = new FlyPointControlCancelCmd(flyPointControlCancelDTO); |
| | | this.sendMessage(ardDroneInfo.getServerId(), flyPointControlCancelCmd); |
| | | return true; |
| | |
| | | if (ardDroneInfo == null) { |
| | | throw new ControlException("未找到对应的飞行器信息,boxSn:{}" + boxSn); |
| | | } |
| | | FlyRoundControlCmd flyPointControlCmd = new FlyRoundControlCmd(flyRoundControlDTO); |
| | | this.sendMessage(ardDroneInfo.getServerId(), flyPointControlCmd); |
| | | FlyRoundControlCmd flyRoundControlCmd = new FlyRoundControlCmd(flyRoundControlDTO); |
| | | this.sendMessage(ardDroneInfo.getServerId(), flyRoundControlCmd); |
| | | return true; |
| | | } |
| | | |
| | |
| | | if (ardDroneInfo == null) { |
| | | throw new ControlException("未找到对应的飞行器信息,boxSn:{}" + boxSn); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | EmergencyBrakeCmd emergencyBrakeCmd = new EmergencyBrakeCmd(emeragencyBrakeDTO); |
| | | this.sendMessage(ardDroneInfo.getServerId(), emergencyBrakeCmd); |
| | | return true; |