Przeglądaj źródła

Allow G29 to work correctly even if nozzle is off the mesh. (#7512)

* work around previous regressions...
Roxy-3D 7 lat temu
rodzic
commit
be5ca34215
1 zmienionych plików z 5 dodań i 8 usunięć
  1. 5
    8
      Marlin/ubl_G29.cpp

+ 5
- 8
Marlin/ubl_G29.cpp Wyświetl plik

1132
       SERIAL_PROTOCOLLNPGM("Both X & Y locations must be specified.\n");
1132
       SERIAL_PROTOCOLLNPGM("Both X & Y locations must be specified.\n");
1133
       err_flag = true;
1133
       err_flag = true;
1134
     }
1134
     }
1135
-    if (!WITHIN(RAW_X_POSITION(g29_x_pos), X_MIN_BED, X_MAX_BED)) {
1136
-      SERIAL_PROTOCOLLNPGM("Invalid X location specified.\n");
1137
-      err_flag = true;
1138
-    }
1139
 
1135
 
1140
-    if (!WITHIN(RAW_Y_POSITION(g29_y_pos), Y_MIN_BED, Y_MAX_BED)) {
1141
-      SERIAL_PROTOCOLLNPGM("Invalid Y location specified.\n");
1142
-      err_flag = true;
1143
-    }
1136
+    if (!WITHIN(RAW_X_POSITION(g29_x_pos), X_MIN_BED, X_MAX_BED))  // if X & Y are not valid, use center of the bed values
1137
+      g29_x_pos = (X_MIN_BED + X_MAX_BED) / 2.0;
1138
+
1139
+    if (!WITHIN(RAW_Y_POSITION(g29_y_pos), Y_MIN_BED, Y_MAX_BED))  // if X & Y are not valid, use center of the bed values
1140
+      g29_y_pos = (Y_MIN_BED + Y_MAX_BED) / 2.0;
1144
 
1141
 
1145
     if (err_flag) return UBL_ERR;
1142
     if (err_flag) return UBL_ERR;
1146
 
1143
 

Ładowanie…
Anuluj
Zapisz