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,6 +922,10 @@
922 922
   // at which point movement will be level to the machine's XY plane.
923 923
   // The height can be set with M420 Z<height>
924 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 929
 #endif
926 930
 
927 931
 #if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR)
@@ -931,8 +935,6 @@
931 935
   #define GRID_MAX_POINTS_X 9
932 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 938
   #define LEFT_PROBE_BED_POSITION -(DELTA_PROBEABLE_RADIUS)
937 939
   #define RIGHT_PROBE_BED_POSITION DELTA_PROBEABLE_RADIUS
938 940
   #define FRONT_PROBE_BED_POSITION -(DELTA_PROBEABLE_RADIUS)

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

@@ -920,6 +920,10 @@
920 920
   // at which point movement will be level to the machine's XY plane.
921 921
   // The height can be set with M420 Z<height>
922 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 927
 #endif
924 928
 
925 929
 #if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR)
@@ -929,8 +933,6 @@
929 933
   #define GRID_MAX_POINTS_X 9
930 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 936
   #define LEFT_PROBE_BED_POSITION -(DELTA_PROBEABLE_RADIUS)
935 937
   #define RIGHT_PROBE_BED_POSITION DELTA_PROBEABLE_RADIUS
936 938
   #define FRONT_PROBE_BED_POSITION -(DELTA_PROBEABLE_RADIUS)

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

@@ -926,6 +926,10 @@
926 926
   // at which point movement will be level to the machine's XY plane.
927 927
   // The height can be set with M420 Z<height>
928 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 933
 #endif
930 934
 
931 935
 #if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR)
@@ -935,8 +939,6 @@
935 939
   #define GRID_MAX_POINTS_X 7
936 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 942
   #define LEFT_PROBE_BED_POSITION -(DELTA_PROBEABLE_RADIUS)
941 943
   #define RIGHT_PROBE_BED_POSITION DELTA_PROBEABLE_RADIUS
942 944
   #define FRONT_PROBE_BED_POSITION -(DELTA_PROBEABLE_RADIUS)

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

@@ -989,6 +989,10 @@
989 989
   // at which point movement will be level to the machine's XY plane.
990 990
   // The height can be set with M420 Z<height>
991 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 996
 #endif
993 997
 
994 998
 #if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR)
@@ -998,8 +1002,6 @@
998 1002
   #define GRID_MAX_POINTS_X 5
999 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 1005
   #define LEFT_PROBE_BED_POSITION -(DELTA_PROBEABLE_RADIUS)
1004 1006
   #define RIGHT_PROBE_BED_POSITION DELTA_PROBEABLE_RADIUS
1005 1007
   #define FRONT_PROBE_BED_POSITION - (DELTA_PROBEABLE_RADIUS - 20)

+ 20
- 9
Marlin/ubl_G29.cpp View File

@@ -135,9 +135,12 @@
135 135
    *                    a subsequent G or T leveling operation for backward compatibility.
136 136
    *
137 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 144
    *                    C (Continue) parameter it does not invalidate the Mesh prior to automatically
142 145
    *                    probing needed locations. This allows you to invalidate portions of the Mesh but still
143 146
    *                    use the automatic probing capabilities of the Unified Bed Leveling System. An X and Y
@@ -254,13 +257,13 @@
254 257
    *                    to reconstruct the current mesh on another machine.
255 258
    *
256 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 262
    *                    This parameter can also specify a Map Type. T0 (the default) is user-readable. T1 can
260 263
    *                    is suitable to paste into a spreadsheet for a 3D graph of the mesh.
261 264
    *
262 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 267
    *                    when the entire bed doesn't need to be probed because it will be adjusted.
265 268
    *
266 269
    *   V #   Verbosity  Set the verbosity level (0-4) for extra details. (Default 0)
@@ -317,11 +320,19 @@
317 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 324
     if (axis_unhomed_error()) {
322
-      if (code_seen('P') && !code_seen('P6') || code_seen('J')) {
325
+      if (code_seen('J')) 
323 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 338
     if (g29_parameter_parsing()) return; // abort if parsing the simple parameters causes a problem,

Loading…
Cancel
Save