From b518f895dec5264fd25e22a68300c40ceba6f43d Mon Sep 17 00:00:00 2001
From: 826220679@qq.com <826220679@qq.com>
Date: 星期六, 20 十二月 2025 15:30:20 +0800
Subject: [PATCH] 新增了按钮功能
---
src/dikuai/Dikuai.java | 61 ++++++++++++++++++++++++++++++
1 files changed, 61 insertions(+), 0 deletions(-)
diff --git a/src/dikuai/Dikuai.java b/src/dikuai/Dikuai.java
index b3f127a..a21456c 100644
--- a/src/dikuai/Dikuai.java
+++ b/src/dikuai/Dikuai.java
@@ -23,6 +23,8 @@
private String plannedPath;
// 杩斿洖鐐瑰潗鏍�
private String returnPointCoordinates;
+ // 寰�杩旇矾寰勫潗鏍囷紙鍓茶崏鏈哄畬鎴愬壊鑽変綔涓氳繑鍥炵殑璺緞鍧愭爣锛屾牸寮忥細X1,Y1;X2,Y2;...;XN,YN锛�
+ private String returnPathCoordinates;
// 杈圭晫鐐归棿闅�
private String boundaryPointInterval;
// 瑙掑害闃堝��
@@ -43,6 +45,12 @@
private String mowingPattern;
// 鍓茶崏瀹藉害
private String mowingWidth;
+ // 鍓茶崏鏈哄壊鍒�瀹藉害锛堢背锛夛紝榛樿0.40绫�
+ private String mowingBladeWidth;
+ // 鍓茶崏閲嶅彔璺濈锛堢背锛夛紝榛樿0.06绫�
+ private String mowingOverlapDistance;
+ // 鍓茶崏瀹夊叏璺濈锛堢背锛�
+ private String mowingSafetyDistance;
// 瀛樺偍澶氫釜鍦板潡鐨勬槧灏勮〃锛岄敭涓哄湴鍧楃紪鍙�
private static Map<String, Dikuai> dikuaiMap = new HashMap<>();
@@ -94,6 +102,7 @@
dikuai.boundaryCoordinates = landProps.getProperty("boundaryCoordinates", "-1");
dikuai.plannedPath = landProps.getProperty("plannedPath", "-1");
dikuai.returnPointCoordinates = landProps.getProperty("returnPointCoordinates", "-1");
+ dikuai.returnPathCoordinates = landProps.getProperty("returnPathCoordinates", "-1");
dikuai.boundaryPointInterval = landProps.getProperty("boundaryPointInterval", "-1");
dikuai.angleThreshold = landProps.getProperty("angleThreshold", "-1");
dikuai.intelligentSceneAnalysis = landProps.getProperty("intelligentSceneAnalysis", "-1");
@@ -104,6 +113,9 @@
dikuai.mowingPattern = landProps.getProperty("mowingPattern", "-1");
dikuai.mowingWidth = landProps.getProperty("mowingWidth", "-1");
dikuai.mowingTrack = landProps.getProperty("mowingTrack", "-1");
+ dikuai.mowingBladeWidth = landProps.getProperty("mowingBladeWidth", "0.40");
+ dikuai.mowingOverlapDistance = landProps.getProperty("mowingOverlapDistance", "0.06");
+ dikuai.mowingSafetyDistance = landProps.getProperty("mowingSafetyDistance", "-1");
dikuaiMap.put(landNum, dikuai);
}
@@ -195,6 +207,9 @@
case "returnPointCoordinates":
this.returnPointCoordinates = value;
return true;
+ case "returnPathCoordinates":
+ this.returnPathCoordinates = value;
+ return true;
case "boundaryPointInterval":
this.boundaryPointInterval = value;
return true;
@@ -225,6 +240,15 @@
case "mowingTrack":
this.mowingTrack = value;
return true;
+ case "mowingBladeWidth":
+ this.mowingBladeWidth = value;
+ return true;
+ case "mowingOverlapDistance":
+ this.mowingOverlapDistance = value;
+ return true;
+ case "mowingSafetyDistance":
+ this.mowingSafetyDistance = value;
+ return true;
default:
System.err.println("鏈煡瀛楁: " + fieldName);
return false;
@@ -249,6 +273,7 @@
if (dikuai.boundaryCoordinates != null) properties.setProperty(landNumber + ".boundaryCoordinates", dikuai.boundaryCoordinates);
if (dikuai.plannedPath != null) properties.setProperty(landNumber + ".plannedPath", dikuai.plannedPath);
if (dikuai.returnPointCoordinates != null) properties.setProperty(landNumber + ".returnPointCoordinates", dikuai.returnPointCoordinates);
+ if (dikuai.returnPathCoordinates != null) properties.setProperty(landNumber + ".returnPathCoordinates", dikuai.returnPathCoordinates);
if (dikuai.boundaryPointInterval != null) properties.setProperty(landNumber + ".boundaryPointInterval", dikuai.boundaryPointInterval);
if (dikuai.angleThreshold != null) properties.setProperty(landNumber + ".angleThreshold", dikuai.angleThreshold);
if (dikuai.intelligentSceneAnalysis != null) properties.setProperty(landNumber + ".intelligentSceneAnalysis", dikuai.intelligentSceneAnalysis);
@@ -259,6 +284,9 @@
if (dikuai.mowingPattern != null) properties.setProperty(landNumber + ".mowingPattern", dikuai.mowingPattern);
if (dikuai.mowingWidth != null) properties.setProperty(landNumber + ".mowingWidth", dikuai.mowingWidth);
if (dikuai.mowingTrack != null) properties.setProperty(landNumber + ".mowingTrack", dikuai.mowingTrack);
+ if (dikuai.mowingBladeWidth != null) properties.setProperty(landNumber + ".mowingBladeWidth", dikuai.mowingBladeWidth);
+ if (dikuai.mowingOverlapDistance != null) properties.setProperty(landNumber + ".mowingOverlapDistance", dikuai.mowingOverlapDistance);
+ if (dikuai.mowingSafetyDistance != null) properties.setProperty(landNumber + ".mowingSafetyDistance", dikuai.mowingSafetyDistance);
}
try {
@@ -330,6 +358,14 @@
this.returnPointCoordinates = returnPointCoordinates;
}
+ public String getReturnPathCoordinates() {
+ return returnPathCoordinates;
+ }
+
+ public void setReturnPathCoordinates(String returnPathCoordinates) {
+ this.returnPathCoordinates = returnPathCoordinates;
+ }
+
public String getBoundaryPointInterval() {
return boundaryPointInterval;
}
@@ -410,6 +446,30 @@
this.mowingTrack = mowingTrack;
}
+ public String getMowingBladeWidth() {
+ return mowingBladeWidth;
+ }
+
+ public void setMowingBladeWidth(String mowingBladeWidth) {
+ this.mowingBladeWidth = mowingBladeWidth;
+ }
+
+ public String getMowingOverlapDistance() {
+ return mowingOverlapDistance;
+ }
+
+ public void setMowingOverlapDistance(String mowingOverlapDistance) {
+ this.mowingOverlapDistance = mowingOverlapDistance;
+ }
+
+ public String getMowingSafetyDistance() {
+ return mowingSafetyDistance;
+ }
+
+ public void setMowingSafetyDistance(String mowingSafetyDistance) {
+ this.mowingSafetyDistance = mowingSafetyDistance;
+ }
+
@Override
public String toString() {
return "Dikuai{" +
@@ -420,6 +480,7 @@
", boundaryCoordinates='" + boundaryCoordinates + '\'' +
", plannedPath='" + plannedPath + '\'' +
", returnPointCoordinates='" + returnPointCoordinates + '\'' +
+ ", returnPathCoordinates='" + returnPathCoordinates + '\'' +
", boundaryPointInterval='" + boundaryPointInterval + '\'' +
", angleThreshold='" + angleThreshold + '\'' +
", intelligentSceneAnalysis='" + intelligentSceneAnalysis + '\'' +
--
Gitblit v1.10.0