Browse Source

M48 Fix for Delta Configuration Files & UBL G29 only homes when necessary (#6757)

* Fix M48 for Delta's  There was a scope issue: DELTA_PROBEABLE_RADIUS wasn't getting defined.

* Check if the specified G29 command requires homing
Roxy-3D 8 years ago
parent
commit
8606644343

+ 4
- 2
Marlin/example_configurations/delta/generic/Configuration.h View File

922
   // at which point movement will be level to the machine's XY plane.
922
   // at which point movement will be level to the machine's XY plane.
923
   // The height can be set with M420 Z<height>
923
   // The height can be set with M420 Z<height>
924
   //#define ENABLE_LEVELING_FADE_HEIGHT
924
   //#define ENABLE_LEVELING_FADE_HEIGHT
925
+  
926
+  // Set the boundaries for probing (where the probe can reach).
927
+  #define DELTA_PROBEABLE_RADIUS (DELTA_PRINTABLE_RADIUS - 10)
928
+         
925
 #endif
929
 #endif
926
 
930
 
927
 #if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR)
931
 #if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR)
931
   #define GRID_MAX_POINTS_X 9
935
   #define GRID_MAX_POINTS_X 9
932
   #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
936
   #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
933
 
937
 
934
-  // Set the boundaries for probing (where the probe can reach).
935
-  #define DELTA_PROBEABLE_RADIUS (DELTA_PRINTABLE_RADIUS - 10)
936
   #define LEFT_PROBE_BED_POSITION -(DELTA_PROBEABLE_RADIUS)
938
   #define LEFT_PROBE_BED_POSITION -(DELTA_PROBEABLE_RADIUS)
937
   #define RIGHT_PROBE_BED_POSITION DELTA_PROBEABLE_RADIUS
939
   #define RIGHT_PROBE_BED_POSITION DELTA_PROBEABLE_RADIUS
938
   #define FRONT_PROBE_BED_POSITION -(DELTA_PROBEABLE_RADIUS)
940
   #define FRONT_PROBE_BED_POSITION -(DELTA_PROBEABLE_RADIUS)

+ 4
- 2
Marlin/example_configurations/delta/kossel_mini/Configuration.h View File

920
   // at which point movement will be level to the machine's XY plane.
920
   // at which point movement will be level to the machine's XY plane.
921
   // The height can be set with M420 Z<height>
921
   // The height can be set with M420 Z<height>
922
   //#define ENABLE_LEVELING_FADE_HEIGHT
922
   //#define ENABLE_LEVELING_FADE_HEIGHT
923
+  
924
+  // Set the boundaries for probing (where the probe can reach).
925
+  #define DELTA_PROBEABLE_RADIUS (DELTA_PRINTABLE_RADIUS - 10)
926
+         
923
 #endif
927
 #endif
924
 
928
 
925
 #if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR)
929
 #if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR)
929
   #define GRID_MAX_POINTS_X 9
933
   #define GRID_MAX_POINTS_X 9
930
   #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
934
   #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
931
 
935
 
932
-  // Set the boundaries for probing (where the probe can reach).
933
-  #define DELTA_PROBEABLE_RADIUS (DELTA_PRINTABLE_RADIUS - 10)
934
   #define LEFT_PROBE_BED_POSITION -(DELTA_PROBEABLE_RADIUS)
936
   #define LEFT_PROBE_BED_POSITION -(DELTA_PROBEABLE_RADIUS)
935
   #define RIGHT_PROBE_BED_POSITION DELTA_PROBEABLE_RADIUS
937
   #define RIGHT_PROBE_BED_POSITION DELTA_PROBEABLE_RADIUS
936
   #define FRONT_PROBE_BED_POSITION -(DELTA_PROBEABLE_RADIUS)
938
   #define FRONT_PROBE_BED_POSITION -(DELTA_PROBEABLE_RADIUS)

+ 4
- 2
Marlin/example_configurations/delta/kossel_pro/Configuration.h View File

926
   // at which point movement will be level to the machine's XY plane.
926
   // at which point movement will be level to the machine's XY plane.
927
   // The height can be set with M420 Z<height>
927
   // The height can be set with M420 Z<height>
928
   //#define ENABLE_LEVELING_FADE_HEIGHT
928
   //#define ENABLE_LEVELING_FADE_HEIGHT
929
+  
930
+  // Set the boundaries for probing (where the probe can reach).
931
+  #define DELTA_PROBEABLE_RADIUS (DELTA_PRINTABLE_RADIUS - 10)
932
+         
929
 #endif
933
 #endif
930
 
934
 
931
 #if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR)
935
 #if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR)
935
   #define GRID_MAX_POINTS_X 7
939
   #define GRID_MAX_POINTS_X 7
936
   #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
940
   #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
937
 
941
 
938
-  // Set the boundaries for probing (where the probe can reach).
939
-  #define DELTA_PROBEABLE_RADIUS (DELTA_PRINTABLE_RADIUS - 25)
940
   #define LEFT_PROBE_BED_POSITION -(DELTA_PROBEABLE_RADIUS)
942
   #define LEFT_PROBE_BED_POSITION -(DELTA_PROBEABLE_RADIUS)
941
   #define RIGHT_PROBE_BED_POSITION DELTA_PROBEABLE_RADIUS
943
   #define RIGHT_PROBE_BED_POSITION DELTA_PROBEABLE_RADIUS
942
   #define FRONT_PROBE_BED_POSITION -(DELTA_PROBEABLE_RADIUS)
944
   #define FRONT_PROBE_BED_POSITION -(DELTA_PROBEABLE_RADIUS)

+ 4
- 2
Marlin/example_configurations/delta/kossel_xl/Configuration.h View File

989
   // at which point movement will be level to the machine's XY plane.
989
   // at which point movement will be level to the machine's XY plane.
990
   // The height can be set with M420 Z<height>
990
   // The height can be set with M420 Z<height>
991
   //#define ENABLE_LEVELING_FADE_HEIGHT
991
   //#define ENABLE_LEVELING_FADE_HEIGHT
992
+  
993
+  // Set the boundaries for probing (where the probe can reach).
994
+  #define DELTA_PROBEABLE_RADIUS (DELTA_PRINTABLE_RADIUS - 10)
995
+         
992
 #endif
996
 #endif
993
 
997
 
994
 #if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR)
998
 #if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR)
998
   #define GRID_MAX_POINTS_X 5
1002
   #define GRID_MAX_POINTS_X 5
999
   #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
1003
   #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
1000
 
1004
 
1001
-  // Set the boundaries for probing (where the probe can reach).
1002
-  #define DELTA_PROBEABLE_RADIUS (DELTA_PRINTABLE_RADIUS - 10)
1003
   #define LEFT_PROBE_BED_POSITION -(DELTA_PROBEABLE_RADIUS)
1005
   #define LEFT_PROBE_BED_POSITION -(DELTA_PROBEABLE_RADIUS)
1004
   #define RIGHT_PROBE_BED_POSITION DELTA_PROBEABLE_RADIUS
1006
   #define RIGHT_PROBE_BED_POSITION DELTA_PROBEABLE_RADIUS
1005
   #define FRONT_PROBE_BED_POSITION - (DELTA_PROBEABLE_RADIUS - 20)
1007
   #define FRONT_PROBE_BED_POSITION - (DELTA_PROBEABLE_RADIUS - 20)

+ 20
- 9
Marlin/ubl_G29.cpp View File

135
    *                    a subsequent G or T leveling operation for backward compatibility.
135
    *                    a subsequent G or T leveling operation for backward compatibility.
136
    *
136
    *
137
    *   P1    Phase 1    Invalidate entire Mesh and continue with automatic generation of the Mesh data using
137
    *   P1    Phase 1    Invalidate entire Mesh and continue with automatic generation of the Mesh data using
138
-   *                    the Z-Probe. Depending upon the values of DELTA_PROBEABLE_RADIUS and
139
-   *                    DELTA_PRINTABLE_RADIUS some area of the bed will not have Mesh Data automatically
140
-   *                    generated. This will be handled in Phase 2. If the Phase 1 command is given the
138
+   *                    the Z-Probe. Usually the probe can not reach all areas that the nozzle can reach.
139
+   *                    In Cartesian printers, mesh points within the X_OFFSET_FROM_EXTRUDER and Y_OFFSET_FROM_EXTRUDER
140
+   *                    area can not be automatically probed.  For Delta printers the area in which DELTA_PROBEABLE_RADIUS
141
+   *                    and DELTA_PRINTABLE_RADIUS do not overlap will not be automatically probed.
142
+   *
143
+   *                    These points will be handled in Phase 2 and Phase 3. If the Phase 1 command is given the
141
    *                    C (Continue) parameter it does not invalidate the Mesh prior to automatically
144
    *                    C (Continue) parameter it does not invalidate the Mesh prior to automatically
142
    *                    probing needed locations. This allows you to invalidate portions of the Mesh but still
145
    *                    probing needed locations. This allows you to invalidate portions of the Mesh but still
143
    *                    use the automatic probing capabilities of the Unified Bed Leveling System. An X and Y
146
    *                    use the automatic probing capabilities of the Unified Bed Leveling System. An X and Y
254
    *                    to reconstruct the current mesh on another machine.
257
    *                    to reconstruct the current mesh on another machine.
255
    *
258
    *
256
    *   T     Topology   Display the Mesh Map Topology.
259
    *   T     Topology   Display the Mesh Map Topology.
257
-   *                    'T' can be used alone (e.g., G29 T) or in combination with some of the other commands.
258
-   *                    This option works with all Phase commands (e.g., G29 P4 R 5 X 50 Y100 C -.1 O)
260
+   *                    'T' can be used alone (e.g., G29 T) or in combination with most of the other commands.
261
+   *                    This option works with all Phase commands (e.g., G29 P4 R 5 T X 50 Y100 C -.1 O)
259
    *                    This parameter can also specify a Map Type. T0 (the default) is user-readable. T1 can
262
    *                    This parameter can also specify a Map Type. T0 (the default) is user-readable. T1 can
260
    *                    is suitable to paste into a spreadsheet for a 3D graph of the mesh.
263
    *                    is suitable to paste into a spreadsheet for a 3D graph of the mesh.
261
    *
264
    *
262
    *   U     Unlevel    Perform a probe of the outer perimeter to assist in physically leveling unlevel beds.
265
    *   U     Unlevel    Perform a probe of the outer perimeter to assist in physically leveling unlevel beds.
263
-   *                    Only used for G29 P1 O U. This speeds up the probing of the edge of the bed. Useful
266
+   *                    Only used for G29 P1 T U. This speeds up the probing of the edge of the bed. Useful
264
    *                    when the entire bed doesn't need to be probed because it will be adjusted.
267
    *                    when the entire bed doesn't need to be probed because it will be adjusted.
265
    *
268
    *
266
    *   V #   Verbosity  Set the verbosity level (0-4) for extra details. (Default 0)
269
    *   V #   Verbosity  Set the verbosity level (0-4) for extra details. (Default 0)
317
       return;
320
       return;
318
     }
321
     }
319
 
322
 
320
-    // Don't allow auto-leveling without homing first
323
+    // Check for commands that require the printer to be homed.
321
     if (axis_unhomed_error()) {
324
     if (axis_unhomed_error()) {
322
-      if (code_seen('P') && !code_seen('P6') || code_seen('J')) {
325
+      if (code_seen('J')) 
323
         home_all_axes();
326
         home_all_axes();
324
-      }
327
+      else
328
+        if (code_seen('P')) {
329
+          int p_val;
330
+	  if (code_has_value()) {
331
+            p_val = code_value_int();
332
+	    if ( p_val==1 || p_val==2 || p_val==4 )
333
+              home_all_axes();
334
+	  }
335
+        }
325
     }
336
     }
326
 
337
 
327
     if (g29_parameter_parsing()) return; // abort if parsing the simple parameters causes a problem,
338
     if (g29_parameter_parsing()) return; // abort if parsing the simple parameters causes a problem,

Loading…
Cancel
Save