| | |
| | | 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.camera.CapturePicDto; |
| | | import com.ard.tianyu.model.dto.camera.RecordDto; |
| | | import com.ard.tianyu.model.dto.control.AbsAngleControlDto; |
| | | import com.ard.tianyu.model.dto.control.AngleControlDto; |
| | | import com.ard.tianyu.model.dto.control.SpeedControlDto; |
| | | import com.ard.tianyu.model.dto.camera.*; |
| | | import com.ard.tianyu.model.dto.control.AbsAngleControlDTO; |
| | | import com.ard.tianyu.model.dto.control.AngleControlDTO; |
| | | import com.ard.tianyu.model.dto.control.SpeedControlDTO; |
| | | 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 org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.validation.constraints.Max; |
| | | import javax.validation.constraints.Min; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | @ApiOperation(value = "云台转动(基于角度)", notes = "actionCode值:0-回中,1-上,2-右上,3-右,4-右下,5-下,6-左下,7-左,8-左上,254-停止") |
| | | @ApiOperationSupport(order = 1) |
| | | @PostMapping("/angleControl") |
| | | public AjaxResult angleControl(@RequestBody AngleControlDto angleControlDto) { |
| | | public AjaxResult angleControl(@RequestBody AngleControlDTO angleControlDto) { |
| | | tyService.angleControl(angleControlDto); |
| | | return AjaxResult.success(); |
| | | } |
| | |
| | | @ApiOperation(value = "云台绝对值控制(基于角度)", notes = "俯仰pitch范围:[-120°至+30°] 平移yaw范围:[-180°至+180°] 横滚roll范围:[-90°至+60°]") |
| | | @ApiOperationSupport(order = 2) |
| | | @PostMapping("/absAngleControl") |
| | | public AjaxResult absAngleControl(@RequestBody @Validated AbsAngleControlDto angleControlDto) { |
| | | public AjaxResult absAngleControl(@RequestBody @Validated AbsAngleControlDTO angleControlDto) { |
| | | tyService.absAngleControl(angleControlDto); |
| | | return AjaxResult.success(); |
| | | } |
| | |
| | | @ApiOperation(value = "云台转动(基于速度)", notes = "俯仰转动速度:上正下负 平移转动速度:右正左负 横滚转动速度:顺时针正,逆时针负") |
| | | @ApiOperationSupport(order = 3) |
| | | @PostMapping("/speedControl") |
| | | public AjaxResult speedControl(@RequestBody @Validated SpeedControlDto speedControlDto) { |
| | | public AjaxResult speedControl(@RequestBody @Validated SpeedControlDTO speedControlDto) { |
| | | tyService.speedControl(speedControlDto); |
| | | return AjaxResult.success(); |
| | | } |
| | |
| | | @ApiOperation("拍照") |
| | | @ApiOperationSupport(order = 4) |
| | | @PostMapping("/capturePicDto") |
| | | public AjaxResult capturePic(@RequestBody CapturePicDto capturePicDto) { |
| | | public AjaxResult capturePic(@RequestBody CapturePicDTO capturePicDto) { |
| | | tyService.capturePic(capturePicDto); |
| | | return AjaxResult.success(); |
| | | } |
| | |
| | | @ApiOperation("录像") |
| | | @ApiOperationSupport(order = 5) |
| | | @PostMapping("/record") |
| | | public AjaxResult record(@RequestBody RecordDto recordDto) { |
| | | public AjaxResult record(@RequestBody RecordDTO recordDto) { |
| | | tyService.record(recordDto); |
| | | return AjaxResult.success(); |
| | | } |
| | | |
| | | @ApiOperation(value = "变倍", notes = "actionCode值:10变倍加 | 11变倍减 | 15复位 | 255停止") |
| | | @ApiOperationSupport(order = 6) |
| | | @PostMapping("/zoom") |
| | | public AjaxResult zoom(@RequestBody ZoomDTO zoomDTO) { |
| | | tyService.zoom(zoomDTO); |
| | | return AjaxResult.success(); |
| | | } |
| | | @ApiOperation("变倍指定倍数") |
| | | @ApiOperationSupport(order = 7) |
| | | @PostMapping("/zoomToLevel") |
| | | public AjaxResult zoomToLevel(@RequestBody ZoomToLevelDTO zoomToLevelDTO) { |
| | | tyService.zoomToLevel(zoomToLevelDTO); |
| | | return AjaxResult.success(); |
| | | } |
| | | |
| | | @ApiOperation(value = "切换摄像头", notes = "actionParam值:0切换到FPV摄像头 | 1切换到载荷摄像头") |
| | | @ApiOperationSupport(order = 8) |
| | | @PostMapping("/switchCamera") |
| | | public AjaxResult switchCamera(@RequestBody SwitchCameraDTO switchCameraDTO) { |
| | | tyService.switchCamera(switchCameraDTO); |
| | | return AjaxResult.success(); |
| | | } |
| | | @ApiOperation(value = "切换视频源", notes = "相机在主相机镜头时有效,FPV镜头时无效 actionParam值:0-可见 1-变焦 2-红外") |
| | | @ApiOperationSupport(order = 8) |
| | | @PostMapping("/switchSource") |
| | | public AjaxResult switchSource(@RequestBody SwitchSourceDTO switchSourceDTO) { |
| | | tyService.switchSource(switchSourceDTO); |
| | | return AjaxResult.success(); |
| | | } |
| | | |
| | | @ApiOperation(value = "打开或关闭照片回传", notes = "actionParam值:0-关闭,1-打开") |
| | | @ApiOperationSupport(order = 8) |
| | | @PostMapping("/photoReturnToggle") |
| | | public AjaxResult photoReturnToggle(@RequestBody PhotoReturnToggleDTO photoReturnToggleDTO) { |
| | | tyService.photoReturnToggle(photoReturnToggleDTO); |
| | | return AjaxResult.success(); |
| | | } |
| | | |
| | | @ApiOperation("获取无人机状态") |
| | | @GetMapping("/getUavState") |
| | | public AjaxResult getUavState(String boxSn) { |