Przeglądaj źródła

Tweak call to `reset_bed_level` in G29

Scott Lahteine 8 lat temu
rodzic
commit
8244fefcc2
1 zmienionych plików z 5 dodań i 0 usunięć
  1. 5
    0
      Marlin/Marlin_main.cpp

+ 5
- 0
Marlin/Marlin_main.cpp Wyświetl plik

@@ -4031,7 +4031,11 @@ inline void gcode_G28() {
4031 4031
           || left_probe_bed_position != bilinear_start[X_AXIS]
4032 4032
           || front_probe_bed_position != bilinear_start[Y_AXIS]
4033 4033
         ) {
4034
+          // Before reset bed level, re-enable to correct the position
4035
+          planner.abl_enabled = abl_should_enable;
4036
+          // Reset grid to 0.0 or "not probed". (Also disables ABL)
4034 4037
           reset_bed_level();
4038
+
4035 4039
           #if ENABLED(ABL_BILINEAR_SUBDIVISION)
4036 4040
             bilinear_grid_spacing_virt[X_AXIS] = xGridSpacing / (BILINEAR_SUBDIVISIONS);
4037 4041
             bilinear_grid_spacing_virt[Y_AXIS] = yGridSpacing / (BILINEAR_SUBDIVISIONS);
@@ -4040,6 +4044,7 @@ inline void gcode_G28() {
4040 4044
           bilinear_grid_spacing[Y_AXIS] = yGridSpacing;
4041 4045
           bilinear_start[X_AXIS] = RAW_X_POSITION(left_probe_bed_position);
4042 4046
           bilinear_start[Y_AXIS] = RAW_Y_POSITION(front_probe_bed_position);
4047
+
4043 4048
           // Can't re-enable (on error) until the new grid is written
4044 4049
           abl_should_enable = false;
4045 4050
         }

Ładowanie…
Anuluj
Zapisz