826220679@qq.com
17 小时以前 f94b1436d7a28c8e28d010b2cb657ab7c064e353
src/zhuye/Shouye.java
@@ -2249,7 +2249,8 @@
      mowingProgressLabel.setForeground(THEME_COLOR);
      mowerSpeedValueLabel = new JLabel("--");
      mowerSpeedValueLabel.setFont(new Font("微软雅黑", Font.BOLD, 14));
      // 数值大小与单位 km/h 显示大小一致
      mowerSpeedValueLabel.setFont(new Font("微软雅黑", Font.BOLD, 9));
      mowerSpeedValueLabel.setForeground(THEME_COLOR);
      mowerSpeedUnitLabel = new JLabel("km/h");
@@ -2303,10 +2304,21 @@
      String display = "--";
      Device device = Device.getGecaoji();
      if (device != null) {
         String sanitized = sanitizeSpeedValue(device.getRealtimeSpeed());
         // 使用 yaw 值作为速度显示(单位:km/h)
         String sanitized = sanitizeSpeedValue(device.getYaw());
         if (sanitized != null) {
            // yaw为0时显示为"0"
            try {
               double v = Double.parseDouble(sanitized);
               if (Math.abs(v) < 1e-9) {
                  display = "0";
               } else {
            display = sanitized;
         }
            } catch (NumberFormatException ex) {
               display = sanitized;
            }
         }
      }
      mowerSpeedValueLabel.setText(display);
      if (mowerSpeedUnitLabel != null) {