| | |
| | | import com.ard.tianyu.model.dto.BoxHistoryDTO; |
| | | import com.ard.tianyu.model.dto.BoxPhotosDTO; |
| | | import com.ard.tianyu.model.dto.BoxSettingsDTO; |
| | | import com.ard.tianyu.model.dto.signal.SignalInfo; |
| | | import com.ard.tianyu.model.dto.state.UavState; |
| | | import com.ard.tianyu.model.dto.telemetry.TelemetryData; |
| | | import com.ard.tianyu.model.receiver.BoxHistoryReceiver; |
| | | import com.ard.tianyu.model.receiver.BoxPhotosReceiver; |
| | | import com.ard.tianyu.model.receiver.BoxInfoReceiver; |
| | |
| | | List<BoxPhotosReceiver> boxPhotos = tyService.getBoxPhotos(boxPhotosDTO); |
| | | return AjaxResult.success(boxPhotos); |
| | | } |
| | | |
| | | @ApiOperation("修改云盒设置") |
| | | @PostMapping("/updateBoxSettings") |
| | | public AjaxResult updateBoxSettings(@RequestBody BoxSettingsDTO boxSettingsDTO) { |
| | | Boolean state = tyService.updateBoxSettings(boxSettingsDTO); |
| | | return AjaxResult.success(state); |
| | | } |
| | | @ApiOperation("无人机控制订阅") |
| | | @GetMapping("/uavControlSubscribe") |
| | | public AjaxResult uavControlSubscribe(String boxSn) { |
| | | tyService.uavControlSubscribe(boxSn); |
| | | return AjaxResult.success(); |
| | | } |
| | | |
| | | @ApiOperation("云台转动(基于角度)") |
| | | @GetMapping("/controlAngle") |
| | | public AjaxResult controlAngle(String boxSn) { |
| | | tyService.controlAngle(boxSn); |
| | | public AjaxResult controlAngle(String boxSn,Integer actionId,Integer rotationAngle) { |
| | | tyService.controlAngle(boxSn,actionId,rotationAngle); |
| | | return AjaxResult.success(); |
| | | } |
| | | |
| | | @ApiOperation("获取无人机状态") |
| | | @GetMapping("/getUavState") |
| | | public AjaxResult getUavState(String boxSn) { |
| | | UavState uavState = tyService.getUavState(boxSn); |
| | | return AjaxResult.success(uavState); |
| | | } |
| | | |
| | | @ApiOperation("获取无人机遥测数据") |
| | | @GetMapping("/getUavTelemetryData") |
| | | public AjaxResult getUavTelemetryData(String boxSn) { |
| | | TelemetryData telemetryData = tyService.getUavTelemetryData(boxSn); |
| | | return AjaxResult.success(telemetryData); |
| | | } |
| | | |
| | | @ApiOperation("获取无人机信道质量数据") |
| | | @GetMapping("/getSignalInfo") |
| | | public AjaxResult getSignalInfo(String boxSn) { |
| | | SignalInfo signalInfo = tyService.getSignalInfo(boxSn); |
| | | return AjaxResult.success(signalInfo); |
| | | } |
| | | } |