| | |
| | | #Dikuai Properties |
| | | #Tue Dec 09 11:53:37 CST 2025 |
| | | #Fri Dec 12 15:42:15 CST 2025 |
| | | LAND1.angleThreshold=-1 |
| | | LAND1.baseStationCoordinates=3949.90238860,N,11616.75692000,E |
| | | LAND1.boundaryCoordinates=1.31,-9.59;1.86,-11.61;3.12,-12.49;5.50,-12.06;5.95,-10.88;4.97,-3.86;3.16,-0.87;2.79,-2.61;2.42,-4.35;2.05,-6.10;1.68,-7.84;1.31,-9.59 |
| | |
| | | LAND1.landName=1234 |
| | | LAND1.landNumber=LAND1 |
| | | LAND1.mowingPattern=螺旋式 |
| | | LAND1.mowingTrack=-1 |
| | | LAND1.mowingTrack=5.952,-10.672 |
| | | LAND1.mowingWidth=40 |
| | | LAND1.plannedPath=1.88,-7.88;2.62,-4.39;3.25,-1.41;4.78,-3.93;5.74,-10.86;5.35,-11.88;3.17,-12.28;2.03,-11.49;1.52,-9.58;1.88,-7.88;2.27,-7.96;3.01,-4.47;3.43,-2.48;4.39,-4.07;5.33,-10.81;5.06,-11.53;3.26,-11.86;2.38,-11.24;1.93,-9.57;2.27,-7.96;2.66,-8.05;3.40,-4.56;3.61,-3.55;4.01,-4.20;4.92,-10.76;4.77,-11.18;3.35,-11.43;2.73,-11.00;2.34,-9.56;2.66,-8.05;3.05,-8.13;3.71,-4.99;4.51,-10.72;4.47,-10.82;3.44,-11.01;3.08,-10.75;2.75,-9.55;3.05,-8.13;3.44,-8.21;3.63,-7.30;4.08,-10.49;3.54,-10.59;3.43,-10.51;3.16,-9.54;3.44,-8.21 |
| | | LAND1.returnPointCoordinates=-1 |
| | |
| | | #Current work land selection updated |
| | | #Fri Dec 12 15:34:55 CST 2025 |
| | | #Fri Dec 12 17:06:21 CST 2025 |
| | | appVersion=-1 |
| | | currentWorkLandNumber=LAND1 |
| | | cuttingWidth=200 |
| | |
| | | private JButton baseStationIdEditBtn; |
| | | private JButton handheldEditBtn; |
| | | private JButton checkUpdateBtn; |
| | | private JButton systemDebugButton; |
| | | private JButton feedbackButton; |
| | | private JButton idleTrailEditBtn; |
| | | |
| | |
| | | addRowWithSpacing(panel, idleTrailPanel); |
| | | addRowWithSpacing(panel, feedbackPanel); |
| | | addRowWithSpacing(panel, appVersionPanel); |
| | | panel.add(createDebugPanel()); |
| | | |
| | | return panel; |
| | | } |
| | |
| | | return panel; |
| | | } |
| | | |
| | | private JPanel createDebugPanel() { |
| | | JPanel panel = new JPanel(new GridBagLayout()); |
| | | panel.setBackground(PANEL_BACKGROUND); |
| | | panel.setAlignmentX(Component.LEFT_ALIGNMENT); |
| | | panel.setMaximumSize(new Dimension(Integer.MAX_VALUE, ROW_HEIGHT)); |
| | | panel.setPreferredSize(new Dimension(Integer.MAX_VALUE, ROW_HEIGHT)); |
| | | panel.setMinimumSize(new Dimension(0, ROW_HEIGHT)); |
| | | |
| | | GridBagConstraints gbc = new GridBagConstraints(); |
| | | |
| | | JLabel titleLabel = new JLabel("系统调试"); |
| | | titleLabel.setFont(new Font("微软雅黑", Font.BOLD, 14)); |
| | | titleLabel.setForeground(Color.BLACK); |
| | | titleLabel.setHorizontalAlignment(SwingConstants.RIGHT); |
| | | gbc.gridx = 0; |
| | | gbc.gridy = 0; |
| | | gbc.weightx = 0; |
| | | gbc.anchor = GridBagConstraints.EAST; |
| | | gbc.insets = new Insets(0, 0, 0, 12); |
| | | panel.add(titleLabel, gbc); |
| | | |
| | | Color darkerTheme = new Color( |
| | | Math.max(THEME_COLOR.getRed() - 20, 0), |
| | | Math.max(THEME_COLOR.getGreen() - 20, 0), |
| | | Math.max(THEME_COLOR.getBlue() - 20, 0)); |
| | | systemDebugButton = buttonset.createStyledButton("系统调试", darkerTheme); |
| | | systemDebugButton.setFont(new Font("微软雅黑", Font.PLAIN, 12)); |
| | | |
| | | gbc = new GridBagConstraints(); |
| | | gbc.gridx = 1; |
| | | gbc.gridy = 0; |
| | | gbc.weightx = 1.0; |
| | | gbc.anchor = GridBagConstraints.EAST; |
| | | panel.add(systemDebugButton, gbc); |
| | | |
| | | return panel; |
| | | } |
| | | |
| | | private JPanel createFeedbackPanel() { |
| | | JPanel panel = new JPanel(new GridBagLayout()); |
| | | panel.setBackground(PANEL_BACKGROUND); |
| | |
| | | feedbackButton.addActionListener(e -> showFeedbackDialog()); |
| | | } |
| | | |
| | | if (systemDebugButton != null) { |
| | | systemDebugButton.addActionListener(e -> openSystemDebugDialog()); |
| | | } |
| | | |
| | | if (idleTrailEditBtn != null) { |
| | | idleTrailEditBtn.addActionListener(e -> editIdleTrailDuration()); |
| | | } |
| | |
| | | timer.start(); |
| | | } |
| | | |
| | | private void openSystemDebugDialog() { |
| | | debug dialog = new debug(this, THEME_COLOR); |
| | | dialog.setLocationRelativeTo(this); |
| | | dialog.setVisible(true); |
| | | } |
| | | |
| | | @Override |
| | | public void setVisible(boolean visible) { |
| | | if (visible) { |
| | |
| | | import dikuai.addzhangaiwu; |
| | | import gecaoji.Device; |
| | | import set.Sets; |
| | | import set.debug; |
| | | import udpdell.UDPServer; |
| | | import zhangaiwu.AddDikuai; |
| | | import yaokong.Control04; |
| | |
| | | updateStartButtonAppearance(); |
| | | return; |
| | | } |
| | | Control04.sendStartCommandIfDebugSerialOpen(); |
| | | } else { |
| | | statusLabel.setText("暂停中"); |
| | | pauseMowingSession(); |
| | | Control04.sendPauseCommandIfDebugSerialOpen(); |
| | | } |
| | | updateStartButtonAppearance(); |
| | | } |
| | |
| | | statusLabel.setText("已结束"); |
| | | startButtonShowingPause = false; |
| | | stopMowingSession(); |
| | | Control04.sendStopCommandIfDebugSerialOpen(); |
| | | } else { |
| | | statusLabel.setText("待机"); |
| | | startButtonShowingPause = true; |
| | |
| | | if (bluetoothBtn == null) { |
| | | return; |
| | | } |
| | | if (Bluelink.isConnected()) { |
| | | Bluelink.disconnect(); |
| | | bluetoothConnected = false; |
| | | } else { |
| | | boolean success = Bluelink.connect(); |
| | | if (success) { |
| | | bluetoothConnected = true; |
| | | } else { |
| | | bluetoothConnected = false; |
| | | JOptionPane.showMessageDialog(this, "蓝牙连接失败,请重试", "提示", JOptionPane.WARNING_MESSAGE); |
| | | // 弹出系统调试页面 |
| | | showDebugDialog(); |
| | | } |
| | | } |
| | | updateBluetoothButtonIcon(); |
| | | |
| | | private void showDebugDialog() { |
| | | Window parentWindow = SwingUtilities.getWindowAncestor(this); |
| | | debug debugDialog = new debug(parentWindow, THEME_COLOR); |
| | | debugDialog.setLocationRelativeTo(this); // 居中显示在首页 |
| | | debugDialog.setVisible(true); |
| | | } |
| | | |
| | | private void updateBluetoothButtonIcon() { |