From 1175f5fbe8fd832943880bfc37c0e2a451a0688a Mon Sep 17 00:00:00 2001
From: 张世豪 <979909237@qq.com>
Date: 星期四, 25 十二月 2025 19:34:38 +0800
Subject: [PATCH] 删除了几个类优化了路径生成的逻辑
---
src/gecaoji/Device.java | 500 ++++++++++++++++++++++++++++++++++++++++++++++++++++--
1 files changed, 475 insertions(+), 25 deletions(-)
diff --git a/src/gecaoji/Device.java b/src/gecaoji/Device.java
index 91d9bcc..9d1a1c3 100644
--- a/src/gecaoji/Device.java
+++ b/src/gecaoji/Device.java
@@ -1,8 +1,12 @@
package gecaoji;
import baseStation.BaseStation;
import set.Setsys;
+import zhuye.MowerLocationData;
import java.io.FileInputStream;
+import java.io.FileOutputStream;
import java.io.IOException;
+import java.io.OutputStreamWriter;
+import java.nio.charset.StandardCharsets;
import java.util.Locale;
import java.util.Properties;
@@ -64,14 +68,37 @@
// 鑸悜瑙�
private String pitch;
// 淇话瑙�
- private String battery;
- // 瀹炴椂鐢甸噺
+ private String roll; // 妯粴瑙� 瑙掑害
+ private String yaw; // 鍋忚埅瑙� 瑙掑害
+ private String battery_level; // 鐢垫睜鐢甸噺鐧惧垎姣�
+ private String battery_voltage; // 鐢垫睜鐢靛帇
+ private String operation_mode; // 鎿嶄綔妯″紡锛歮anual, auto, emergency_stop
+ private String motor_status; // 鐢垫満鐘舵�侊細stopped, running, error
+ private String blade_status; // 鍒�鐗囩姸鎬侊細stopped, rotating
+ private String path_id_saved; // 瀛樺偍鐨勮矾寰処D
+ private String error_code; // 閿欒浠g爜
+ private String error_message; // 閿欒淇℃伅
+
private String positioningStatus;
// 瀹氫綅鐘舵��
private String satelliteCount;
// 鍗槦鍙暟
private String differentialAge;
// 宸垎鏃堕棿
+ private String self_check_status = "-1"; // 鏂板鑷鐘舵�侊細1-瀹屾垚锛�0-鏈畬鎴�
+ // 鍓茶崏鏈鸿嚜妫�鐘舵��
+ private String mowerStartStatus = "-1";
+ // 鍓茶崏鏈哄惎鍔ㄧ姸鎬侊細1寮�鍚紝0鐔勭伀锛�-1鏈煡
+ private String mowerLightStatus = "-1";
+ // 鍓茶崏鏈虹伅寮�鍏崇姸鎬侊細1寮�鍚紝0鍏抽棴锛�-1鏈煡
+ private String blade_height = "-1"; // 鍒�鐩橀珮搴� 鍘樼背
+ // 鍓茶崏鏈哄垁鐩橀珮搴︼細-1鏈煡
+ private String mowerWidth;
+ // 鍓茶崏鏈哄搴︼紝鍗曚綅绫�
+ private String mowerLength;
+ // 鍓茶崏鏈洪暱搴︼紝鍗曚綅绫�
+ private String mowingSafetyDistance;
+ // 鍓茶崏瀹夊叏璺濈锛屽崟浣嶇背
private static final double METERS_PER_DEGREE_LAT = 111320.0d;
@@ -102,6 +129,71 @@
applyDefaults(gecaoji);
}
+ /**
+ * 淇濆瓨鎵�鏈夊睘鎬у埌device.properties鏂囦欢
+ */
+ public void saveToProperties() {
+ Properties properties = new Properties();
+
+ // 鍔犺浇鐜版湁灞炴�э紙淇濈暀鍏朵粬灞炴�э級
+ try (FileInputStream input = new FileInputStream("device.properties")) {
+ properties.load(input);
+ } catch (IOException e) {
+ // 濡傛灉鏂囦欢涓嶅瓨鍦紝缁х画鍒涘缓鏂版枃浠�
+ }
+
+ // 璁剧疆鎵�鏈夎澶囧睘鎬�
+ if (mowerName != null) properties.setProperty("mowerName", mowerName);
+ if (mowerModel != null) properties.setProperty("mowerModel", mowerModel);
+ if (mowerNumber != null) properties.setProperty("mowerNumber", mowerNumber);
+ if (mowingWidth != null) properties.setProperty("mowingWidth", mowingWidth);
+ if (mowingHeight != null) properties.setProperty("mowingHeight", mowingHeight);
+ if (baseStationNumber != null) properties.setProperty("baseStationNumber", baseStationNumber);
+ if (baseStationCardNumber != null) properties.setProperty("baseStationCardNumber", baseStationCardNumber);
+ if (baseStationCoordinates != null) properties.setProperty("baseStationCoordinates", baseStationCoordinates);
+ if (deviceCardnumber != null) properties.setProperty("deviceCardnumber", deviceCardnumber);
+ if (createTime != null) properties.setProperty("createTime", createTime);
+ if (GupdateTime != null) properties.setProperty("GupdateTime", GupdateTime);
+ if (BupdateTime != null) properties.setProperty("BupdateTime", BupdateTime);
+ if (realtimeLatitude != null) properties.setProperty("realtimeLatitude", realtimeLatitude);
+ if (realtimeLongitude != null) properties.setProperty("realtimeLongitude", realtimeLongitude);
+ if (realtimeAltitude != null) properties.setProperty("realtimeAltitude", realtimeAltitude);
+ if (realtimeX != null) properties.setProperty("realtimeX", realtimeX);
+ if (realtimeY != null) properties.setProperty("realtimeY", realtimeY);
+ if (realtimeSpeed != null) properties.setProperty("realtimeSpeed", realtimeSpeed);
+ if (heading != null) properties.setProperty("heading", heading);
+ if (pitch != null) properties.setProperty("pitch", pitch);
+ if (roll != null) properties.setProperty("roll", roll);
+ if (yaw != null) properties.setProperty("yaw", yaw);
+ if (battery_level != null) properties.setProperty("battery_level", battery_level);
+ if (battery_voltage != null) properties.setProperty("battery_voltage", battery_voltage);
+ if (operation_mode != null) properties.setProperty("operation_mode", operation_mode);
+ if (motor_status != null) properties.setProperty("motor_status", motor_status);
+ if (blade_status != null) properties.setProperty("blade_status", blade_status);
+ if (path_id_saved != null) properties.setProperty("path_id_saved", path_id_saved);
+ if (error_code != null) properties.setProperty("error_code", error_code);
+ if (error_message != null) properties.setProperty("error_message", error_message);
+
+ if (positioningStatus != null) properties.setProperty("positioningStatus", positioningStatus);
+ if (satelliteCount != null) properties.setProperty("satelliteCount", satelliteCount);
+ if (differentialAge != null) properties.setProperty("differentialAge", differentialAge);
+ if (self_check_status != null) properties.setProperty("self_check_status", self_check_status);
+ if (mowerStartStatus != null) properties.setProperty("mowerStartStatus", mowerStartStatus);
+ if (mowerLightStatus != null) properties.setProperty("mowerLightStatus", mowerLightStatus);
+ if (blade_height != null) properties.setProperty("blade_height", blade_height);
+ if (mowerWidth != null) properties.setProperty("mowerWidth", mowerWidth);
+ if (mowerLength != null) properties.setProperty("mowerLength", mowerLength);
+ if (mowingSafetyDistance != null) properties.setProperty("mowingSafetyDistance", mowingSafetyDistance);
+
+ // 淇濆瓨鍒版枃浠�
+ try (FileOutputStream output = new FileOutputStream("device.properties");
+ OutputStreamWriter writer = new OutputStreamWriter(output, StandardCharsets.UTF_8)) {
+ properties.store(writer, "Updated device properties");
+ } catch (IOException ex) {
+ System.err.println("鏃犳硶淇濆瓨 device.properties: " + ex.getMessage());
+ }
+ }
+
private void loadPropertiesInto(Device target, Properties properties) {
if (target == null) {
return;
@@ -127,10 +219,27 @@
target.realtimeSpeed = properties.getProperty("realtimeSpeed", "-1");
target.heading = properties.getProperty("heading", "-1");
target.pitch = properties.getProperty("pitch", "-1");
- target.battery = properties.getProperty("battery", "-1");
+ target.roll = properties.getProperty("roll", "-1");
+ target.yaw = properties.getProperty("yaw", "-1");
+ target.battery_level = properties.getProperty("battery_level", "-1");
+ target.battery_voltage = properties.getProperty("battery_voltage", "-1");
+ target.operation_mode = properties.getProperty("operation_mode", "-1");
+ target.motor_status = properties.getProperty("motor_status", "-1");
+ target.blade_status = properties.getProperty("blade_status", "-1");
+ target.path_id_saved = properties.getProperty("path_id_saved", "-1");
+ target.error_code = properties.getProperty("error_code", "-1");
+ target.error_message = properties.getProperty("error_message", "-1");
+
target.positioningStatus = properties.getProperty("positioningStatus", "-1");
target.satelliteCount = properties.getProperty("satelliteCount", "-1");
target.differentialAge = properties.getProperty("differentialAge", "-1");
+ target.self_check_status = properties.getProperty("self_check_status", "-1");
+ target.mowerStartStatus = properties.getProperty("mowerStartStatus", "-1");
+ target.mowerLightStatus = properties.getProperty("mowerLightStatus", "-1");
+ target.blade_height = properties.getProperty("blade_height", "-1");
+ target.mowerWidth = properties.getProperty("mowerWidth", "-1");
+ target.mowerLength = properties.getProperty("mowerLength", "-1");
+ target.mowingSafetyDistance = properties.getProperty("mowingSafetyDistance", "-1");
}
private void applyDefaults(Device target) {
@@ -158,10 +267,27 @@
target.realtimeSpeed = "-1";
target.heading = "-1";
target.pitch = "-1";
- target.battery = "-1";
+ target.roll = "-1";
+ target.yaw = "-1";
+ target.battery_level = "-1";
+ target.battery_voltage = "-1";
+ target.operation_mode = "-1";
+ target.motor_status = "-1";
+ target.blade_status = "-1";
+ target.path_id_saved = "-1";
+ target.error_code = "-1";
+ target.error_message = "-1";
+
target.positioningStatus = "-1";
target.satelliteCount = "-1";
target.differentialAge = "-1";
+ target.self_check_status = "-1";
+ target.mowerStartStatus = "-1";
+ target.mowerLightStatus = "-1";
+ target.blade_height = "-1";
+ target.mowerWidth = "-1";
+ target.mowerLength = "-1";
+ target.mowingSafetyDistance = "-1";
}
public static synchronized Device initializeActiveDevice(String mowerId) { // 鏍规嵁璁惧ID鍒濆鍖栨椿璺冭澶�
@@ -248,8 +374,35 @@
case "pitch":
this.pitch = value;
return true;
- case "battery":
- this.battery = value;
+ case "roll":
+ this.roll = value;
+ return true;
+ case "yaw":
+ this.yaw = value;
+ return true;
+ case "battery_level":
+ this.battery_level = value;
+ return true;
+ case "battery_voltage":
+ this.battery_voltage = value;
+ return true;
+ case "operation_mode":
+ this.operation_mode = value;
+ return true;
+ case "motor_status":
+ this.motor_status = value;
+ return true;
+ case "blade_status":
+ this.blade_status = value;
+ return true;
+ case "path_id_saved":
+ this.path_id_saved = value;
+ return true;
+ case "error_code":
+ this.error_code = value;
+ return true;
+ case "error_message":
+ this.error_message = value;
return true;
case "positioningStatus":
this.positioningStatus = value;
@@ -260,6 +413,27 @@
case "differentialAge":
this.differentialAge = value;
return true;
+ case "self_check_status":
+ this.self_check_status = value;
+ return true;
+ case "mowerStartStatus":
+ this.mowerStartStatus = value;
+ return true;
+ case "mowerLightStatus":
+ this.mowerLightStatus = value;
+ return true;
+ case "blade_height":
+ this.blade_height = value;
+ return true;
+ case "mowerWidth":
+ this.mowerWidth = value;
+ return true;
+ case "mowerLength":
+ this.mowerLength = value;
+ return true;
+ case "mowingSafetyDistance":
+ this.mowingSafetyDistance = value;
+ return true;
default:
System.err.println("鏈煡瀛楁: " + fieldName);
return false;
@@ -274,6 +448,14 @@
device.applyGNGGAUpdate(gnggaData, deviceId);
}
+ public static synchronized void updateFromSerialGNGGA(String gnggaData) { // 涓插彛鏁版嵁鏇存柊璺緞锛堟棤闇�璁惧缂栧彿鍖归厤锛�
+ Device device = gecaoji;
+ if (device == null) {
+ return;
+ }
+ device.chuankouGNGGAUpdate(gnggaData);
+ }
+
private void applyGNGGAUpdate(String gnggaData, String deviceId) { // 鎵цGNGGA鏇存柊閫昏緫
if (gnggaData == null) {
return;
@@ -301,48 +483,167 @@
mowerNumber = incomingDeviceId;
}
+ // 妫�鏌ユ槸鍚︽鍦ㄥ鑸瑙堟ā寮�
+ boolean isNavigating = checkIfNavigating();
+
String latitudeValue = sanitizeField(fields, 2);
String latitudeHemisphere = sanitizeField(fields, 3);
String longitudeValue = sanitizeField(fields, 4);
String longitudeHemisphere = sanitizeField(fields, 5);
- realtimeLatitude = defaultIfEmpty(combineCoordinate(latitudeValue, latitudeHemisphere));
- realtimeLongitude = defaultIfEmpty(combineCoordinate(longitudeValue, longitudeHemisphere));
- realtimeAltitude = defaultIfEmpty(sanitizeField(fields, 9));
+ // 鍙湁鍦ㄩ潪瀵艰埅棰勮妯″紡涓嬫墠鏇存柊浣嶇疆鐩稿叧鏁版嵁
+ if (!isNavigating) {
+ String combinedLatitude = combineCoordinate(latitudeValue, latitudeHemisphere);
+ if (hasMeaningfulValue(combinedLatitude)) {
+ realtimeLatitude = combinedLatitude;
+ }
+ String combinedLongitude = combineCoordinate(longitudeValue, longitudeHemisphere);
+ if (hasMeaningfulValue(combinedLongitude)) {
+ realtimeLongitude = combinedLongitude;
+ }
+ String altitudeValue = sanitizeField(fields, 9);
+ if (hasMeaningfulValue(altitudeValue)) {
+ realtimeAltitude = altitudeValue;
+ }
+
+ // 鏇存柊浣嶇疆鍧愭爣
+ updateRelativeCoordinates(latitudeValue, latitudeHemisphere, longitudeValue, longitudeHemisphere);
+
+ // 鏇存柊鑸悜瑙掞紙浣嶇疆鐩稿叧锛�
+ heading = defaultIfEmpty(sanitizeField(fields, 19));
+ }
+
+ // 鍏朵粬鏁版嵁锛堢數閲忋�佸崼鏄熸暟绛夛級濮嬬粓鏇存柊
positioningStatus = defaultIfEmpty(sanitizeField(fields, 6));
+ // 鍚屾鍒扮粯鍒舵ā鍧楃殑鏁版嵁婧愶紝淇濊瘉寰�杩旂粯鍒跺畾鏃跺櫒鑳借瘑鍒畾浣嶈川閲�
+ try {
+ MowerLocationData.updateProperty("positioningQuality", positioningStatus);
+ } catch (Throwable ignored) {
+ // 闃插尽寮忥細鍗充娇鏇存柊澶辫触涔熶笉褰卞搷璁惧鏁版嵁澶勭悊
+ }
satelliteCount = defaultIfEmpty(sanitizeField(fields, 7));
differentialAge = defaultIfEmpty(sanitizeField(fields, 13));
- battery = defaultIfEmpty(sanitizeField(fields, 16));
+ battery_level = defaultIfEmpty(sanitizeField(fields, 16));
pitch = defaultIfEmpty(sanitizeField(fields, 17));
realtimeSpeed = defaultIfEmpty(sanitizeField(fields, 18));
- heading = defaultIfEmpty(sanitizeField(fields, 19));
GupdateTime = String.valueOf(System.currentTimeMillis());
+ }
+
+ /**涓插彛鏇存柊GNGGA鏁版嵁*/
+ private void chuankouGNGGAUpdate(String gnggaData) { // 鎵цGNGGA鏇存柊閫昏緫
+ if (gnggaData == null) {
+ return;
+ }
- updateRelativeCoordinates(latitudeValue, latitudeHemisphere, longitudeValue, longitudeHemisphere);
+ String trimmed = gnggaData.trim();
+ if (trimmed.isEmpty() || !trimmed.startsWith("$GNGGA")) {
+ return;
+ }
+
+ String[] fields = trimmed.split(",");
+ if (fields.length < 15) {
+ System.err.println("GNGGA瀛楁鏁伴噺涓嶈冻: " + fields.length);
+ return;
+ }
+
+ // 妫�鏌ユ槸鍚︽鍦ㄥ鑸瑙堟ā寮�
+ boolean isNavigating = checkIfNavigating();
+
+ String latitudeValue = sanitizeField(fields, 2);
+ String latitudeHemisphere = sanitizeField(fields, 3);
+ String longitudeValue = sanitizeField(fields, 4);
+ String longitudeHemisphere = sanitizeField(fields, 5);
+
+ // 鍙湁鍦ㄩ潪瀵艰埅棰勮妯″紡涓嬫墠鏇存柊浣嶇疆鐩稿叧鏁版嵁
+ if (!isNavigating) {
+ String combinedLatitude = combineCoordinate(latitudeValue, latitudeHemisphere);
+ if (hasMeaningfulValue(combinedLatitude)) {
+ realtimeLatitude = combinedLatitude;
+ }
+ String combinedLongitude = combineCoordinate(longitudeValue, longitudeHemisphere);
+ if (hasMeaningfulValue(combinedLongitude)) {
+ realtimeLongitude = combinedLongitude;
+ }
+
+ String altitudeValue = sanitizeField(fields, 9);
+ if (hasMeaningfulValue(altitudeValue)) {
+ realtimeAltitude = altitudeValue;
+ }
+
+ // 鏇存柊浣嶇疆鍧愭爣
+ updateRelativeCoordinates(latitudeValue, latitudeHemisphere, longitudeValue, longitudeHemisphere);
+
+ // 涓插彛鏀跺埌GNGGA鏁版嵁鍚庯紝瑙﹀彂鎷栧熬鏇存柊
+ notifyMowerTrailUpdate();
+ }
+
+ // 鍏朵粬鏁版嵁锛堢數閲忋�佸崼鏄熸暟绛夛級濮嬬粓鏇存柊
+ positioningStatus = defaultIfEmpty(sanitizeField(fields, 6));
+ // 鍚屾鍒扮粯鍒舵ā鍧楃殑鏁版嵁婧愶紝淇濊瘉寰�杩旂粯鍒跺畾鏃跺櫒鑳借瘑鍒畾浣嶈川閲�
+ try {
+ MowerLocationData.updateProperty("positioningQuality", positioningStatus);
+ } catch (Throwable ignored) {
+ // 闃插尽寮忥細鍗充娇鏇存柊澶辫触涔熶笉褰卞搷璁惧鏁版嵁澶勭悊
+ }
+ satelliteCount = defaultIfEmpty(sanitizeField(fields, 7));
+ differentialAge = defaultIfEmpty(sanitizeField(fields, 13));
+ realtimeSpeed ="0";
+ GupdateTime = String.valueOf(System.currentTimeMillis());
+ }
+
+ /**
+ * 閫氱煡鍦板浘娓叉煋鍣ㄦ洿鏂板壊鑽夋満鎷栧熬
+ * 褰撲覆鍙f敹鍒癎NGGA鏁版嵁骞舵洿鏂颁綅缃悗璋冪敤
+ */
+ /**
+ * 妫�鏌ユ槸鍚︽鍦ㄥ鑸瑙堟ā寮�
+ * @return 濡傛灉姝e湪瀵艰埅棰勮杩斿洖true锛屽惁鍒欒繑鍥瀎alse
+ */
+ private boolean checkIfNavigating() {
+ try {
+ dikuai.daohangyulan nav = dikuai.daohangyulan.getInstance();
+ if (nav != null) {
+ return nav.isNavigating();
+ }
+ } catch (Exception e) {
+ // 濡傛灉鑾峰彇瀵艰埅瀹炰緥澶辫触锛岃繑鍥瀎alse锛堜笉褰卞搷涓昏鍔熻兘锛�
+ }
+ return false;
+ }
+
+ private void notifyMowerTrailUpdate() {
+ try {
+ // 閫氳繃Shouye.getInstance()鑾峰彇瀹炰緥锛岄伩鍏嶅惊鐜緷璧�
+ zhuye.Shouye shouye = zhuye.Shouye.getInstance();
+ if (shouye != null) {
+ zhuye.MapRenderer mapRenderer = shouye.getMapRenderer();
+ if (mapRenderer != null) {
+ // 璋冪敤鏇存柊鎷栧熬鏂规硶
+ mapRenderer.forceUpdateIdleMowerTrail();
+ }
+ }
+ } catch (Exception e) {
+ // 濡傛灉璋冪敤澶辫触锛岄潤榛樺鐞嗭紙涓嶅奖鍝嶄富瑕佸姛鑳斤級
+ // System.err.println("閫氱煡鎷栧熬鏇存柊澶辫触: " + e.getMessage());
+ }
}
private void updateRelativeCoordinates(String latValue, String latHemisphere,
String lonValue, String lonHemisphere) { // 璁$畻鐩稿鍧愭爣
if (!hasMeaningfulValue(latValue) || !hasMeaningfulValue(lonValue)
|| !hasMeaningfulValue(latHemisphere) || !hasMeaningfulValue(lonHemisphere)) {
- realtimeX = "-1";
- realtimeY = "-1";
return;
}
double mowerLat = toDecimalDegrees(latValue, latHemisphere);
double mowerLon = toDecimalDegrees(lonValue, lonHemisphere);
if (Double.isNaN(mowerLat) || Double.isNaN(mowerLon)) {
- realtimeX = "-1";
- realtimeY = "-1";
return;
}
double[] baseLatLon = resolveBaseStationLatLon();
if (baseLatLon == null) {
- realtimeX = "-1";
- realtimeY = "-1";
return;
}
@@ -354,8 +655,13 @@
double eastMeters = deltaLonDeg * metersPerLon;
double northMeters = deltaLatDeg * METERS_PER_DEGREE_LAT;
- realtimeX = formatMeters(eastMeters);
- realtimeY = formatMeters(northMeters);
+ if (Double.isFinite(eastMeters) && Double.isFinite(northMeters)) {
+ realtimeX = formatMeters(eastMeters);
+ realtimeY = formatMeters(northMeters);
+
+ // 淇濆瓨鍧愭爣鍒板伐鍏风被
+ lujing.SavaXyZuobiao.addCoordinate(eastMeters, northMeters);
+ }
}
private double[] resolveBaseStationLatLon() { // 瑙f瀽鍩虹珯缁忕含搴�
@@ -604,12 +910,84 @@
this.pitch = pitch;
}
- public String getBattery() { // 鑾峰彇瀹炴椂鐢甸噺
- return battery;
+ public String getRoll() {
+ return roll;
}
- public void setBattery(String battery) { // 璁剧疆瀹炴椂鐢甸噺
- this.battery = battery;
+ public void setRoll(String roll) {
+ this.roll = roll;
+ }
+
+ public String getYaw() {
+ return yaw;
+ }
+
+ public void setYaw(String yaw) {
+ this.yaw = yaw;
+ }
+
+ public String getBattery_level() {
+ return battery_level;
+ }
+
+ public void setBattery_level(String battery_level) {
+ this.battery_level = battery_level;
+ }
+
+ public String getBattery_voltage() {
+ return battery_voltage;
+ }
+
+ public void setBattery_voltage(String battery_voltage) {
+ this.battery_voltage = battery_voltage;
+ }
+
+ public String getOperation_mode() {
+ return operation_mode;
+ }
+
+ public void setOperation_mode(String operation_mode) {
+ this.operation_mode = operation_mode;
+ }
+
+ public String getMotor_status() {
+ return motor_status;
+ }
+
+ public void setMotor_status(String motor_status) {
+ this.motor_status = motor_status;
+ }
+
+ public String getBlade_status() {
+ return blade_status;
+ }
+
+ public void setBlade_status(String blade_status) {
+ this.blade_status = blade_status;
+ }
+
+ public String getPath_id_saved() {
+ return path_id_saved;
+ }
+
+ public void setPath_id_saved(String path_id_saved) {
+ this.path_id_saved = path_id_saved;
+ }
+
+ public String getError_code() {
+ return error_code;
+ }
+
+ public void setError_code(String error_code) {
+ this.error_code = error_code;
+ }
+
+ public String getError_message() {
+ return error_message;
+ }
+
+ public void setError_message(String error_message) {
+ this.error_message = error_message;
}
public String getPositioningStatus() { // 鑾峰彇瀹氫綅鐘舵��
@@ -636,6 +1014,62 @@
this.differentialAge = differentialAge;
}
+ public String getSelf_check_status() { // 鑾峰彇鑷鐘舵��
+ return self_check_status;
+ }
+
+ public void setSelf_check_status(String self_check_status) { // 璁剧疆鑷鐘舵��
+ this.self_check_status = self_check_status;
+ }
+
+ public String getMowerStartStatus() { // 鑾峰彇鍓茶崏鏈哄惎鍔ㄧ姸鎬�
+ return mowerStartStatus;
+ }
+
+ public void setMowerStartStatus(String mowerStartStatus) { // 璁剧疆鍓茶崏鏈哄惎鍔ㄧ姸鎬�
+ this.mowerStartStatus = mowerStartStatus;
+ }
+
+ public String getMowerLightStatus() { // 鑾峰彇鍓茶崏鏈虹伅寮�鍏崇姸鎬�
+ return mowerLightStatus;
+ }
+
+ public void setMowerLightStatus(String mowerLightStatus) { // 璁剧疆鍓茶崏鏈虹伅寮�鍏崇姸鎬�
+ this.mowerLightStatus = mowerLightStatus;
+ }
+
+ public String getBlade_height() { // 鑾峰彇鍓茶崏鏈哄垁鐩橀珮搴�
+ return blade_height;
+ }
+
+ public void setBlade_height(String blade_height) { // 璁剧疆鍓茶崏鏈哄垁鐩橀珮搴�
+ this.blade_height = blade_height;
+ }
+
+ public String getMowerWidth() { // 鑾峰彇鍓茶崏鏈哄搴�
+ return mowerWidth;
+ }
+
+ public void setMowerWidth(String mowerWidth) { // 璁剧疆鍓茶崏鏈哄搴�
+ this.mowerWidth = mowerWidth;
+ }
+
+ public String getMowerLength() { // 鑾峰彇鍓茶崏鏈洪暱搴�
+ return mowerLength;
+ }
+
+ public void setMowerLength(String mowerLength) { // 璁剧疆鍓茶崏鏈洪暱搴�
+ this.mowerLength = mowerLength;
+ }
+
+ public String getMowingSafetyDistance() { // 鑾峰彇鍓茶崏瀹夊叏璺濈
+ return mowingSafetyDistance;
+ }
+
+ public void setMowingSafetyDistance(String mowingSafetyDistance) { // 璁剧疆鍓茶崏瀹夊叏璺濈
+ this.mowingSafetyDistance = mowingSafetyDistance;
+ }
+
@Override
public String toString() { // 杈撳嚭瀵硅薄淇℃伅
return "Device{" +
@@ -659,10 +1093,26 @@
", realtimeSpeed='" + realtimeSpeed + '\'' +
", heading='" + heading + '\'' +
", pitch='" + pitch + '\'' +
- ", battery='" + battery + '\'' +
+ ", roll='" + roll + '\'' +
+ ", yaw='" + yaw + '\'' +
+ ", battery_level='" + battery_level + '\'' +
+ ", battery_voltage='" + battery_voltage + '\'' +
+ ", operation_mode='" + operation_mode + '\'' +
+ ", motor_status='" + motor_status + '\'' +
+ ", blade_status='" + blade_status + '\'' +
+ ", path_id_saved='" + path_id_saved + '\'' +
+ ", error_code='" + error_code + '\'' +
+ ", error_message='" + error_message + '\'' +
", positioningStatus='" + positioningStatus + '\'' +
", satelliteCount='" + satelliteCount + '\'' +
", differentialAge='" + differentialAge + '\'' +
+ ", self_check_status='" + self_check_status + '\'' +
+ ", mowerStartStatus='" + mowerStartStatus + '\'' +
+ ", mowerLightStatus='" + mowerLightStatus + '\'' +
+ ", blade_height='" + blade_height + '\'' +
+ ", mowerWidth='" + mowerWidth + '\'' +
+ ", mowerLength='" + mowerLength + '\'' +
+ ", mowingSafetyDistance='" + mowingSafetyDistance + '\'' +
'}';
}
}
\ No newline at end of file
--
Gitblit v1.10.0