feat:航线编辑接口新的航点动作保存

This commit is contained in:
gyb 2026-03-11 10:45:16 +08:00
parent 7d3d36eb0f
commit b3cd8d8965
2 changed files with 16 additions and 12 deletions

View File

@ -173,20 +173,24 @@ public class WayPointUitls {
case 5000: // 开始等时间隔拍照 case 5000: // 开始等时间隔拍照
return String.format(Locale.US, return String.format(Locale.US,
"%d\t0\t3\t5000\t%s\t0\t%s\t0\t0\t0\t0.000000\t1", "%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: // 开始等间距隔拍照 case 6000: // 开始等间距隔拍照
return String.format(Locale.US, return String.format(Locale.US,
"%d\t0\t3\t6000\t%s\t0\t%s\t0\t0\t0\t0.000000\t1", "%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: // 结束间隔拍照 case 7000: // 结束间隔拍照
return String.format(Locale.US, 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: // 全景拍照 case 8000: // 全景拍照
return String.format(Locale.US, 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: default:
throw new IllegalArgumentException("未知命令: " + point.getCommand()); throw new IllegalArgumentException("未知命令: " + point.getCommand());
@ -314,9 +318,9 @@ public class WayPointUitls {
"0", "0", 0, "0", "0", 0,
"0", "0", "0", "0", "0", "0", "0", "0",
0, 0, 0, 0, 0, 0,
actionActuatorFuncParam.getPhotoTime(), actionActuatorFuncParam.getPhotoTime() != null ? Integer.parseInt(actionActuatorFuncParam.getPhotoTime()) : null,
null, null,
actionActuatorFuncParam.getPhotoType(), actionActuatorFuncParam.getPhotoType() != null ? Integer.parseInt(actionActuatorFuncParam.getPhotoType()) : null,
null null
)); ));
break; break;
@ -329,8 +333,8 @@ public class WayPointUitls {
"0", "0", "0", "0", "0", "0", "0", "0",
0, 0, 0, 0, 0, 0,
null, null,
actionActuatorFuncParam.getPhotoDistance(), actionActuatorFuncParam.getPhotoDistance() != null ? Integer.parseInt(actionActuatorFuncParam.getPhotoDistance()) : null,
actionActuatorFuncParam.getPhotoType(), actionActuatorFuncParam.getPhotoType() != null ? Integer.parseInt(actionActuatorFuncParam.getPhotoType()) : null,
null null
)); ));
break; break;
@ -386,7 +390,7 @@ public class WayPointUitls {
public static AirLinePointDTO buildPoint(int command, String lat, String lon, int alt, public static AirLinePointDTO buildPoint(int command, String lat, String lon, int alt,
String loiterTime, String cameraPitch, String cameraRoll, String cameraYaw, String loiterTime, String cameraPitch, String cameraRoll, String cameraYaw,
int sessionControl, int zoomAbsolute, int rotateDirection, 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, AirLinePointDTO point = buildPoint(command, lat, lon, alt, loiterTime, cameraPitch, cameraRoll, cameraYaw,
sessionControl, zoomAbsolute, rotateDirection); sessionControl, zoomAbsolute, rotateDirection);
point.setPhotoTime(photoTime); point.setPhotoTime(photoTime);

View File

@ -79,17 +79,17 @@ public class AirLinePointDTO implements Serializable {
/** /**
* 间隔拍照时间- 命令5000 * 间隔拍照时间- 命令5000
*/ */
private String photoTime; private Integer photoTime;
/** /**
* 间隔拍照距离- 命令6000 * 间隔拍照距离- 命令6000
*/ */
private String photoDistance; private Integer photoDistance;
/** /**
* 照片类型数组1,2,3- 命令5000/6000 * 照片类型数组1,2,3- 命令5000/6000
*/ */
private String photoType; private Integer photoType;
/** /**
* 飞行器偏航角 - 命令4000 * 飞行器偏航角 - 命令4000