解决了手动绘制边界的bug,所有返回按钮采用公用方法创建
| | |
| | | <attribute name="module" value="true"/> |
| | | </attributes> |
| | | </classpathentry> |
| | | <classpathentry kind="lib" path="D:/eclipseworkspace/GIT/GeCaoAPP/lib/jSerialComm-2.10.4.jar"/> |
| | | <classpathentry kind="lib" path="D:/eclipseworkspace/GIT/GeCaoAPP/lib/jts-core-1.19.0.jar"/> |
| | | <classpathentry kind="lib" path="D:/eclipseworkspace/GIT/GeCaoAPP/lib/slf4j-api-1.7.30.jar"/> |
| | | <classpathentry kind="lib" path="D:/eclipseworkspace/GIT/GeCaoAPP/lib/slf4j-simple-1.7.30.jar"/> |
| | | <classpathentry kind="lib" path="E:/Users/hxzk/eclipse-workspace/GeCaoAPP/lib/jSerialComm-2.10.4.jar"/> |
| | | <classpathentry kind="lib" path="E:/Users/hxzk/eclipse-workspace/GeCaoAPP/lib/jts-core-1.19.0.jar"/> |
| | | <classpathentry kind="lib" path="E:/Users/hxzk/eclipse-workspace/GeCaoAPP/lib/slf4j-api-1.7.30.jar"/> |
| | | <classpathentry kind="lib" path="E:/Users/hxzk/eclipse-workspace/GeCaoAPP/lib/slf4j-simple-1.7.30.jar"/> |
| | | <classpathentry kind="output" path="bin"/> |
| | | </classpath> |
| | |
| | | #Dikuai Properties |
| | | #Sun Dec 21 11:15:33 GMT+08:00 2025 |
| | | LAND2.boundaryCoordinates=5.38,-6.41;-11.15,-8.94;-12.75,-4.68;-12.23,-3.28;-11.12,-3.17;-9.29,-3.53;-7.46,-3.89;-5.62,-4.25;-3.79,-4.61;-1.96,-4.97;-0.12,-5.33;1.71,-5.69;3.54,-6.05;5.38,-6.41 |
| | | LAND1.intelligentSceneAnalysis=-1 |
| | | LAND1.mowingSafetyDistance=-1 |
| | | LAND1.landArea=26.75 |
| | | LAND1.returnPointCoordinates=-1 |
| | | LAND1.landNumber=LAND1 |
| | | LAND2.landName=1452 |
| | | LAND2.userId=-1 |
| | | LAND2.intelligentSceneAnalysis=-1 |
| | | LAND2.mowingOverlapDistance=0.06 |
| | | LAND2.landArea=55.11 |
| | | LAND2.returnPathRawCoordinates=38.12,1.53;36.68,1.24;35.24,0.94;33.80,0.59;32.43,0.16;31.15,-0.38;30.26,-1.26;30.03,-2.37;30.12,-3.81;30.34,-5.22;30.59,-6.60;30.87,-7.98;31.10,-9.36;31.33,-10.77;31.57,-12.20;31.82,-13.68;32.07,-15.16;32.28,-16.60;32.52,-17.92;32.78,-19.37;33.07,-20.80;33.35,-22.37;33.62,-23.91;33.89,-25.35;34.16,-26.79;34.23,-28.32;33.75,-29.45;32.72,-30.03;31.41,-30.28;30.15,-30.22;29.26,-29.73;28.93,-28.62;28.72,-27.16;28.54,-25.66;28.26,-24.17;28.01,-22.74 |
| | | LAND1.returnPathCoordinates=-1 |
| | | LAND1.mowingPattern=平行线 |
| | | LAND1.mowingOverlapDistance=0.06 |
| | | LAND2.updateTime=2025-12-21 11\:15\:33 |
| | | LAND1.returnPathRawCoordinates=-1 |
| | | LAND2.createTime=2025-12-20 12\:24\:28 |
| | | LAND1.mowingWidth=34 |
| | | LAND2.returnPathCoordinates=38.12,1.53;33.80,0.59;31.15,-0.38;30.26,-1.26;30.03,-2.37;30.34,-5.22;34.16,-26.79;34.23,-28.32;33.75,-29.45;32.72,-30.03;31.41,-30.28;30.15,-30.22;29.26,-29.73;28.93,-28.62;28.01,-22.74 |
| | | #Mon Dec 22 13:08:01 CST 2025 |
| | | LAND2.angleThreshold=-1 |
| | | LAND2.boundaryPointInterval=-1 |
| | | LAND2.mowingWidth=34 |
| | | LAND1.plannedPath=-5.830841,-2.644443;-12.323966,-4.153883;-12.276978,-4.492026;-6.161845,-3.070456;-6.492848,-3.496470;-12.229991,-4.830169;-12.183003,-5.168312;-6.823852,-3.922484;-7.154855,-4.348497;-12.136016,-5.506455;-12.089028,-5.844598;-7.487144,-4.774810;-7.821079,-5.201505;-12.042040,-6.182741;-11.995053,-6.520885;-8.155014,-5.628200;-8.700347,-6.104039;-11.948065,-6.859028;-11.901077,-7.197171;-10.070186,-6.771548;-11.440025,-7.439057;-11.854090,-7.535314 |
| | | LAND1.updateTime=2025-12-19 19\:44\:17 |
| | | LAND2.mowingSafetyDistance=0.50 |
| | | LAND2.plannedPath=-12.031,-3.808;-10.774,-3.615;-9.790,-3.809;-12.167,-4.172;-12.302,-4.537;-8.807,-4.002;-7.823,-4.196;-12.280,-4.878;-12.158,-5.203;-6.838,-4.389;-5.852,-4.582;-12.036,-5.528;-11.914,-5.854;-4.868,-4.775;-3.884,-4.969;-11.792,-6.179;-11.670,-6.504;-2.901,-5.162;-1.917,-5.355;-11.547,-6.829;-11.425,-7.155;-0.931,-5.548;0.055,-5.741;-11.303,-7.480;-11.181,-7.805;1.038,-5.935;2.022,-6.128;-11.059,-8.130;-10.937,-8.456;3.005,-6.322 |
| | | LAND1.baseStationCoordinates=3949.89151752,N,11616.79267501,E |
| | | LAND2.boundaryOriginalCoordinates=39.831468,116.279941,49.29;39.831465,116.279925,49.33;39.831463,116.279908,49.34;39.831462,116.279891,49.35;39.831461,116.279874,49.33;39.831458,116.279859,49.34;39.831456,116.279843,49.32;39.831454,116.279827,49.32;39.831452,116.279813,49.42;39.831450,116.279798,49.41;39.831448,116.279783,49.36;39.831447,116.279769,49.26;39.831445,116.279757,49.24;39.831445,116.279747,49.38;39.831448,116.279741,49.27;39.831455,116.279736,49.26;39.831463,116.279733,49.26;39.831473,116.279731,49.26;39.831483,116.279729,49.25;39.831491,116.279730,49.26;39.831496,116.279735,49.22;39.831497,116.279748,49.27 |
| | | LAND1.boundaryPointInterval=-1 |
| | | LAND1.createTime=2025-12-19 18\:31\:53 |
| | | LAND2.returnPointCoordinates=-1 |
| | | LAND2.mowingTrack=-1 |
| | | LAND1.userId=-1 |
| | | LAND1.angleThreshold=-1 |
| | | LAND2.mowingBladeWidth=0.40 |
| | | LAND1.landName=21233 |
| | | LAND1.mowingTrack=-1 |
| | | LAND2.baseStationCoordinates=3949.89151752,N,11616.79267501,E |
| | | LAND1.boundaryOriginalCoordinates=39.831445,116.279757,49.24;39.831445,116.279747,49.38;39.831448,116.279741,49.27;39.831455,116.279736,49.26;39.831463,116.279733,49.26;39.831473,116.279731,49.26;39.831483,116.279729,49.25;39.831491,116.279730,49.26;39.831496,116.279735,49.22;39.831497,116.279748,49.27;39.831498,116.279762,49.27;39.831500,116.279776,49.34;39.831502,116.279791,49.32;39.831504,116.279805,49.27;39.831507,116.279820,49.28 |
| | | LAND1.boundaryCoordinates=-10.36,-8.92;-12.10,-7.80;-12.66,-3.77;-4.96,-1.98;-6.04,-3.37;-7.12,-4.76;-8.20,-6.14;-9.28,-7.53;-10.36,-8.92 |
| | | LAND2.mowingPattern=平行线 |
| | | LAND2.boundaryCoordinates=5.38,-6.41;-11.15,-8.94;-12.75,-4.68;-12.23,-3.28;-11.12,-3.17;-9.29,-3.53;-7.46,-3.89;-5.62,-4.25;-3.79,-4.61;-1.96,-4.97;-0.12,-5.33;1.71,-5.69;3.54,-6.05;5.38,-6.41 |
| | | LAND2.boundaryOriginalCoordinates=39.831468,116.279941,49.29;39.831465,116.279925,49.33;39.831463,116.279908,49.34;39.831462,116.279891,49.35;39.831461,116.279874,49.33;39.831458,116.279859,49.34;39.831456,116.279843,49.32;39.831454,116.279827,49.32;39.831452,116.279813,49.42;39.831450,116.279798,49.41;39.831448,116.279783,49.36;39.831447,116.279769,49.26;39.831445,116.279757,49.24;39.831445,116.279747,49.38;39.831448,116.279741,49.27;39.831455,116.279736,49.26;39.831463,116.279733,49.26;39.831473,116.279731,49.26;39.831483,116.279729,49.25;39.831491,116.279730,49.26;39.831496,116.279735,49.22;39.831497,116.279748,49.27 |
| | | LAND2.boundaryPointInterval=-1 |
| | | LAND2.createTime=2025-12-20 12\:24\:28 |
| | | LAND2.intelligentSceneAnalysis=-1 |
| | | LAND2.landArea=55.11 |
| | | LAND2.landName=1452 |
| | | LAND2.landNumber=LAND2 |
| | | LAND1.mowingBladeWidth=0.40 |
| | | LAND2.mowingBladeWidth=0.40 |
| | | LAND2.mowingOverlapDistance=0.06 |
| | | LAND2.mowingPattern=平行线 |
| | | LAND2.mowingSafetyDistance=0.50 |
| | | LAND2.mowingTrack=-1 |
| | | LAND2.mowingWidth=34 |
| | | LAND2.plannedPath=-12.031,-3.808;-10.774,-3.615;-9.790,-3.809;-12.167,-4.172;-12.302,-4.537;-8.807,-4.002;-7.823,-4.196;-12.280,-4.878;-12.158,-5.203;-6.838,-4.389;-5.852,-4.582;-12.036,-5.528;-11.914,-5.854;-4.868,-4.775;-3.884,-4.969;-11.792,-6.179;-11.670,-6.504;-2.901,-5.162;-1.917,-5.355;-11.547,-6.829;-11.425,-7.155;-0.931,-5.548;0.055,-5.741;-11.303,-7.480;-11.181,-7.805;1.038,-5.935;2.022,-6.128;-11.059,-8.130;-10.937,-8.456;3.005,-6.322 |
| | | LAND2.returnPathCoordinates=38.12,1.53;33.80,0.59;31.15,-0.38;30.26,-1.26;30.03,-2.37;30.34,-5.22;34.16,-26.79;34.23,-28.32;33.75,-29.45;32.72,-30.03;31.41,-30.28;30.15,-30.22;29.26,-29.73;28.93,-28.62;28.01,-22.74 |
| | | LAND2.returnPathRawCoordinates=38.12,1.53;36.68,1.24;35.24,0.94;33.80,0.59;32.43,0.16;31.15,-0.38;30.26,-1.26;30.03,-2.37;30.12,-3.81;30.34,-5.22;30.59,-6.60;30.87,-7.98;31.10,-9.36;31.33,-10.77;31.57,-12.20;31.82,-13.68;32.07,-15.16;32.28,-16.60;32.52,-17.92;32.78,-19.37;33.07,-20.80;33.35,-22.37;33.62,-23.91;33.89,-25.35;34.16,-26.79;34.23,-28.32;33.75,-29.45;32.72,-30.03;31.41,-30.28;30.15,-30.22;29.26,-29.73;28.93,-28.62;28.72,-27.16;28.54,-25.66;28.26,-24.17;28.01,-22.74 |
| | | LAND2.returnPointCoordinates=-1 |
| | | LAND2.updateTime=2025-12-21 11\:15\:33 |
| | | LAND2.userId=-1 |
| | |
| | | #Mower Configuration Properties - Updated |
| | | #Sun Dec 21 20:48:14 GMT+08:00 2025 |
| | | #Mon Dec 22 13:47:46 CST 2025 |
| | | appVersion=-1 |
| | | simCardNumber=-1 |
| | | currentWorkLandNumber=LAND2 |
| | | serialBaudRate=115200 |
| | | boundaryLengthVisible=false |
| | | idleTrailDurationSeconds=60 |
| | | handheldMarkerId=1872 |
| | | viewCenterX=-37.40 |
| | | viewCenterY=0.91 |
| | | manualBoundaryDrawingMode=false |
| | | mowerId=860 |
| | | serialPortName=COM15 |
| | | serialAutoConnect=true |
| | | mapScale=11.61 |
| | | measurementModeEnabled=false |
| | | firmwareVersion=-1 |
| | | currentWorkLandNumber=LAND2 |
| | | cuttingWidth=200 |
| | | firmwareVersion=-1 |
| | | handheldMarkerId=1872 |
| | | idleTrailDurationSeconds=60 |
| | | manualBoundaryDrawingMode=false |
| | | mapScale=25.45 |
| | | measurementModeEnabled=false |
| | | mowerId=860 |
| | | serialAutoConnect=true |
| | | serialBaudRate=115200 |
| | | serialPortName=COM15 |
| | | simCardNumber=-1 |
| | | viewCenterX=-27.62 |
| | | viewCenterY=-15.01 |
| | |
| | | #\u624B\u52A8\u7ED8\u5236\u8FB9\u754C\u5750\u6807 - \u683C\u5F0F: x1,y1;x2,y2;...;xn,yn (\u5355\u4F4D:\u7C73,\u7CBE\u786E\u5230\u5C0F\u6570\u70B9\u540E2\u4F4D) |
| | | #Fri Dec 19 19:18:05 CST 2025 |
| | | boundaryCoordinates=-7.66,-10.73;-9.27,-9.14;-5.87,-8.78 |
| | | #Mon Dec 22 13:04:43 CST 2025 |
| | | boundaryCoordinates=35.56,-10.63;28.61,2.02;34.81,9.97;45.73,-6.54;43.75,-13.48 |
| | | email=789 |
| | | language=zh |
| | | lastLoginTime=-1 |
| | | password=123 |
| | | pointCount=3 |
| | | pointCount=5 |
| | | registrationTime=-1 |
| | | status=-1 |
| | | userId=-1 |
| | |
| | | |
| | | // 颜色定义 |
| | | private static final Color MANUAL_BOUNDARY_COLOR = new Color(255, 0, 0); // 红色 |
| | | private static final Color MANUAL_BOUNDARY_LINE_COLOR = new Color(0, 100, 0); // 墨绿色 |
| | | private static final Color MANUAL_BOUNDARY_FILL_COLOR = new Color(255, 0, 0, 50); // 半透明红色填充 |
| | | private static final Color MOUSE_POSITION_COLOR = new Color(255, 0, 0, 128); // 半透明红色(鼠标位置) |
| | | |
| | |
| | | // 绘制边界线(至少需要2个点) |
| | | if (points.size() >= 2) { |
| | | g2d.setStroke(new BasicStroke(strokeWidth, BasicStroke.CAP_ROUND, BasicStroke.JOIN_ROUND)); |
| | | g2d.setColor(MANUAL_BOUNDARY_COLOR); |
| | | g2d.setColor(MANUAL_BOUNDARY_LINE_COLOR); |
| | | |
| | | Path2D.Double borderPath = new Path2D.Double(); |
| | | borderPath.moveTo(points.get(0).x, points.get(0).y); |
| | |
| | | // 即使只有一个点也要绘制 |
| | | if (points.size() >= 1) { |
| | | // 将线条宽度转换为世界坐标的直径,直径是线条宽度的2倍 |
| | | double pointDiameter = (strokeWidth * 2) / scale; |
| | | double pointDiameter = strokeWidth * 2; |
| | | g2d.setColor(MANUAL_BOUNDARY_COLOR); |
| | | for (Point2D.Double point : points) { |
| | | Ellipse2D.Double marker = new Ellipse2D.Double( |
| | |
| | | // 计算线条宽度 |
| | | float strokeWidth = (float) (3 / Math.max(0.5, scale)); |
| | | // 鼠标位置圆圈直径是线条宽度的2倍 |
| | | double mouseCircleDiameter = (strokeWidth * 2) / scale; |
| | | double mouseCircleDiameter = strokeWidth * 2; |
| | | |
| | | // 绘制鼠标位置的圆圈(使用半透明颜色) |
| | | g2d.setColor(MOUSE_POSITION_COLOR); |
| | |
| | | import java.awt.geom.Point2D; |
| | | |
| | | import publicway.Gpstoxuzuobiao; |
| | | import publicway.Fanhuibutton; |
| | | |
| | | /** |
| | | * 首页界面 - 适配6.5寸竖屏,使用独立的MapRenderer进行绘制 |
| | |
| | | private void showSettingsReturnButton() { |
| | | ensureFloatingButtonInfrastructure(); |
| | | if (settingsReturnButton == null) { |
| | | settingsReturnButton = createFloatingTextButton("返回"); |
| | | settingsReturnButton = Fanhuibutton.createReturnButton(null); |
| | | settingsReturnButton.setToolTipText("返回系统设置"); |
| | | settingsReturnButton.addActionListener(e -> { |
| | | // 关闭所有相关模式 |
| | |
| | | remoteBtn.addActionListener(e -> showRemoteControlDialog()); |
| | | areaSelectBtn.addActionListener(e -> { |
| | | // 点击“地块”直接打开地块管理对话框(若需要可传入特定地块编号) |
| | | // Dikuaiguanli.showDikuaiManagement(this, null); |
| | | // 直接进入地块管理界面 |
| | | Dikuaiguanli.showDikuaiManagement(this, null); |
| | | }); |
| | | baseStationBtn.addActionListener(e -> showBaseStationDialog()); |
| | |
| | | enterDrawingControlMode(); |
| | | |
| | | // 隐藏返回设置按钮(如果显示绘制按钮,则不应该显示返回按钮) |
| | | if (settingsReturnButton != null) { |
| | | settingsReturnButton.setVisible(false); |
| | | } |
| | | // if (settingsReturnButton != null) { |
| | | // settingsReturnButton.setVisible(false); |
| | | // } |
| | | |
| | | // 显示"正在绘制边界"提示 |
| | | if (drawingBoundaryLabel != null) { |
| | | // 如果是往返路径绘制,不显示此标签(状态栏已显示"正在绘制往返路径") |
| | | boolean isReturnPathDrawing = returnPathDrawer != null && returnPathDrawer.isActive(); |
| | | drawingBoundaryLabel.setVisible(!isReturnPathDrawing); |
| | | // boolean isReturnPathDrawing = returnPathDrawer != null && returnPathDrawer.isActive(); |
| | | // drawingBoundaryLabel.setVisible(!isReturnPathDrawing); |
| | | drawingBoundaryLabel.setVisible(true); |
| | | } |
| | | |
| | | boolean enableCircleGuidance = drawingShape != null |
| | |
| | | endDrawingButton.setVisible(false); |
| | | } |
| | | if (pathPreviewReturnButton == null) { |
| | | pathPreviewReturnButton = createFloatingTextButton("返回"); |
| | | pathPreviewReturnButton = Fanhuibutton.createReturnButton(e -> handlePathPreviewReturn()); |
| | | pathPreviewReturnButton.setToolTipText("返回新增地块步骤"); |
| | | pathPreviewReturnButton.addActionListener(e -> handlePathPreviewReturn()); |
| | | } |
| | | pathPreviewReturnButton.setVisible(true); |
| | | if (floatingButtonPanel != null) { |