diff --git a/src/main/java/com/ruoyi/airline/domain/uitl/WayPointUitls.java b/src/main/java/com/ruoyi/airline/domain/uitl/WayPointUitls.java index 47dccef..89cde51 100644 --- a/src/main/java/com/ruoyi/airline/domain/uitl/WayPointUitls.java +++ b/src/main/java/com/ruoyi/airline/domain/uitl/WayPointUitls.java @@ -173,20 +173,24 @@ public class WayPointUitls { case 5000: // 开始等时间隔拍照 return String.format(Locale.US, "%d\t0\t3\t5000\t%s\t0\t%s\t0\t0\t0\t0.000000\t1", - index, point.getPhotoTime(), point.getPhotoType()); + index, + point.getPhotoTime() != null ? String.valueOf(point.getPhotoTime()) : "0", + point.getPhotoType() != null ? String.valueOf(point.getPhotoType()) : "0"); case 6000: // 开始等间距隔拍照 return String.format(Locale.US, "%d\t0\t3\t6000\t%s\t0\t%s\t0\t0\t0\t0.000000\t1", - index, point.getPhotoDistance(), point.getPhotoType()); + index, + point.getPhotoDistance() != null ? String.valueOf(point.getPhotoDistance()) : "0", + point.getPhotoType() != null ? String.valueOf(point.getPhotoType()) : "0"); case 7000: // 结束间隔拍照 return String.format(Locale.US, - "%d\t0\t3\t7000\t0\t0\t0\t0\t0\t0\t0.000000\t1", index); + "%d\t0\t3\t2501\t0\t0\t0\t0\t0\t0\t0.000000\t1", index); case 8000: // 全景拍照 return String.format(Locale.US, - "%d\t0\t3\t8000\t0\t0\t0\t0\t0\t0\t0.000000\t1", index); + "%d\t0\t3\t2501\t0\t0\t0\t0\t0\t0\t0.000000\t1", index); default: throw new IllegalArgumentException("未知命令: " + point.getCommand()); @@ -314,9 +318,9 @@ public class WayPointUitls { "0", "0", 0, "0", "0", "0", "0", 0, 0, 0, - actionActuatorFuncParam.getPhotoTime(), + actionActuatorFuncParam.getPhotoTime() != null ? Integer.parseInt(actionActuatorFuncParam.getPhotoTime()) : null, null, - actionActuatorFuncParam.getPhotoType(), + actionActuatorFuncParam.getPhotoType() != null ? Integer.parseInt(actionActuatorFuncParam.getPhotoType()) : null, null )); break; @@ -329,8 +333,8 @@ public class WayPointUitls { "0", "0", "0", "0", 0, 0, 0, null, - actionActuatorFuncParam.getPhotoDistance(), - actionActuatorFuncParam.getPhotoType(), + actionActuatorFuncParam.getPhotoDistance() != null ? Integer.parseInt(actionActuatorFuncParam.getPhotoDistance()) : null, + actionActuatorFuncParam.getPhotoType() != null ? Integer.parseInt(actionActuatorFuncParam.getPhotoType()) : null, null )); break; @@ -386,7 +390,7 @@ public class WayPointUitls { public static AirLinePointDTO buildPoint(int command, String lat, String lon, int alt, String loiterTime, String cameraPitch, String cameraRoll, String cameraYaw, int sessionControl, int zoomAbsolute, int rotateDirection, - String photoTime, String photoDistance, String photoType, String droneYaw) { + Integer photoTime, Integer photoDistance, Integer photoType, String droneYaw) { AirLinePointDTO point = buildPoint(command, lat, lon, alt, loiterTime, cameraPitch, cameraRoll, cameraYaw, sessionControl, zoomAbsolute, rotateDirection); point.setPhotoTime(photoTime); diff --git a/src/main/java/com/ruoyi/airline/service/dto/AirLinePointDTO.java b/src/main/java/com/ruoyi/airline/service/dto/AirLinePointDTO.java index eee943e..d591be2 100644 --- a/src/main/java/com/ruoyi/airline/service/dto/AirLinePointDTO.java +++ b/src/main/java/com/ruoyi/airline/service/dto/AirLinePointDTO.java @@ -79,17 +79,17 @@ public class AirLinePointDTO implements Serializable { /** * 间隔拍照时间(秒)- 命令5000 */ - private String photoTime; + private Integer photoTime; /** * 间隔拍照距离(米)- 命令6000 */ - private String photoDistance; + private Integer photoDistance; /** * 照片类型(数组1,2,3)- 命令5000/6000 */ - private String photoType; + private Integer photoType; /** * 飞行器偏航角 - 命令4000