Browse Source

Fix custom m-code behavior

Don’t set CUSTOM_M_CODE_SET_Z_PROBE_OFFSET if there’s no Z probe
Scott Lahteine 10 years ago
parent
commit
5261d35737

+ 5
- 3
Marlin/Configuration.h View File

@@ -533,9 +533,11 @@ const bool Z_MAX_ENDSTOP_INVERTING = false; // set to true to invert the logic o
533 533
 // Custom M code points
534 534
 #define CUSTOM_M_CODES
535 535
 #ifdef CUSTOM_M_CODES
536
-  #define CUSTOM_M_CODE_SET_Z_PROBE_OFFSET 851
537
-  #define Z_PROBE_OFFSET_RANGE_MIN -15
538
-  #define Z_PROBE_OFFSET_RANGE_MAX -5
536
+  #ifdef ENABLE_AUTO_BED_LEVELING
537
+    #define CUSTOM_M_CODE_SET_Z_PROBE_OFFSET 851
538
+    #define Z_PROBE_OFFSET_RANGE_MIN -15
539
+    #define Z_PROBE_OFFSET_RANGE_MAX -5
540
+  #endif
539 541
 #endif
540 542
 
541 543
 

+ 5
- 3
Marlin/configurator/config/Configuration.h View File

@@ -570,9 +570,11 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
570 570
 // Custom M code points
571 571
 #define CUSTOM_M_CODES
572 572
 #ifdef CUSTOM_M_CODES
573
-  #define CUSTOM_M_CODE_SET_Z_PROBE_OFFSET 851
574
-  #define Z_PROBE_OFFSET_RANGE_MIN -15
575
-  #define Z_PROBE_OFFSET_RANGE_MAX -5
573
+  #ifdef ENABLE_AUTO_BED_LEVELING
574
+    #define CUSTOM_M_CODE_SET_Z_PROBE_OFFSET 851
575
+    #define Z_PROBE_OFFSET_RANGE_MIN -15
576
+    #define Z_PROBE_OFFSET_RANGE_MAX -5
577
+  #endif
576 578
 #endif
577 579
 
578 580
 // @section extras

+ 5
- 3
Marlin/example_configurations/Felix/Configuration.h View File

@@ -512,9 +512,11 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
512 512
 // Custom M code points
513 513
 #define CUSTOM_M_CODES
514 514
 #ifdef CUSTOM_M_CODES
515
-  #define CUSTOM_M_CODE_SET_Z_PROBE_OFFSET 851
516
-  #define Z_PROBE_OFFSET_RANGE_MIN -15
517
-  #define Z_PROBE_OFFSET_RANGE_MAX -5
515
+  #ifdef ENABLE_AUTO_BED_LEVELING
516
+    #define CUSTOM_M_CODE_SET_Z_PROBE_OFFSET 851
517
+    #define Z_PROBE_OFFSET_RANGE_MIN -15
518
+    #define Z_PROBE_OFFSET_RANGE_MAX -5
519
+  #endif
518 520
 #endif
519 521
 
520 522
 

+ 5
- 3
Marlin/example_configurations/Felix/Configuration_DUAL.h View File

@@ -512,9 +512,11 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
512 512
 // Custom M code points
513 513
 #define CUSTOM_M_CODES
514 514
 #ifdef CUSTOM_M_CODES
515
-  #define CUSTOM_M_CODE_SET_Z_PROBE_OFFSET 851
516
-  #define Z_PROBE_OFFSET_RANGE_MIN -15
517
-  #define Z_PROBE_OFFSET_RANGE_MAX -5
515
+  #ifdef ENABLE_AUTO_BED_LEVELING
516
+    #define CUSTOM_M_CODE_SET_Z_PROBE_OFFSET 851
517
+    #define Z_PROBE_OFFSET_RANGE_MIN -15
518
+    #define Z_PROBE_OFFSET_RANGE_MAX -5
519
+  #endif
518 520
 #endif
519 521
 
520 522
 

+ 5
- 3
Marlin/example_configurations/Hephestos/Configuration.h View File

@@ -540,9 +540,11 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
540 540
 // Custom M code points
541 541
 #define CUSTOM_M_CODES
542 542
 #ifdef CUSTOM_M_CODES
543
-  #define CUSTOM_M_CODE_SET_Z_PROBE_OFFSET 851
544
-  #define Z_PROBE_OFFSET_RANGE_MIN -15
545
-  #define Z_PROBE_OFFSET_RANGE_MAX -5
543
+  #ifdef ENABLE_AUTO_BED_LEVELING
544
+    #define CUSTOM_M_CODE_SET_Z_PROBE_OFFSET 851
545
+    #define Z_PROBE_OFFSET_RANGE_MIN -15
546
+    #define Z_PROBE_OFFSET_RANGE_MAX -5
547
+  #endif
546 548
 #endif
547 549
 
548 550
 

+ 5
- 3
Marlin/example_configurations/K8200/Configuration.h View File

@@ -544,9 +544,11 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
544 544
 // Custom M code points
545 545
 #define CUSTOM_M_CODES
546 546
 #ifdef CUSTOM_M_CODES
547
-  #define CUSTOM_M_CODE_SET_Z_PROBE_OFFSET 851
548
-  #define Z_PROBE_OFFSET_RANGE_MIN -15
549
-  #define Z_PROBE_OFFSET_RANGE_MAX -5
547
+  #ifdef ENABLE_AUTO_BED_LEVELING
548
+    #define CUSTOM_M_CODE_SET_Z_PROBE_OFFSET 851
549
+    #define Z_PROBE_OFFSET_RANGE_MIN -15
550
+    #define Z_PROBE_OFFSET_RANGE_MAX -5
551
+  #endif
550 552
 #endif
551 553
 
552 554
 

+ 5
- 3
Marlin/example_configurations/SCARA/Configuration.h View File

@@ -570,9 +570,11 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
570 570
 // Custom M code points
571 571
 //#define CUSTOM_M_CODES
572 572
 #ifdef CUSTOM_M_CODES
573
-  #define CUSTOM_M_CODE_SET_Z_PROBE_OFFSET 851
574
-  #define Z_PROBE_OFFSET_RANGE_MIN -15
575
-  #define Z_PROBE_OFFSET_RANGE_MAX -5
573
+  #ifdef ENABLE_AUTO_BED_LEVELING
574
+    #define CUSTOM_M_CODE_SET_Z_PROBE_OFFSET 851
575
+    #define Z_PROBE_OFFSET_RANGE_MIN -15
576
+    #define Z_PROBE_OFFSET_RANGE_MAX -5
577
+  #endif
576 578
 #endif
577 579
 
578 580
 

+ 5
- 3
Marlin/example_configurations/WITBOX/Configuration.h View File

@@ -537,9 +537,11 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
537 537
 // Custom M code points
538 538
 #define CUSTOM_M_CODES
539 539
 #ifdef CUSTOM_M_CODES
540
-  #define CUSTOM_M_CODE_SET_Z_PROBE_OFFSET 851
541
-  #define Z_PROBE_OFFSET_RANGE_MIN -15
542
-  #define Z_PROBE_OFFSET_RANGE_MAX -5
540
+  #ifdef ENABLE_AUTO_BED_LEVELING
541
+    #define CUSTOM_M_CODE_SET_Z_PROBE_OFFSET 851
542
+    #define Z_PROBE_OFFSET_RANGE_MIN -15
543
+    #define Z_PROBE_OFFSET_RANGE_MAX -5
544
+  #endif
543 545
 #endif
544 546
 
545 547
 

+ 5
- 3
Marlin/example_configurations/delta/generic/Configuration.h View File

@@ -553,9 +553,11 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
553 553
 // Custom M code points
554 554
 #define CUSTOM_M_CODES
555 555
 #ifdef CUSTOM_M_CODES
556
-  #define CUSTOM_M_CODE_SET_Z_PROBE_OFFSET 851
557
-  #define Z_PROBE_OFFSET_RANGE_MIN -15
558
-  #define Z_PROBE_OFFSET_RANGE_MAX -5
556
+  #ifdef ENABLE_AUTO_BED_LEVELING
557
+    #define CUSTOM_M_CODE_SET_Z_PROBE_OFFSET 851
558
+    #define Z_PROBE_OFFSET_RANGE_MIN -15
559
+    #define Z_PROBE_OFFSET_RANGE_MAX -5
560
+  #endif
559 561
 #endif
560 562
 
561 563
 

+ 5
- 3
Marlin/example_configurations/delta/kossel_mini/Configuration.h View File

@@ -555,9 +555,11 @@ const bool Z_MAX_ENDSTOP_INVERTING = false; // set to true to invert the logic o
555 555
 // Custom M code points
556 556
 #define CUSTOM_M_CODES
557 557
 #ifdef CUSTOM_M_CODES
558
-  #define CUSTOM_M_CODE_SET_Z_PROBE_OFFSET 851
559
-  #define Z_PROBE_OFFSET_RANGE_MIN -15
560
-  #define Z_PROBE_OFFSET_RANGE_MAX -5
558
+  #ifdef ENABLE_AUTO_BED_LEVELING
559
+    #define CUSTOM_M_CODE_SET_Z_PROBE_OFFSET 851
560
+    #define Z_PROBE_OFFSET_RANGE_MIN -15
561
+    #define Z_PROBE_OFFSET_RANGE_MAX -5
562
+  #endif
561 563
 #endif
562 564
 
563 565
 

+ 5
- 3
Marlin/example_configurations/makibox/Configuration.h View File

@@ -535,9 +535,11 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
535 535
 // Custom M code points
536 536
 #define CUSTOM_M_CODES
537 537
 #ifdef CUSTOM_M_CODES
538
-  #define CUSTOM_M_CODE_SET_Z_PROBE_OFFSET 851
539
-  #define Z_PROBE_OFFSET_RANGE_MIN -15
540
-  #define Z_PROBE_OFFSET_RANGE_MAX -5
538
+  #ifdef ENABLE_AUTO_BED_LEVELING
539
+    #define CUSTOM_M_CODE_SET_Z_PROBE_OFFSET 851
540
+    #define Z_PROBE_OFFSET_RANGE_MIN -15
541
+    #define Z_PROBE_OFFSET_RANGE_MAX -5
542
+  #endif
541 543
 #endif
542 544
 
543 545
 

+ 5
- 3
Marlin/example_configurations/tvrrug/Round2/Configuration.h View File

@@ -542,9 +542,11 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
542 542
 // Custom M code points
543 543
 #define CUSTOM_M_CODES
544 544
 #ifdef CUSTOM_M_CODES
545
-  #define CUSTOM_M_CODE_SET_Z_PROBE_OFFSET 851
546
-  #define Z_PROBE_OFFSET_RANGE_MIN -15
547
-  #define Z_PROBE_OFFSET_RANGE_MAX -5
545
+  #ifdef ENABLE_AUTO_BED_LEVELING
546
+    #define CUSTOM_M_CODE_SET_Z_PROBE_OFFSET 851
547
+    #define Z_PROBE_OFFSET_RANGE_MIN -15
548
+    #define Z_PROBE_OFFSET_RANGE_MAX -5
549
+  #endif
548 550
 #endif
549 551
 
550 552
 

Loading…
Cancel
Save