| set.properties | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| src/Mqttmessage/Client.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| src/Mqttmessage/Entity/GPSData.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| src/Mqttmessage/PushCallback.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| src/denglu/Denglu.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| src/gecaoji/Device.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| src/gecaoji/GecaojiMeg.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| src/gecaoji/gecaojistatus.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| src/publicway/Gpstoxuzuobiao.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| src/set/Setsys.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| src/udpdell/UDPServer.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| src/user/Usrdell.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| src/zhuye/Coordinate.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| src/zhuye/Shouye.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| user.properties | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
set.properties
@@ -1,5 +1,5 @@ #Mower Configuration Properties - Updated #Wed Dec 24 17:17:31 CST 2025 #Current work land selection updated #Wed Dec 24 18:54:38 CST 2025 appVersion=-1 boundaryLengthVisible=false currentWorkLandNumber=LAND1 @@ -8,12 +8,12 @@ handheldMarkerId=1872 idleTrailDurationSeconds=60 manualBoundaryDrawingMode=false mapScale=0.78 mapScale=1.34 measurementModeEnabled=false mowerId=860 mowerId=6258 serialAutoConnect=true serialBaudRate=115200 serialPortName=COM15 simCardNumber=-1 viewCenterX=-148.00 viewCenterY=424.51 viewCenterX=-195.34 viewCenterY=432.68 src/Mqttmessage/Client.java
@@ -4,6 +4,9 @@ import org.eclipse.paho.client.mqttv3.MqttConnectOptions; import org.eclipse.paho.client.mqttv3.MqttException; import set.Setsys; import user.Usrdell; /** * MQTT客æ·ç«¯å·¥å ·ç±» * ç¨äºè¿æ¥MQTTæå¡å¨å¹¶è®¢é ä¸»é¢ @@ -94,12 +97,12 @@ * 示ä¾ç¨æ³ */ public static void test() { public static void lianjiemqqt() { try { String host = "tcp://39.99.43.227:1883"; String deiveID="6258"; String clientId = "hxzkMQTT"; String clientId2 = "hxzkMQTT2"; String deiveID=Setsys.getMowerIdValue(); String clientId =Usrdell.getUserEmail()+"mower"; String clientId2 =Usrdell.getUserEmail()+"response"; String topic = "mower/"+deiveID+"/gps"; String topic2 = "mower/"+deiveID+"/response"; Client mqttClient = new Client(host, topic, clientId); @@ -111,7 +114,7 @@ mqttClient1.subscribe(); // ä¿æç¨åºè¿è¡ //Thread.sleep(Long.MAX_VALUE); // Thread.sleep(Long.MAX_VALUE); } catch (MqttException e) { throw new RuntimeException(e); } src/Mqttmessage/Entity/GPSData.java
@@ -43,6 +43,8 @@ /** @@ -83,6 +85,7 @@ private Integer self_check_status; // èªæ£ç¶æï¼1-宿ï¼0-æªå®æ private Integer error_code; // é误代ç private String error_message; // éè¯¯ä¿¡æ¯ private String path_id_saved; // åå¨çè·¯å¾ID /** * 另忰çæé 彿° @@ -95,10 +98,11 @@ * @param self_check_status èªæ£ç¶æï¼1-宿ï¼0-æªå®æ * @param error_code é误代ç * @param error_message éè¯¯ä¿¡æ¯ * @param path_id_saved åå¨çè·¯å¾ID */ public StatusInfo(Integer battery_level, Double battery_voltage, String operation_mode, String motor_status, String blade_status, Integer blade_height, Integer self_check_status, Integer error_code, String error_message) { Integer self_check_status, Integer error_code, String error_message, String path_id_saved) { this.battery_level = battery_level; this.battery_voltage = battery_voltage; this.operation_mode = operation_mode; @@ -108,7 +112,88 @@ this.self_check_status = self_check_status; this.error_code = error_code; this.error_message = error_message; this.path_id_saved = path_id_saved; } public Integer getBattery_level() { return battery_level; } public void setBattery_level(Integer battery_level) { this.battery_level = battery_level; } public Double getBattery_voltage() { return battery_voltage; } public void setBattery_voltage(Double 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 Integer getBlade_height() { return blade_height; } public void setBlade_height(Integer blade_height) { this.blade_height = blade_height; } public Integer getSelf_check_status() { return self_check_status; } public void setSelf_check_status(Integer self_check_status) { this.self_check_status = self_check_status; } public Integer getError_code() { return error_code; } public void setError_code(Integer 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 getPath_id_saved() { return path_id_saved; } public void setPath_id_saved(String path_id_saved) { this.path_id_saved = path_id_saved; } } /** @@ -133,4 +218,60 @@ private String age; // å·®åGPSæ°æ®æé private String stationId; // å·®ååèåºç«æ å· } public String getMsg_id() { return msg_id; } public void setMsg_id(String msg_id) { this.msg_id = msg_id; } public Long getTimestamp() { return timestamp; } public void setTimestamp(Long timestamp) { this.timestamp = timestamp; } public String getDevice_id() { return device_id; } public void setDevice_id(String device_id) { this.device_id = device_id; } public String getData_type() { return data_type; } public void setData_type(String data_type) { this.data_type = data_type; } public IMUData getImu_data() { return imu_data; } public void setImu_data(IMUData imu_data) { this.imu_data = imu_data; } public StatusInfo getStatus() { return status; } public void setStatus(StatusInfo status) { this.status = status; } public GGAData getGgaData() { return ggaData; } public void setGgaData(GGAData ggaData) { this.ggaData = ggaData; } } src/Mqttmessage/PushCallback.java
@@ -1,15 +1,13 @@ package Mqttmessage; import Mqttmessage.Util.DeviceMessageParser; import gecaoji.gecaojistatus; import Mqttmessage.Entity.GPSData; import Mqttmessage.Entity.GPSData.StatusInfo; import org.eclipse.paho.client.mqttv3.IMqttDeliveryToken; import org.eclipse.paho.client.mqttv3.MqttCallback; import org.eclipse.paho.client.mqttv3.MqttMessage; import udpdell.UDPServer; public class PushCallback implements MqttCallback { @@ -30,6 +28,7 @@ //ResponseData responseData = DeviceMessageParser.parseResponseData(new String(message.getPayload()));//è§£æååºæ°æ® String gpsRaw = gpsData.getGps_raw(); UDPServer.processSerialData(gpsRaw); gecaojistatus.parseStatus(gpsData.getStatus()); } } src/denglu/Denglu.java
@@ -8,6 +8,7 @@ import set.Setsys; import udpdell.UDPServer; import user.Usrdell; import Mqttmessage.Client; import javax.swing.*; import java.awt.*; import java.awt.event.*; @@ -542,6 +543,12 @@ mainFrame.setVisible(true); System.out.println("主åºç¨ç¨åºå·²å¯å¨"); // å¯å¨åè¿æ¥MQTT new Thread(() -> { System.out.println("æ£å¨è¿æ¥MQTTæå¡å¨..."); Client.lianjiemqqt(); }).start(); }); } src/gecaoji/Device.java
@@ -68,21 +68,30 @@ // èªåè§ private String pitch; // ä¿¯ä»°è§ private String battery; // 宿¶çµé private String roll; // 横æ»è§ è§åº¦ private String yaw; // åèªè§ è§åº¦ private String battery_level; // çµæ± çµéç¾åæ¯ private String battery_voltage; // çµæ± çµå private String operation_mode; // æä½æ¨¡å¼ï¼manual, auto, emergency_stop private String motor_status; // çµæºç¶æï¼stopped, running, error private String blade_status; // åçç¶æï¼stopped, rotating private String path_id_saved; // åå¨çè·¯å¾ID private String error_code; // é误代ç private String error_message; // éè¯¯ä¿¡æ¯ private String positioningStatus; // å®ä½ç¶æ private String satelliteCount; // 嫿坿° private String differentialAge; // å·®åæ¶é´ private String selfCheckStatus = "-1"; private String self_check_status = "-1"; // æ°å¢èªæ£ç¶æï¼1-宿ï¼0-æªå®æ // å²èæºèªæ£ç¶æ private String mowerStartStatus = "-1"; // å²èæºå¯å¨ç¶æï¼1å¼å¯ï¼0çç«ï¼-1æªç¥ private String mowerLightStatus = "-1"; // å²èæºç¯å¼å ³ç¶æï¼1å¼å¯ï¼0å ³éï¼-1æªç¥ private String mowerBladeHeight = "-1"; private String blade_height = "-1"; // åçé«åº¦ åç±³ // å²èæºåçé«åº¦ï¼-1æªç¥ private String mowerWidth; // å²èæºå®½åº¦ï¼åä½ç±³ @@ -154,14 +163,24 @@ if (realtimeSpeed != null) properties.setProperty("realtimeSpeed", realtimeSpeed); if (heading != null) properties.setProperty("heading", heading); if (pitch != null) properties.setProperty("pitch", pitch); if (battery != null) properties.setProperty("battery", battery); 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 (selfCheckStatus != null) properties.setProperty("selfCheckStatus", selfCheckStatus); 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 (mowerBladeHeight != null) properties.setProperty("mowerBladeHeight", mowerBladeHeight); 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); @@ -200,14 +219,24 @@ 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.selfCheckStatus = properties.getProperty("selfCheckStatus", "-1"); target.self_check_status = properties.getProperty("self_check_status", "-1"); target.mowerStartStatus = properties.getProperty("mowerStartStatus", "-1"); target.mowerLightStatus = properties.getProperty("mowerLightStatus", "-1"); target.mowerBladeHeight = properties.getProperty("mowerBladeHeight", "-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"); @@ -238,14 +267,24 @@ 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.selfCheckStatus = "-1"; target.self_check_status = "-1"; target.mowerStartStatus = "-1"; target.mowerLightStatus = "-1"; target.mowerBladeHeight = "-1"; target.blade_height = "-1"; target.mowerWidth = "-1"; target.mowerLength = "-1"; target.mowingSafetyDistance = "-1"; @@ -335,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; @@ -347,8 +413,8 @@ case "differentialAge": this.differentialAge = value; return true; case "selfCheckStatus": this.selfCheckStatus = value; case "self_check_status": this.self_check_status = value; return true; case "mowerStartStatus": this.mowerStartStatus = value; @@ -356,8 +422,8 @@ case "mowerLightStatus": this.mowerLightStatus = value; return true; case "mowerBladeHeight": this.mowerBladeHeight = value; case "blade_height": this.blade_height = value; return true; case "mowerWidth": this.mowerWidth = value; @@ -458,7 +524,7 @@ } 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)); GupdateTime = String.valueOf(System.currentTimeMillis()); @@ -844,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() { // è·åå®ä½ç¶æ @@ -876,12 +1014,12 @@ this.differentialAge = differentialAge; } public String getSelfCheckStatus() { // è·åèªæ£ç¶æ return selfCheckStatus; public String getSelf_check_status() { // è·åèªæ£ç¶æ return self_check_status; } public void setSelfCheckStatus(String selfCheckStatus) { // è®¾ç½®èªæ£ç¶æ this.selfCheckStatus = selfCheckStatus; public void setSelf_check_status(String self_check_status) { // è®¾ç½®èªæ£ç¶æ this.self_check_status = self_check_status; } public String getMowerStartStatus() { // è·åå²èæºå¯å¨ç¶æ @@ -900,12 +1038,12 @@ this.mowerLightStatus = mowerLightStatus; } public String getMowerBladeHeight() { // è·åå²èæºåçé«åº¦ return mowerBladeHeight; public String getBlade_height() { // è·åå²èæºåçé«åº¦ return blade_height; } public void setMowerBladeHeight(String mowerBladeHeight) { // 设置å²èæºåçé«åº¦ this.mowerBladeHeight = mowerBladeHeight; public void setBlade_height(String blade_height) { // 设置å²èæºåçé«åº¦ this.blade_height = blade_height; } public String getMowerWidth() { // è·åå²èæºå®½åº¦ @@ -955,14 +1093,23 @@ ", 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 + '\'' + ", selfCheckStatus='" + selfCheckStatus + '\'' + ", self_check_status='" + self_check_status + '\'' + ", mowerStartStatus='" + mowerStartStatus + '\'' + ", mowerLightStatus='" + mowerLightStatus + '\'' + ", mowerBladeHeight='" + mowerBladeHeight + '\'' + ", blade_height='" + blade_height + '\'' + ", mowerWidth='" + mowerWidth + '\'' + ", mowerLength='" + mowerLength + '\'' + ", mowingSafetyDistance='" + mowingSafetyDistance + '\'' + src/gecaoji/GecaojiMeg.java
@@ -27,6 +27,22 @@ private JLabel satelliteCountLabel; private JLabel realtimeSpeedLabel; private JLabel headingLabel; // æ°å¢å±æ§æ ç¾ private JLabel pathIdLabel; private JLabel batteryLevelLabel; private JLabel batteryVoltageLabel; private JLabel operationModeLabel; private JLabel motorStatusLabel; private JLabel bladeStatusLabel; private JLabel bladeHeightLabel; private JLabel selfCheckStatusLabel; private JLabel errorCodeLabel; private JLabel errorMessageLabel; private JLabel rollLabel; private JLabel pitchLabel; private JLabel yawLabel; private JLabel updateTimeLabel; public GecaojiMeg(JPanel anchorPanel, Gecaoji mower) { @@ -197,15 +213,57 @@ headingLabel.setFont(valueFont); grid.add(headingLabel, gbc); // ç¬¬å «è¡ gbc.gridx = 0; gbc.gridy = 7; // æ°å¢å±æ§æ¾ç¤º int currentRow = 7; // åå¨çè·¯å¾ID addLabelRow(grid, gbc, currentRow++, "è·¯å¾IDï¼", pathIdLabel = createValueLabel(), titleFont, valueFont); // çµæ± çµé addLabelRow(grid, gbc, currentRow++, "çµæ± çµéï¼", batteryLevelLabel = createValueLabel(), titleFont, valueFont); // çµæ± çµå addLabelRow(grid, gbc, currentRow++, "çµæ± çµåï¼", batteryVoltageLabel = createValueLabel(), titleFont, valueFont); // æä½æ¨¡å¼ addLabelRow(grid, gbc, currentRow++, "æä½æ¨¡å¼ï¼", operationModeLabel = createValueLabel(), titleFont, valueFont); // çµæºç¶æ addLabelRow(grid, gbc, currentRow++, "çµæºç¶æï¼", motorStatusLabel = createValueLabel(), titleFont, valueFont); // åçç¶æ addLabelRow(grid, gbc, currentRow++, "åçç¶æï¼", bladeStatusLabel = createValueLabel(), titleFont, valueFont); // åçé«åº¦ addLabelRow(grid, gbc, currentRow++, "åçé«åº¦ï¼", bladeHeightLabel = createValueLabel(), titleFont, valueFont); // èªæ£ç¶æ addLabelRow(grid, gbc, currentRow++, "èªæ£ç¶æï¼", selfCheckStatusLabel = createValueLabel(), titleFont, valueFont); // é误代ç addLabelRow(grid, gbc, currentRow++, "é误代ç ï¼", errorCodeLabel = createValueLabel(), titleFont, valueFont); // éè¯¯ä¿¡æ¯ addLabelRow(grid, gbc, currentRow++, "é误信æ¯ï¼", errorMessageLabel = createValueLabel(), titleFont, valueFont); // 横æ»è§ addLabelRow(grid, gbc, currentRow++, "横æ»è§ï¼", rollLabel = createValueLabel(), titleFont, valueFont); // ä¿¯ä»°è§ addLabelRow(grid, gbc, currentRow++, "俯仰è§ï¼", pitchLabel = createValueLabel(), titleFont, valueFont); // åèªè§ addLabelRow(grid, gbc, currentRow++, "åèªè§ï¼", yawLabel = createValueLabel(), titleFont, valueFont); // æ´æ°æ¶é´ gbc.gridx = 0; gbc.gridy = currentRow; gbc.weightx = 0.3; JLabel label8 = new JLabel("æ´æ°æ¶é´ï¼"); label8.setFont(titleFont); label8.setForeground(new Color(102, 102, 102)); grid.add(label8, gbc); gbc.gridx = 1; gbc.gridy = 7; gbc.gridx = 1; gbc.gridy = currentRow; gbc.weightx = 0.7; updateTimeLabel = createValueLabel(); updateTimeLabel.setFont(valueFont); @@ -310,6 +368,21 @@ satelliteCountLabel = null; realtimeSpeedLabel = null; headingLabel = null; pathIdLabel = null; batteryLevelLabel = null; batteryVoltageLabel = null; operationModeLabel = null; motorStatusLabel = null; bladeStatusLabel = null; bladeHeightLabel = null; selfCheckStatusLabel = null; errorCodeLabel = null; errorMessageLabel = null; rollLabel = null; pitchLabel = null; yawLabel = null; updateTimeLabel = null; } @@ -333,6 +406,22 @@ satelliteCountLabel.setText(formatDeviceValue(device.getSatelliteCount())); realtimeSpeedLabel.setText(formatDeviceValue(device.getRealtimeSpeed())); headingLabel.setText(formatDeviceValue(device.getHeading())); // æ´æ°æ°å¢å±æ§ pathIdLabel.setText(formatDeviceValue(device.getPath_id_saved())); batteryLevelLabel.setText(formatDeviceValue(device.getBattery_level())); batteryVoltageLabel.setText(formatDeviceValue(device.getBattery_voltage())); operationModeLabel.setText(formatDeviceValue(device.getOperation_mode())); motorStatusLabel.setText(formatDeviceValue(device.getMotor_status())); bladeStatusLabel.setText(formatDeviceValue(device.getBlade_status())); bladeHeightLabel.setText(formatDeviceValue(device.getBlade_height())); selfCheckStatusLabel.setText(formatDeviceValue(device.getSelf_check_status())); errorCodeLabel.setText(formatDeviceValue(device.getError_code())); errorMessageLabel.setText(formatDeviceValue(device.getError_message())); rollLabel.setText(formatDeviceValue(device.getRoll())); pitchLabel.setText(formatDeviceValue(device.getPitch())); yawLabel.setText(formatDeviceValue(device.getYaw())); updateTimeLabel.setText(formatTimestamp(device.getGupdateTime())); } @@ -344,6 +433,21 @@ if (satelliteCountLabel != null) satelliteCountLabel.setText(value); if (realtimeSpeedLabel != null) realtimeSpeedLabel.setText(value); if (headingLabel != null) headingLabel.setText(value); if (pathIdLabel != null) pathIdLabel.setText(value); if (batteryLevelLabel != null) batteryLevelLabel.setText(value); if (batteryVoltageLabel != null) batteryVoltageLabel.setText(value); if (operationModeLabel != null) operationModeLabel.setText(value); if (motorStatusLabel != null) motorStatusLabel.setText(value); if (bladeStatusLabel != null) bladeStatusLabel.setText(value); if (bladeHeightLabel != null) bladeHeightLabel.setText(value); if (selfCheckStatusLabel != null) selfCheckStatusLabel.setText(value); if (errorCodeLabel != null) errorCodeLabel.setText(value); if (errorMessageLabel != null) errorMessageLabel.setText(value); if (rollLabel != null) rollLabel.setText(value); if (pitchLabel != null) pitchLabel.setText(value); if (yawLabel != null) yawLabel.setText(value); if (updateTimeLabel != null) updateTimeLabel.setText(value); } @@ -406,4 +510,18 @@ return sanitized; } } private void addLabelRow(JPanel grid, GridBagConstraints gbc, int row, String title, JLabel valueLabel, Font titleFont, Font valueFont) { gbc.gridx = 0; gbc.gridy = row; gbc.weightx = 0.3; JLabel label = new JLabel(title); label.setFont(titleFont); label.setForeground(new Color(102, 102, 102)); grid.add(label, gbc); gbc.gridx = 1; gbc.gridy = row; gbc.weightx = 0.7; valueLabel.setFont(valueFont); grid.add(valueLabel, gbc); } } src/gecaoji/gecaojistatus.java
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,68 @@ package gecaoji; import Mqttmessage.Entity.GPSData.StatusInfo; /** * å²èæºç¶æè§£æç±» * ç¨äºè§£ææ¶å°çå²èæºç¶ææ°æ® */ public class gecaojistatus { // "path_id_saved": 15865475, // åå¨çè·¯å¾ID // "battery_level": 85, // çµæ± çµéç¾åæ¯ // "battery_voltage": 24.5, // çµæ± çµå // "operation_mode": "auto", // æä½æ¨¡å¼ï¼manual, auto, emergency_stop // "motor_status": "running", // çµæºç¶æï¼stopped, running, error // "blade_status": "rotating", // åçç¶æï¼stopped, rotating // "blade_height": 10,//åçé«åº¦ åç±³ // "self_check_status": 1, // æ°å¢èªæ£ç¶æï¼1-宿ï¼0-æªå®æ // "error_code": 0, // é误代ç // "error_message": "", // éè¯¯ä¿¡æ¯ /** * è§£æç¶ææ°æ®å符串 * @param status æ¥æ¶å°çç¶æå¯¹è±¡ */ public static void parseStatus(StatusInfo status) { if (status != null) { Device device = Device.getGecaoji(); if (device == null) { return; } if (status.getPath_id_saved() != null) { device.setPath_id_saved(String.valueOf(status.getPath_id_saved())); } if (status.getBattery_level() != null) { device.setBattery_level(String.valueOf(status.getBattery_level())); } if (status.getBattery_voltage() != null) { device.setBattery_voltage(String.valueOf(status.getBattery_voltage())); } if (status.getOperation_mode() != null) { device.setOperation_mode(status.getOperation_mode()); } if (status.getMotor_status() != null) { device.setMotor_status(status.getMotor_status()); } if (status.getBlade_status() != null) { device.setBlade_status(status.getBlade_status()); } if (status.getBlade_height() != null) { device.setBlade_height(String.valueOf(status.getBlade_height())); } if (status.getSelf_check_status() != null) { device.setSelf_check_status(String.valueOf(status.getSelf_check_status())); } if (status.getError_code() != null) { device.setError_code(String.valueOf(status.getError_code())); } if (status.getError_message() != null) { device.setError_message(status.getError_message()); } } } } src/publicway/Gpstoxuzuobiao.java
@@ -33,7 +33,7 @@ * @return double[]{x, y} ç¸å¯¹åæ */ public static double[] processGNGGAToXY(String gnggaData, double baseLat, double baseLon) { if (gnggaData == null || !gnggaData.contains("$GNGGA")) { if (gnggaData == null) { return null; } @@ -41,10 +41,10 @@ // æ ¼å¼: $GNGGA,hhmmss.ss,lat,latDir,lon,lonDir,quality,sats,hdop,alt,units,sep,units,age,refID*cs String[] parts = gnggaData.split(","); // æ¾å°$GNGGAçä½ç½® // æ¾å°$GNGGA/$GPGGA/$GBGGAçä½ç½® int index = -1; for(int i=0; i<parts.length; i++) { if (parts[i].contains("$GNGGA")) { if (parts[i].contains("$GNGGA") || parts[i].contains("$GPGGA") || parts[i].contains("$GBGGA")) { index = i; break; } src/set/Setsys.java
@@ -274,6 +274,14 @@ System.out.println("idleTrailDurationSeconds: " + idleTrailDurationSeconds); } /** * è·åå²èæºç¼å· * @return å²èæºç¼å· */ public static String getMowerIdValue() { return getPropertyValue("mowerId"); } // æ ¹æ®set.propertiesä¸çé®åè·å对åºçå¼ï¼æ²¡ææä¸º-1æ¶è¿ånull public static String getPropertyValue(String key) { if (key == null || key.trim().isEmpty()) { src/udpdell/UDPServer.java
@@ -104,6 +104,7 @@ /** å¤ç䏲壿¥æ¶å°çæ°æ® */ public static void processSerialData(String message) { message=message.replace("GPGGA", "GNGGA"); String[] fields = message.split(","); // æ£æ¥å段æ°éæ¯å¦å®æ´ if (fields.length < 15) { src/user/Usrdell.java
@@ -133,6 +133,14 @@ } /** * è·åç¨æ·é®ç®± * @return ç¨æ·é®ç®± */ public static String getUserEmail() { return getEmail(); } /** * è·åè¯è¨è®¾ç½® * @return è¯è¨è®¾ç½® */ src/zhuye/Coordinate.java
@@ -79,34 +79,24 @@ /** * è§£æGNGGAæ°æ®è¿åCoordinate对象å表ï¼å¢å¼ºçï¼å å«é«ç¨æ°æ®ï¼ * è§£æGNGGA/GPGGA/GBGGAæ°æ®è¿åCoordinate对象å表ï¼å¢å¼ºçï¼å å«é«ç¨æ°æ®ï¼ */ public static void parseGNGGAToCoordinateList(String gnggaData) { if (!isStartSaveGngga || gnggaData == null || gnggaData.isEmpty()) { return; } // å¤ç宿´çGNGGAæ°æ®ï¼å¯è½å å«$GNGGAåç¼ï¼ String cleaned = gnggaData.trim(); if (cleaned.startsWith("$GNGGA")) { // å¦ææ°æ®ä»¥$GNGGAå¼å¤´ï¼ç´æ¥è§£æ String record = cleaned.substring("$GNGGA".length()); // ä½¿ç¨æ£åå岿¯æå¤ç§å¤´é¨ String[] records = cleaned.split("\\$(GN|GP|GB)GGA"); for (String record : records) { if (record == null || record.trim().isEmpty()) { continue; } Coordinate coord = parseSingleGnggaRecord(record, false); if (coord != null) { coordinates.add(coord); } } else { // å¤çå¯è½å å«å¤ä¸ª$GNGGAè®°å½çæ åµ String[] records = cleaned.split("\\$GNGGA"); for (String record : records) { if (record == null || record.trim().isEmpty()) { continue; // è·³è¿ç©ºå符串ï¼split产çç第ä¸ä¸ªå ç´ å¯è½æ¯ç©ºçï¼ } Coordinate coord = parseSingleGnggaRecord(record, false); if (coord != null) { coordinates.add(coord); } } } } @@ -123,9 +113,19 @@ return null; } int markerIndex = cleaned.indexOf("$GNGGA"); int markerIndex = -1; String[] headers = {"$GNGGA", "$GPGGA", "$GBGGA"}; // æ¾å°ææ©åºç°çå¤´é¨ for (String header : headers) { int idx = cleaned.indexOf(header); if (idx >= 0 && (markerIndex == -1 || idx < markerIndex)) { markerIndex = idx; } } String record = markerIndex >= 0 ? cleaned.substring(markerIndex + "$GNGGA".length()) ? cleaned.substring(markerIndex + 6) // ææå¤´é¨é¿åº¦å为6 : cleaned; Coordinate coordinate = parseSingleGnggaRecord(record, true); @@ -168,7 +168,8 @@ return null; } if (fixQuality != 4) { // ä¿®æ¹ä¸ºå 许éRTKåºå®è§£ä¹è½æ¾ç¤ºä½ç½®(åªè¦ä¸æ¯æ æå®ä½0å³å¯) if (fixQuality == 0) { return null; } src/zhuye/Shouye.java
@@ -113,10 +113,13 @@ private final Consumer<String> serialLineListener = line -> { SwingUtilities.invokeLater(() -> { updateDataPacketCountLabel(); // 妿æ¶å°$GNGGAæ°æ®ï¼ç«å³æ´æ°æå°¾ if (line != null && line.trim().startsWith("$GNGGA")) { if (mapRenderer != null && !pathPreviewActive) { mapRenderer.forceUpdateIdleMowerTrail(); // 妿æ¶å°GGAæ°æ®ï¼ç«å³æ´æ°æå°¾ if (line != null) { String trimmed = line.trim(); if (trimmed.startsWith("$GNGGA") || trimmed.startsWith("$GPGGA") || trimmed.startsWith("$GBGGA")) { if (mapRenderer != null && !pathPreviewActive) { mapRenderer.forceUpdateIdleMowerTrail(); } } } }); user.properties
@@ -1,6 +1,6 @@ #Updated User Properties #Wed Dec 24 17:05:38 CST 2025 email=789 email=7892584@qq.com language=zh lastLoginTime=1766567138180 password=123