Browse Source

Merge pull request #8623 from thinkyhead/bf1_skew_correction

[1.1] Skew Correction
Scott Lahteine 7 years ago
parent
commit
e990fd23f1
No account linked to committer's email address
49 changed files with 2495 additions and 76 deletions
  1. 1
    1
      .travis.yml
  2. 44
    1
      Marlin/Conditionals_post.h
  3. 58
    1
      Marlin/Configuration.h
  4. 70
    0
      Marlin/Marlin_main.cpp
  5. 14
    0
      Marlin/SanityCheck.h
  6. 69
    4
      Marlin/configuration_store.cpp
  7. 58
    1
      Marlin/example_configurations/AlephObjects/TAZ4/Configuration.h
  8. 58
    1
      Marlin/example_configurations/AliExpress/CL-260/Configuration.h
  9. 58
    1
      Marlin/example_configurations/Anet/A6/Configuration.h
  10. 58
    1
      Marlin/example_configurations/Anet/A8/Configuration.h
  11. 58
    1
      Marlin/example_configurations/BQ/Hephestos/Configuration.h
  12. 58
    1
      Marlin/example_configurations/BQ/Hephestos_2/Configuration.h
  13. 58
    1
      Marlin/example_configurations/BQ/WITBOX/Configuration.h
  14. 58
    1
      Marlin/example_configurations/Cartesio/Configuration.h
  15. 58
    1
      Marlin/example_configurations/Creality/CR-10/Configuration.h
  16. 58
    1
      Marlin/example_configurations/Felix/Configuration.h
  17. 58
    1
      Marlin/example_configurations/Felix/DUAL/Configuration.h
  18. 58
    1
      Marlin/example_configurations/FolgerTech/i3-2020/Configuration.h
  19. 58
    1
      Marlin/example_configurations/Geeetech/GT2560/Configuration.h
  20. 58
    1
      Marlin/example_configurations/Geeetech/I3_Pro_X-GT2560/Configuration.h
  21. 58
    1
      Marlin/example_configurations/Infitary/i3-M508/Configuration.h
  22. 58
    1
      Marlin/example_configurations/Malyan/M150/Configuration.h
  23. 58
    1
      Marlin/example_configurations/Micromake/C1/basic/Configuration.h
  24. 58
    1
      Marlin/example_configurations/Micromake/C1/enhanced/Configuration.h
  25. 58
    1
      Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h
  26. 58
    1
      Marlin/example_configurations/RigidBot/Configuration.h
  27. 58
    1
      Marlin/example_configurations/SCARA/Configuration.h
  28. 58
    1
      Marlin/example_configurations/Sanguinololu/Configuration.h
  29. 58
    1
      Marlin/example_configurations/TinyBoy2/Configuration.h
  30. 58
    1
      Marlin/example_configurations/Velleman/K8200/Configuration.h
  31. 58
    1
      Marlin/example_configurations/Velleman/K8400/Configuration.h
  32. 58
    1
      Marlin/example_configurations/Velleman/K8400/Dual-head/Configuration.h
  33. 58
    1
      Marlin/example_configurations/adafruit/ST7565/Configuration.h
  34. 58
    1
      Marlin/example_configurations/delta/FLSUN/auto_calibrate/Configuration.h
  35. 58
    1
      Marlin/example_configurations/delta/FLSUN/kossel_mini/Configuration.h
  36. 58
    1
      Marlin/example_configurations/delta/generic/Configuration.h
  37. 58
    1
      Marlin/example_configurations/delta/kossel_mini/Configuration.h
  38. 58
    1
      Marlin/example_configurations/delta/kossel_pro/Configuration.h
  39. 58
    1
      Marlin/example_configurations/delta/kossel_xl/Configuration.h
  40. 58
    1
      Marlin/example_configurations/gCreate/gMax1.5+/Configuration.h
  41. 58
    1
      Marlin/example_configurations/makibox/Configuration.h
  42. 58
    1
      Marlin/example_configurations/tvrrug/Round2/Configuration.h
  43. 58
    1
      Marlin/example_configurations/wt150/Configuration.h
  44. 3
    0
      Marlin/language.h
  45. 3
    0
      Marlin/language_en.h
  46. 68
    30
      Marlin/planner.cpp
  47. 17
    0
      Marlin/planner.h
  48. 1
    1
      Marlin/temperature.cpp
  49. 1
    1
      Marlin/temperature.h

+ 1
- 1
.travis.yml View File

89
   - opt_enable PIDTEMPBED FIX_MOUNTED_PROBE Z_SAFE_HOMING ARC_P_CIRCLES CNC_WORKSPACE_PLANES CNC_COORDINATE_SYSTEMS
89
   - opt_enable PIDTEMPBED FIX_MOUNTED_PROBE Z_SAFE_HOMING ARC_P_CIRCLES CNC_WORKSPACE_PLANES CNC_COORDINATE_SYSTEMS
90
   - opt_enable REPRAP_DISCOUNT_SMART_CONTROLLER SDSUPPORT EEPROM_SETTINGS
90
   - opt_enable REPRAP_DISCOUNT_SMART_CONTROLLER SDSUPPORT EEPROM_SETTINGS
91
   - opt_enable BLINKM PCA9632 RGB_LED NEOPIXEL_LED
91
   - opt_enable BLINKM PCA9632 RGB_LED NEOPIXEL_LED
92
-  - opt_enable AUTO_BED_LEVELING_LINEAR Z_MIN_PROBE_REPEATABILITY_TEST DEBUG_LEVELING_FEATURE
92
+  - opt_enable AUTO_BED_LEVELING_LINEAR Z_MIN_PROBE_REPEATABILITY_TEST DEBUG_LEVELING_FEATURE SKEW_CORRECTION SKEW_CORRECTION_FOR_Z SKEW_CORRECTION_GCODE
93
   - opt_enable_adv FWRETRACT MAX7219_DEBUG LED_CONTROL_MENU
93
   - opt_enable_adv FWRETRACT MAX7219_DEBUG LED_CONTROL_MENU
94
   - opt_set ABL_GRID_POINTS_X 16
94
   - opt_set ABL_GRID_POINTS_X 16
95
   - opt_set ABL_GRID_POINTS_Y 16
95
   - opt_set ABL_GRID_POINTS_Y 16

+ 44
- 1
Marlin/Conditionals_post.h View File

845
   #endif
845
   #endif
846
 
846
 
847
   /**
847
   /**
848
+   * XYZ Bed Skew Correction
849
+   */
850
+  #if ENABLED(SKEW_CORRECTION)
851
+    #define SKEW_FACTOR_MIN -1
852
+    #define SKEW_FACTOR_MAX 1
853
+
854
+    #define _GET_SIDE(a,b,c) (SQRT(2*sq(a)+2*sq(b)-4*sq(c))*0.5)
855
+    #define _SKEW_SIDE(a,b,c) tan(M_PI*0.5-acos((sq(a)-sq(b)-sq(c))/(2*c*b)))
856
+    #define _SKEW_FACTOR(a,b,c) _SKEW_SIDE(a,_GET_SIDE(a,b,c),c)
857
+
858
+    #ifndef XY_SKEW_FACTOR
859
+      constexpr float XY_SKEW_FACTOR = (
860
+        #if defined(XY_DIAG_AC) && defined(XY_DIAG_BD) && defined(XY_SIDE_AD)
861
+          _SKEW_FACTOR(XY_DIAG_AC, XY_DIAG_BD, XY_SIDE_AD)
862
+        #else
863
+          0.0
864
+        #endif
865
+      );
866
+    #endif
867
+    #ifndef XZ_SKEW_FACTOR
868
+      #if defined(XY_SIDE_AD) && !defined(XZ_SIDE_AD)
869
+        #define XZ_SIDE_AD XY_SIDE_AD
870
+      #endif
871
+      constexpr float XZ_SKEW_FACTOR = (
872
+        #if defined(XZ_DIAG_AC) && defined(XZ_DIAG_BD) && defined(XZ_SIDE_AD)
873
+          _SKEW_FACTOR(XZ_DIAG_AC, XZ_DIAG_BD, XZ_SIDE_AD)
874
+        #else
875
+          0.0
876
+        #endif
877
+      );
878
+    #endif
879
+    #ifndef YZ_SKEW_FACTOR
880
+      constexpr float YZ_SKEW_FACTOR = (
881
+        #if defined(YZ_DIAG_AC) && defined(YZ_DIAG_BD) && defined(YZ_SIDE_AD)
882
+          _SKEW_FACTOR(YZ_DIAG_AC, YZ_DIAG_BD, YZ_SIDE_AD)
883
+        #else
884
+          0.0
885
+        #endif
886
+      );
887
+    #endif
888
+  #endif // SKEW_CORRECTION
889
+
890
+  /**
848
    * Heater & Fan Pausing
891
    * Heater & Fan Pausing
849
    */
892
    */
850
   #if FAN_COUNT == 0
893
   #if FAN_COUNT == 0
898
   #define HAS_LEVELING          (HAS_ABL || ENABLED(MESH_BED_LEVELING))
941
   #define HAS_LEVELING          (HAS_ABL || ENABLED(MESH_BED_LEVELING))
899
   #define HAS_AUTOLEVEL         (HAS_ABL && DISABLED(PROBE_MANUALLY))
942
   #define HAS_AUTOLEVEL         (HAS_ABL && DISABLED(PROBE_MANUALLY))
900
   #define HAS_MESH              (ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) || ENABLED(MESH_BED_LEVELING))
943
   #define HAS_MESH              (ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) || ENABLED(MESH_BED_LEVELING))
901
-  #define PLANNER_LEVELING      (OLDSCHOOL_ABL || ENABLED(MESH_BED_LEVELING) || UBL_DELTA)
944
+  #define PLANNER_LEVELING      (OLDSCHOOL_ABL || ENABLED(MESH_BED_LEVELING) || UBL_DELTA || ENABLED(SKEW_CORRECTION))
902
   #define HAS_PROBING_PROCEDURE (HAS_ABL || ENABLED(Z_MIN_PROBE_REPEATABILITY_TEST))
945
   #define HAS_PROBING_PROCEDURE (HAS_ABL || ENABLED(Z_MIN_PROBE_REPEATABILITY_TEST))
903
   #if HAS_PROBING_PROCEDURE
946
   #if HAS_PROBING_PROCEDURE
904
     #define PROBE_BED_WIDTH abs(RIGHT_PROBE_BED_POSITION - (LEFT_PROBE_BED_POSITION))
947
     #define PROBE_BED_WIDTH abs(RIGHT_PROBE_BED_POSITION - (LEFT_PROBE_BED_POSITION))

+ 58
- 1
Marlin/Configuration.h View File

832
 //===========================================================================
832
 //===========================================================================
833
 //=============================== Bed Leveling ==============================
833
 //=============================== Bed Leveling ==============================
834
 //===========================================================================
834
 //===========================================================================
835
-// @section bedlevel
835
+// @section calibrate
836
 
836
 
837
 /**
837
 /**
838
  * Choose one of the options below to enable G29 Bed Leveling. The parameters
838
  * Choose one of the options below to enable G29 Bed Leveling. The parameters
1044
 #define HOMING_FEEDRATE_XY (50*60)
1044
 #define HOMING_FEEDRATE_XY (50*60)
1045
 #define HOMING_FEEDRATE_Z  (4*60)
1045
 #define HOMING_FEEDRATE_Z  (4*60)
1046
 
1046
 
1047
+// @section calibrate
1048
+
1049
+/**
1050
+ * Bed Skew Compensation
1051
+ *
1052
+ * This feature corrects for misalignment in the XYZ axes.
1053
+ *
1054
+ * Take the following steps to get the bed skew in the XY plane:
1055
+ *  1. Print a test square (e.g., https://www.thingiverse.com/thing:2563185)
1056
+ *  2. For XY_DIAG_AC measure the diagonal A to C
1057
+ *  3. For XY_DIAG_BD measure the diagonal B to D
1058
+ *  4. For XY_SIDE_AD measure the edge A to D
1059
+ *
1060
+ * Marlin automatically computes skew factors from these measurements.
1061
+ * Skew factors may also be computed and set manually:
1062
+ *
1063
+ *  - Compute AB     : SQRT(2*AC*AC+2*BD*BD-4*AD*AD)/2
1064
+ *  - XY_SKEW_FACTOR : TAN(PI/2-ACOS((AC*AC-AB*AB-AD*AD)/(2*AB*AD)))
1065
+ *
1066
+ * If desired, follow the same procedure for XZ and YZ.
1067
+ * Use these diagrams for reference:
1068
+ *
1069
+ *    Y                     Z                     Z
1070
+ *    ^     B-------C       ^     B-------C       ^     B-------C
1071
+ *    |    /       /        |    /       /        |    /       /
1072
+ *    |   /       /         |   /       /         |   /       /
1073
+ *    |  A-------D          |  A-------D          |  A-------D
1074
+ *    +-------------->X     +-------------->X     +-------------->Y
1075
+ *     XY_SKEW_FACTOR        XZ_SKEW_FACTOR        YZ_SKEW_FACTOR
1076
+ */
1077
+//#define SKEW_CORRECTION
1078
+
1079
+#if ENABLED(SKEW_CORRECTION)
1080
+  // Input all length measurements here:
1081
+  #define XY_DIAG_AC 282.8427124746
1082
+  #define XY_DIAG_BD 282.8427124746
1083
+  #define XY_SIDE_AD 200
1084
+
1085
+  // Or, set the default skew factors directly here
1086
+  // to override the above measurements:
1087
+  #define XY_SKEW_FACTOR 0.0
1088
+
1089
+  //#define SKEW_CORRECTION_FOR_Z
1090
+  #if ENABLED(SKEW_CORRECTION_FOR_Z)
1091
+    #define XZ_DIAG_AC 282.8427124746
1092
+    #define XZ_DIAG_BD 282.8427124746
1093
+    #define YZ_DIAG_AC 282.8427124746
1094
+    #define YZ_DIAG_BD 282.8427124746
1095
+    #define YZ_SIDE_AD 200
1096
+    #define XZ_SKEW_FACTOR 0.0
1097
+    #define YZ_SKEW_FACTOR 0.0
1098
+  #endif
1099
+
1100
+  // Enable this option for M852 to set skew at runtime
1101
+  //#define SKEW_CORRECTION_GCODE
1102
+#endif
1103
+
1047
 //=============================================================================
1104
 //=============================================================================
1048
 //============================= Additional Features ===========================
1105
 //============================= Additional Features ===========================
1049
 //=============================================================================
1106
 //=============================================================================

+ 70
- 0
Marlin/Marlin_main.cpp View File

205
  * M666 - Set delta endstop adjustment. (Requires DELTA)
205
  * M666 - Set delta endstop adjustment. (Requires DELTA)
206
  * M605 - Set dual x-carriage movement mode: "M605 S<mode> [X<x_offset>] [R<temp_offset>]". (Requires DUAL_X_CARRIAGE)
206
  * M605 - Set dual x-carriage movement mode: "M605 S<mode> [X<x_offset>] [R<temp_offset>]". (Requires DUAL_X_CARRIAGE)
207
  * M851 - Set Z probe's Z offset in current units. (Negative = below the nozzle.)
207
  * M851 - Set Z probe's Z offset in current units. (Negative = below the nozzle.)
208
+ * M852 - Set skew factors: "M852 [I<xy>] [J<xz>] [K<yz>]". (Requires SKEW_CORRECTION_GCODE, and SKEW_CORRECTION_FOR_Z for IJ)
208
  * M860 - Report the position of position encoder modules.
209
  * M860 - Report the position of position encoder modules.
209
  * M861 - Report the status of position encoder modules.
210
  * M861 - Report the status of position encoder modules.
210
  * M862 - Perform an axis continuity test for position encoder modules.
211
  * M862 - Perform an axis continuity test for position encoder modules.
9942
 
9943
 
9943
 #endif // HAS_BED_PROBE
9944
 #endif // HAS_BED_PROBE
9944
 
9945
 
9946
+#if ENABLED(SKEW_CORRECTION_GCODE)
9947
+
9948
+  /**
9949
+   * M852: Get or set the machine skew factors. Reports current values with no arguments.
9950
+   *
9951
+   *  S[xy_factor] - Alias for 'I'
9952
+   *  I[xy_factor] - New XY skew factor
9953
+   *  J[xz_factor] - New XZ skew factor
9954
+   *  K[yz_factor] - New YZ skew factor
9955
+   */
9956
+  inline void gcode_M852() {
9957
+    const bool ijk = parser.seen('I') || parser.seen('S')
9958
+      #if ENABLED(SKEW_CORRECTION_FOR_Z)
9959
+        || parser.seen('J') || parser.seen('K')
9960
+      #endif
9961
+    ;
9962
+    bool badval = false;
9963
+
9964
+    if (parser.seen('I') || parser.seen('S')) {
9965
+      const float value = parser.value_linear_units();
9966
+      if (WITHIN(value, SKEW_FACTOR_MIN, SKEW_FACTOR_MAX))
9967
+        planner.xy_skew_factor = value;
9968
+      else
9969
+        badval = true;
9970
+    }
9971
+
9972
+    #if ENABLED(SKEW_CORRECTION_FOR_Z)
9973
+
9974
+      if (parser.seen('J')) {
9975
+        const float value = parser.value_linear_units();
9976
+        if (WITHIN(value, SKEW_FACTOR_MIN, SKEW_FACTOR_MAX))
9977
+          planner.xz_skew_factor = value;
9978
+        else
9979
+          badval = true;
9980
+      }
9981
+
9982
+      if (parser.seen('K')) {
9983
+        const float value = parser.value_linear_units();
9984
+        if (WITHIN(value, SKEW_FACTOR_MIN, SKEW_FACTOR_MAX))
9985
+          planner.yz_skew_factor = value;
9986
+        else
9987
+          badval = true;
9988
+      }
9989
+
9990
+    #endif
9991
+
9992
+    if (badval)
9993
+      SERIAL_ECHOLNPGM(MSG_SKEW_MIN " " STRINGIFY(SKEW_FACTOR_MIN) " " MSG_SKEW_MAX " " STRINGIFY(SKEW_FACTOR_MAX));
9994
+
9995
+    if (!ijk) {
9996
+      SERIAL_ECHO_START();
9997
+      SERIAL_ECHOPAIR(MSG_SKEW_FACTOR " XY: ", planner.xy_skew_factor);
9998
+      #if ENABLED(SKEW_CORRECTION_FOR_Z)
9999
+        SERIAL_ECHOPAIR(" XZ: ", planner.xz_skew_factor);
10000
+        SERIAL_ECHOLNPAIR(" YZ: ", planner.yz_skew_factor);
10001
+      #else
10002
+        SERIAL_EOL();
10003
+      #endif
10004
+    }
10005
+  }
10006
+
10007
+#endif // SKEW_CORRECTION_GCODE
10008
+
9945
 #if ENABLED(ADVANCED_PAUSE_FEATURE)
10009
 #if ENABLED(ADVANCED_PAUSE_FEATURE)
9946
 
10010
 
9947
   /**
10011
   /**
11787
           break;
11851
           break;
11788
       #endif // HAS_BED_PROBE
11852
       #endif // HAS_BED_PROBE
11789
 
11853
 
11854
+      #if ENABLED(SKEW_CORRECTION_GCODE)
11855
+        case 852: // M852: Set Skew factors
11856
+          gcode_M852();
11857
+          break;
11858
+      #endif
11859
+
11790
       #if ENABLED(ADVANCED_PAUSE_FEATURE)
11860
       #if ENABLED(ADVANCED_PAUSE_FEATURE)
11791
         case 600: // M600: Pause for filament change
11861
         case 600: // M600: Pause for filament change
11792
           gcode_M600();
11862
           gcode_M600();

+ 14
- 0
Marlin/SanityCheck.h View File

1518
 #if ENABLED(LED_CONTROL_MENU) && DISABLED(ULTIPANEL)
1518
 #if ENABLED(LED_CONTROL_MENU) && DISABLED(ULTIPANEL)
1519
   #error "LED_CONTROL_MENU requires an LCD controller."
1519
   #error "LED_CONTROL_MENU requires an LCD controller."
1520
 #endif
1520
 #endif
1521
+
1522
+#if ENABLED(SKEW_CORRECTION)
1523
+  #if !defined(XY_SKEW_FACTOR) && !(defined(XY_DIAG_AC) && defined(XY_DIAG_BD) && defined(XY_SIDE_AD))
1524
+    #error "SKEW_CORRECTION requires XY_SKEW_FACTOR or XY_DIAG_AC, XY_DIAG_BD, XY_SIDE_AD."
1525
+  #endif
1526
+  #if ENABLED(SKEW_CORRECTION_FOR_Z)
1527
+    #if !defined(XZ_SKEW_FACTOR) && !(defined(XZ_DIAG_AC) && defined(XZ_DIAG_BD) && defined(XZ_SIDE_AD))
1528
+      #error "SKEW_CORRECTION requires XZ_SKEW_FACTOR or XZ_DIAG_AC, XZ_DIAG_BD, XZ_SIDE_AD."
1529
+    #endif
1530
+    #if !defined(YZ_SKEW_FACTOR) && !(defined(YZ_DIAG_AC) && defined(YZ_DIAG_BD) && defined(YZ_SIDE_AD))
1531
+      #error "SKEW_CORRECTION requires YZ_SKEW_FACTOR or YZ_DIAG_AC, YZ_DIAG_BD, YZ_SIDE_AD."
1532
+    #endif
1533
+  #endif
1534
+#endif

+ 69
- 4
Marlin/configuration_store.cpp View File

36
  *
36
  *
37
  */
37
  */
38
 
38
 
39
-#define EEPROM_VERSION "V45"
39
+#define EEPROM_VERSION "V46"
40
 
40
 
41
 // Change EEPROM version if these are changed:
41
 // Change EEPROM version if these are changed:
42
 #define EEPROM_OFFSET 100
42
 #define EEPROM_OFFSET 100
43
 
43
 
44
 /**
44
 /**
45
- * V45 EEPROM Layout:
45
+ * V46 EEPROM Layout:
46
  *
46
  *
47
  *  100  Version                                    (char x4)
47
  *  100  Version                                    (char x4)
48
  *  104  EEPROM CRC16                               (uint16_t)
48
  *  104  EEPROM CRC16                               (uint16_t)
166
  * CNC_COORDINATE_SYSTEMS                           108 bytes
166
  * CNC_COORDINATE_SYSTEMS                           108 bytes
167
  *  602  G54-G59.3 coordinate_system                (float x 27)
167
  *  602  G54-G59.3 coordinate_system                (float x 27)
168
  *
168
  *
169
- *  710                                   Minimum end-point
170
- * 2239 (710 + 208 + 36 + 9 + 288 + 988)  Maximum end-point
169
+ * SKEW_CORRECTION:                                 12 bytes
170
+ *  710  M852 I    planner.xy_skew_factor           (float)
171
+ *  714  M852 J    planner.xz_skew_factor           (float)
172
+ *  718  M852 K    planner.yz_skew_factor           (float)
173
+ *
174
+ *  722                                   Minimum end-point
175
+ * 2251 (722 + 208 + 36 + 9 + 288 + 988)  Maximum end-point
171
  *
176
  *
172
  * ========================================================================
177
  * ========================================================================
173
  * meshes_begin (between max and min end-point, directly above)
178
  * meshes_begin (between max and min end-point, directly above)
664
       for (uint8_t q = 3; q--;) EEPROM_WRITE(dummyui32);
669
       for (uint8_t q = 3; q--;) EEPROM_WRITE(dummyui32);
665
     #endif
670
     #endif
666
 
671
 
672
+    //
673
+    // CNC Coordinate Systems
674
+    //
675
+
667
     #if ENABLED(CNC_COORDINATE_SYSTEMS)
676
     #if ENABLED(CNC_COORDINATE_SYSTEMS)
668
       EEPROM_WRITE(coordinate_system); // 27 floats
677
       EEPROM_WRITE(coordinate_system); // 27 floats
669
     #else
678
     #else
671
       for (uint8_t q = 27; q--;) EEPROM_WRITE(dummy);
680
       for (uint8_t q = 27; q--;) EEPROM_WRITE(dummy);
672
     #endif
681
     #endif
673
 
682
 
683
+    //
684
+    // Skew correction factors
685
+    //
686
+
687
+    #if ENABLED(SKEW_CORRECTION)
688
+      EEPROM_WRITE(planner.xy_skew_factor);
689
+      EEPROM_WRITE(planner.xz_skew_factor);
690
+      EEPROM_WRITE(planner.yz_skew_factor);
691
+    #else
692
+      dummy = 0.0f;
693
+      for (uint8_t q = 3; q--;) EEPROM_WRITE(dummy);
694
+    #endif
695
+
674
     if (!eeprom_error) {
696
     if (!eeprom_error) {
675
       const int eeprom_size = eeprom_index;
697
       const int eeprom_size = eeprom_index;
676
 
698
 
1105
         for (uint8_t q = 27; q--;) EEPROM_READ(dummy);
1127
         for (uint8_t q = 27; q--;) EEPROM_READ(dummy);
1106
       #endif
1128
       #endif
1107
 
1129
 
1130
+      //
1131
+      // Skew correction factors
1132
+      //
1133
+
1134
+      #if ENABLED(SKEW_CORRECTION_GCODE)
1135
+        EEPROM_READ(planner.xy_skew_factor);
1136
+        #if ENABLED(SKEW_CORRECTION_FOR_Z)
1137
+          EEPROM_READ(planner.xz_skew_factor);
1138
+          EEPROM_READ(planner.yz_skew_factor);
1139
+        #else
1140
+          EEPROM_READ(dummy);
1141
+          EEPROM_READ(dummy);
1142
+        #endif
1143
+      #else
1144
+        for (uint8_t q = 3; q--;) EEPROM_READ(dummy);
1145
+      #endif
1146
+
1108
       if (working_crc == stored_crc) {
1147
       if (working_crc == stored_crc) {
1109
         postprocess();
1148
         postprocess();
1110
         #if ENABLED(EEPROM_CHITCHAT)
1149
         #if ENABLED(EEPROM_CHITCHAT)
1483
     ubl.reset();
1522
     ubl.reset();
1484
   #endif
1523
   #endif
1485
 
1524
 
1525
+  #if ENABLED(SKEW_CORRECTION_GCODE)
1526
+    planner.xy_skew_factor = XY_SKEW_FACTOR;
1527
+    #if ENABLED(SKEW_CORRECTION_FOR_Z)
1528
+      planner.xz_skew_factor = XZ_SKEW_FACTOR;
1529
+      planner.yz_skew_factor = YZ_SKEW_FACTOR;
1530
+    #endif
1531
+  #endif
1532
+
1486
   postprocess();
1533
   postprocess();
1487
 
1534
 
1488
   #if ENABLED(EEPROM_CHITCHAT)
1535
   #if ENABLED(EEPROM_CHITCHAT)
1913
     #endif
1960
     #endif
1914
 
1961
 
1915
     /**
1962
     /**
1963
+     * Bed Skew Correction
1964
+     */
1965
+    #if ENABLED(SKEW_CORRECTION_GCODE)
1966
+      if (!forReplay) {
1967
+        CONFIG_ECHO_START;
1968
+        SERIAL_ECHOLNPGM("Skew Factor: ");
1969
+      }
1970
+      CONFIG_ECHO_START;
1971
+      #if ENABLED(SKEW_CORRECTION_FOR_Z)
1972
+        SERIAL_ECHOPAIR("  M852 I", LINEAR_UNIT(planner.xy_skew_factor));
1973
+        SERIAL_ECHOPAIR(" J", LINEAR_UNIT(planner.xz_skew_factor));
1974
+        SERIAL_ECHOLNPAIR(" K", LINEAR_UNIT(planner.yz_skew_factor));
1975
+      #else
1976
+        SERIAL_ECHOLNPAIR("  M852 S", LINEAR_UNIT(planner.xy_skew_factor));
1977
+      #endif
1978
+    #endif
1979
+
1980
+    /**
1916
      * TMC2130 stepper driver current
1981
      * TMC2130 stepper driver current
1917
      */
1982
      */
1918
     #if ENABLED(HAVE_TMC2130)
1983
     #if ENABLED(HAVE_TMC2130)

+ 58
- 1
Marlin/example_configurations/AlephObjects/TAZ4/Configuration.h View File

852
 //===========================================================================
852
 //===========================================================================
853
 //=============================== Bed Leveling ==============================
853
 //=============================== Bed Leveling ==============================
854
 //===========================================================================
854
 //===========================================================================
855
-// @section bedlevel
855
+// @section calibrate
856
 
856
 
857
 /**
857
 /**
858
  * Choose one of the options below to enable G29 Bed Leveling. The parameters
858
  * Choose one of the options below to enable G29 Bed Leveling. The parameters
1064
 #define HOMING_FEEDRATE_XY (50*60)
1064
 #define HOMING_FEEDRATE_XY (50*60)
1065
 #define HOMING_FEEDRATE_Z  (8*60)
1065
 #define HOMING_FEEDRATE_Z  (8*60)
1066
 
1066
 
1067
+// @section calibrate
1068
+
1069
+/**
1070
+ * Bed Skew Compensation
1071
+ *
1072
+ * This feature corrects for misalignment in the XYZ axes.
1073
+ *
1074
+ * Take the following steps to get the bed skew in the XY plane:
1075
+ *  1. Print a test square (e.g., https://www.thingiverse.com/thing:2563185)
1076
+ *  2. For XY_DIAG_AC measure the diagonal A to C
1077
+ *  3. For XY_DIAG_BD measure the diagonal B to D
1078
+ *  4. For XY_SIDE_AD measure the edge A to D
1079
+ *
1080
+ * Marlin automatically computes skew factors from these measurements.
1081
+ * Skew factors may also be computed and set manually:
1082
+ *
1083
+ *  - Compute AB     : SQRT(2*AC*AC+2*BD*BD-4*AD*AD)/2
1084
+ *  - XY_SKEW_FACTOR : TAN(PI/2-ACOS((AC*AC-AB*AB-AD*AD)/(2*AB*AD)))
1085
+ *
1086
+ * If desired, follow the same procedure for XZ and YZ.
1087
+ * Use these diagrams for reference:
1088
+ *
1089
+ *    Y                     Z                     Z
1090
+ *    ^     B-------C       ^     B-------C       ^     B-------C
1091
+ *    |    /       /        |    /       /        |    /       /
1092
+ *    |   /       /         |   /       /         |   /       /
1093
+ *    |  A-------D          |  A-------D          |  A-------D
1094
+ *    +-------------->X     +-------------->X     +-------------->Y
1095
+ *     XY_SKEW_FACTOR        XZ_SKEW_FACTOR        YZ_SKEW_FACTOR
1096
+ */
1097
+//#define SKEW_CORRECTION
1098
+
1099
+#if ENABLED(SKEW_CORRECTION)
1100
+  // Input all length measurements here:
1101
+  #define XY_DIAG_AC 282.8427124746
1102
+  #define XY_DIAG_BD 282.8427124746
1103
+  #define XY_SIDE_AD 200
1104
+
1105
+  // Or, set the default skew factors directly here
1106
+  // to override the above measurements:
1107
+  #define XY_SKEW_FACTOR 0.0
1108
+
1109
+  //#define SKEW_CORRECTION_FOR_Z
1110
+  #if ENABLED(SKEW_CORRECTION_FOR_Z)
1111
+    #define XZ_DIAG_AC 282.8427124746
1112
+    #define XZ_DIAG_BD 282.8427124746
1113
+    #define YZ_DIAG_AC 282.8427124746
1114
+    #define YZ_DIAG_BD 282.8427124746
1115
+    #define YZ_SIDE_AD 200
1116
+    #define XZ_SKEW_FACTOR 0.0
1117
+    #define YZ_SKEW_FACTOR 0.0
1118
+  #endif
1119
+
1120
+  // Enable this option for M852 to set skew at runtime
1121
+  //#define SKEW_CORRECTION_GCODE
1122
+#endif
1123
+
1067
 //=============================================================================
1124
 //=============================================================================
1068
 //============================= Additional Features ===========================
1125
 //============================= Additional Features ===========================
1069
 //=============================================================================
1126
 //=============================================================================

+ 58
- 1
Marlin/example_configurations/AliExpress/CL-260/Configuration.h View File

832
 //===========================================================================
832
 //===========================================================================
833
 //=============================== Bed Leveling ==============================
833
 //=============================== Bed Leveling ==============================
834
 //===========================================================================
834
 //===========================================================================
835
-// @section bedlevel
835
+// @section calibrate
836
 
836
 
837
 /**
837
 /**
838
  * Choose one of the options below to enable G29 Bed Leveling. The parameters
838
  * Choose one of the options below to enable G29 Bed Leveling. The parameters
1044
 #define HOMING_FEEDRATE_XY (50*60)
1044
 #define HOMING_FEEDRATE_XY (50*60)
1045
 #define HOMING_FEEDRATE_Z  (4*60)
1045
 #define HOMING_FEEDRATE_Z  (4*60)
1046
 
1046
 
1047
+// @section calibrate
1048
+
1049
+/**
1050
+ * Bed Skew Compensation
1051
+ *
1052
+ * This feature corrects for misalignment in the XYZ axes.
1053
+ *
1054
+ * Take the following steps to get the bed skew in the XY plane:
1055
+ *  1. Print a test square (e.g., https://www.thingiverse.com/thing:2563185)
1056
+ *  2. For XY_DIAG_AC measure the diagonal A to C
1057
+ *  3. For XY_DIAG_BD measure the diagonal B to D
1058
+ *  4. For XY_SIDE_AD measure the edge A to D
1059
+ *
1060
+ * Marlin automatically computes skew factors from these measurements.
1061
+ * Skew factors may also be computed and set manually:
1062
+ *
1063
+ *  - Compute AB     : SQRT(2*AC*AC+2*BD*BD-4*AD*AD)/2
1064
+ *  - XY_SKEW_FACTOR : TAN(PI/2-ACOS((AC*AC-AB*AB-AD*AD)/(2*AB*AD)))
1065
+ *
1066
+ * If desired, follow the same procedure for XZ and YZ.
1067
+ * Use these diagrams for reference:
1068
+ *
1069
+ *    Y                     Z                     Z
1070
+ *    ^     B-------C       ^     B-------C       ^     B-------C
1071
+ *    |    /       /        |    /       /        |    /       /
1072
+ *    |   /       /         |   /       /         |   /       /
1073
+ *    |  A-------D          |  A-------D          |  A-------D
1074
+ *    +-------------->X     +-------------->X     +-------------->Y
1075
+ *     XY_SKEW_FACTOR        XZ_SKEW_FACTOR        YZ_SKEW_FACTOR
1076
+ */
1077
+//#define SKEW_CORRECTION
1078
+
1079
+#if ENABLED(SKEW_CORRECTION)
1080
+  // Input all length measurements here:
1081
+  #define XY_DIAG_AC 282.8427124746
1082
+  #define XY_DIAG_BD 282.8427124746
1083
+  #define XY_SIDE_AD 200
1084
+
1085
+  // Or, set the default skew factors directly here
1086
+  // to override the above measurements:
1087
+  #define XY_SKEW_FACTOR 0.0
1088
+
1089
+  //#define SKEW_CORRECTION_FOR_Z
1090
+  #if ENABLED(SKEW_CORRECTION_FOR_Z)
1091
+    #define XZ_DIAG_AC 282.8427124746
1092
+    #define XZ_DIAG_BD 282.8427124746
1093
+    #define YZ_DIAG_AC 282.8427124746
1094
+    #define YZ_DIAG_BD 282.8427124746
1095
+    #define YZ_SIDE_AD 200
1096
+    #define XZ_SKEW_FACTOR 0.0
1097
+    #define YZ_SKEW_FACTOR 0.0
1098
+  #endif
1099
+
1100
+  // Enable this option for M852 to set skew at runtime
1101
+  //#define SKEW_CORRECTION_GCODE
1102
+#endif
1103
+
1047
 //=============================================================================
1104
 //=============================================================================
1048
 //============================= Additional Features ===========================
1105
 //============================= Additional Features ===========================
1049
 //=============================================================================
1106
 //=============================================================================

+ 58
- 1
Marlin/example_configurations/Anet/A6/Configuration.h View File

951
 //===========================================================================
951
 //===========================================================================
952
 //=============================== Bed Leveling ==============================
952
 //=============================== Bed Leveling ==============================
953
 //===========================================================================
953
 //===========================================================================
954
-// @section bedlevel
954
+// @section calibrate
955
 
955
 
956
 /**
956
 /**
957
  * Choose one of the options below to enable G29 Bed Leveling. The parameters
957
  * Choose one of the options below to enable G29 Bed Leveling. The parameters
1201
 #define HOMING_FEEDRATE_XY (50*60)
1201
 #define HOMING_FEEDRATE_XY (50*60)
1202
 #define HOMING_FEEDRATE_Z  (4*60)
1202
 #define HOMING_FEEDRATE_Z  (4*60)
1203
 
1203
 
1204
+// @section calibrate
1205
+
1206
+/**
1207
+ * Bed Skew Compensation
1208
+ *
1209
+ * This feature corrects for misalignment in the XYZ axes.
1210
+ *
1211
+ * Take the following steps to get the bed skew in the XY plane:
1212
+ *  1. Print a test square (e.g., https://www.thingiverse.com/thing:2563185)
1213
+ *  2. For XY_DIAG_AC measure the diagonal A to C
1214
+ *  3. For XY_DIAG_BD measure the diagonal B to D
1215
+ *  4. For XY_SIDE_AD measure the edge A to D
1216
+ *
1217
+ * Marlin automatically computes skew factors from these measurements.
1218
+ * Skew factors may also be computed and set manually:
1219
+ *
1220
+ *  - Compute AB     : SQRT(2*AC*AC+2*BD*BD-4*AD*AD)/2
1221
+ *  - XY_SKEW_FACTOR : TAN(PI/2-ACOS((AC*AC-AB*AB-AD*AD)/(2*AB*AD)))
1222
+ *
1223
+ * If desired, follow the same procedure for XZ and YZ.
1224
+ * Use these diagrams for reference:
1225
+ *
1226
+ *    Y                     Z                     Z
1227
+ *    ^     B-------C       ^     B-------C       ^     B-------C
1228
+ *    |    /       /        |    /       /        |    /       /
1229
+ *    |   /       /         |   /       /         |   /       /
1230
+ *    |  A-------D          |  A-------D          |  A-------D
1231
+ *    +-------------->X     +-------------->X     +-------------->Y
1232
+ *     XY_SKEW_FACTOR        XZ_SKEW_FACTOR        YZ_SKEW_FACTOR
1233
+ */
1234
+//#define SKEW_CORRECTION
1235
+
1236
+#if ENABLED(SKEW_CORRECTION)
1237
+  // Input all length measurements here:
1238
+  #define XY_DIAG_AC 282.8427124746
1239
+  #define XY_DIAG_BD 282.8427124746
1240
+  #define XY_SIDE_AD 200
1241
+
1242
+  // Or, set the default skew factors directly here
1243
+  // to override the above measurements:
1244
+  #define XY_SKEW_FACTOR 0.0
1245
+
1246
+  //#define SKEW_CORRECTION_FOR_Z
1247
+  #if ENABLED(SKEW_CORRECTION_FOR_Z)
1248
+    #define XZ_DIAG_AC 282.8427124746
1249
+    #define XZ_DIAG_BD 282.8427124746
1250
+    #define YZ_DIAG_AC 282.8427124746
1251
+    #define YZ_DIAG_BD 282.8427124746
1252
+    #define YZ_SIDE_AD 200
1253
+    #define XZ_SKEW_FACTOR 0.0
1254
+    #define YZ_SKEW_FACTOR 0.0
1255
+  #endif
1256
+
1257
+  // Enable this option for M852 to set skew at runtime
1258
+  //#define SKEW_CORRECTION_GCODE
1259
+#endif
1260
+
1204
 //=============================================================================
1261
 //=============================================================================
1205
 //============================= Additional Features ===========================
1262
 //============================= Additional Features ===========================
1206
 //=============================================================================
1263
 //=============================================================================

+ 58
- 1
Marlin/example_configurations/Anet/A8/Configuration.h View File

839
 //===========================================================================
839
 //===========================================================================
840
 //=============================== Bed Leveling ==============================
840
 //=============================== Bed Leveling ==============================
841
 //===========================================================================
841
 //===========================================================================
842
-// @section bedlevel
842
+// @section calibrate
843
 
843
 
844
 /**
844
 /**
845
  * Choose one of the options below to enable G29 Bed Leveling. The parameters
845
  * Choose one of the options below to enable G29 Bed Leveling. The parameters
1051
 #define HOMING_FEEDRATE_XY (100*60)
1051
 #define HOMING_FEEDRATE_XY (100*60)
1052
 #define HOMING_FEEDRATE_Z  (4*60)
1052
 #define HOMING_FEEDRATE_Z  (4*60)
1053
 
1053
 
1054
+// @section calibrate
1055
+
1056
+/**
1057
+ * Bed Skew Compensation
1058
+ *
1059
+ * This feature corrects for misalignment in the XYZ axes.
1060
+ *
1061
+ * Take the following steps to get the bed skew in the XY plane:
1062
+ *  1. Print a test square (e.g., https://www.thingiverse.com/thing:2563185)
1063
+ *  2. For XY_DIAG_AC measure the diagonal A to C
1064
+ *  3. For XY_DIAG_BD measure the diagonal B to D
1065
+ *  4. For XY_SIDE_AD measure the edge A to D
1066
+ *
1067
+ * Marlin automatically computes skew factors from these measurements.
1068
+ * Skew factors may also be computed and set manually:
1069
+ *
1070
+ *  - Compute AB     : SQRT(2*AC*AC+2*BD*BD-4*AD*AD)/2
1071
+ *  - XY_SKEW_FACTOR : TAN(PI/2-ACOS((AC*AC-AB*AB-AD*AD)/(2*AB*AD)))
1072
+ *
1073
+ * If desired, follow the same procedure for XZ and YZ.
1074
+ * Use these diagrams for reference:
1075
+ *
1076
+ *    Y                     Z                     Z
1077
+ *    ^     B-------C       ^     B-------C       ^     B-------C
1078
+ *    |    /       /        |    /       /        |    /       /
1079
+ *    |   /       /         |   /       /         |   /       /
1080
+ *    |  A-------D          |  A-------D          |  A-------D
1081
+ *    +-------------->X     +-------------->X     +-------------->Y
1082
+ *     XY_SKEW_FACTOR        XZ_SKEW_FACTOR        YZ_SKEW_FACTOR
1083
+ */
1084
+//#define SKEW_CORRECTION
1085
+
1086
+#if ENABLED(SKEW_CORRECTION)
1087
+  // Input all length measurements here:
1088
+  #define XY_DIAG_AC 282.8427124746
1089
+  #define XY_DIAG_BD 282.8427124746
1090
+  #define XY_SIDE_AD 200
1091
+
1092
+  // Or, set the default skew factors directly here
1093
+  // to override the above measurements:
1094
+  #define XY_SKEW_FACTOR 0.0
1095
+
1096
+  //#define SKEW_CORRECTION_FOR_Z
1097
+  #if ENABLED(SKEW_CORRECTION_FOR_Z)
1098
+    #define XZ_DIAG_AC 282.8427124746
1099
+    #define XZ_DIAG_BD 282.8427124746
1100
+    #define YZ_DIAG_AC 282.8427124746
1101
+    #define YZ_DIAG_BD 282.8427124746
1102
+    #define YZ_SIDE_AD 200
1103
+    #define XZ_SKEW_FACTOR 0.0
1104
+    #define YZ_SKEW_FACTOR 0.0
1105
+  #endif
1106
+
1107
+  // Enable this option for M852 to set skew at runtime
1108
+  //#define SKEW_CORRECTION_GCODE
1109
+#endif
1110
+
1054
 //=============================================================================
1111
 //=============================================================================
1055
 //============================= Additional Features ===========================
1112
 //============================= Additional Features ===========================
1056
 //=============================================================================
1113
 //=============================================================================

+ 58
- 1
Marlin/example_configurations/BQ/Hephestos/Configuration.h View File

823
 //===========================================================================
823
 //===========================================================================
824
 //=============================== Bed Leveling ==============================
824
 //=============================== Bed Leveling ==============================
825
 //===========================================================================
825
 //===========================================================================
826
-// @section bedlevel
826
+// @section calibrate
827
 
827
 
828
 /**
828
 /**
829
  * Choose one of the options below to enable G29 Bed Leveling. The parameters
829
  * Choose one of the options below to enable G29 Bed Leveling. The parameters
1035
 #define HOMING_FEEDRATE_XY 2000
1035
 #define HOMING_FEEDRATE_XY 2000
1036
 #define HOMING_FEEDRATE_Z  150
1036
 #define HOMING_FEEDRATE_Z  150
1037
 
1037
 
1038
+// @section calibrate
1039
+
1040
+/**
1041
+ * Bed Skew Compensation
1042
+ *
1043
+ * This feature corrects for misalignment in the XYZ axes.
1044
+ *
1045
+ * Take the following steps to get the bed skew in the XY plane:
1046
+ *  1. Print a test square (e.g., https://www.thingiverse.com/thing:2563185)
1047
+ *  2. For XY_DIAG_AC measure the diagonal A to C
1048
+ *  3. For XY_DIAG_BD measure the diagonal B to D
1049
+ *  4. For XY_SIDE_AD measure the edge A to D
1050
+ *
1051
+ * Marlin automatically computes skew factors from these measurements.
1052
+ * Skew factors may also be computed and set manually:
1053
+ *
1054
+ *  - Compute AB     : SQRT(2*AC*AC+2*BD*BD-4*AD*AD)/2
1055
+ *  - XY_SKEW_FACTOR : TAN(PI/2-ACOS((AC*AC-AB*AB-AD*AD)/(2*AB*AD)))
1056
+ *
1057
+ * If desired, follow the same procedure for XZ and YZ.
1058
+ * Use these diagrams for reference:
1059
+ *
1060
+ *    Y                     Z                     Z
1061
+ *    ^     B-------C       ^     B-------C       ^     B-------C
1062
+ *    |    /       /        |    /       /        |    /       /
1063
+ *    |   /       /         |   /       /         |   /       /
1064
+ *    |  A-------D          |  A-------D          |  A-------D
1065
+ *    +-------------->X     +-------------->X     +-------------->Y
1066
+ *     XY_SKEW_FACTOR        XZ_SKEW_FACTOR        YZ_SKEW_FACTOR
1067
+ */
1068
+//#define SKEW_CORRECTION
1069
+
1070
+#if ENABLED(SKEW_CORRECTION)
1071
+  // Input all length measurements here:
1072
+  #define XY_DIAG_AC 282.8427124746
1073
+  #define XY_DIAG_BD 282.8427124746
1074
+  #define XY_SIDE_AD 200
1075
+
1076
+  // Or, set the default skew factors directly here
1077
+  // to override the above measurements:
1078
+  #define XY_SKEW_FACTOR 0.0
1079
+
1080
+  //#define SKEW_CORRECTION_FOR_Z
1081
+  #if ENABLED(SKEW_CORRECTION_FOR_Z)
1082
+    #define XZ_DIAG_AC 282.8427124746
1083
+    #define XZ_DIAG_BD 282.8427124746
1084
+    #define YZ_DIAG_AC 282.8427124746
1085
+    #define YZ_DIAG_BD 282.8427124746
1086
+    #define YZ_SIDE_AD 200
1087
+    #define XZ_SKEW_FACTOR 0.0
1088
+    #define YZ_SKEW_FACTOR 0.0
1089
+  #endif
1090
+
1091
+  // Enable this option for M852 to set skew at runtime
1092
+  //#define SKEW_CORRECTION_GCODE
1093
+#endif
1094
+
1038
 //=============================================================================
1095
 //=============================================================================
1039
 //============================= Additional Features ===========================
1096
 //============================= Additional Features ===========================
1040
 //=============================================================================
1097
 //=============================================================================

+ 58
- 1
Marlin/example_configurations/BQ/Hephestos_2/Configuration.h View File

833
 //===========================================================================
833
 //===========================================================================
834
 //=============================== Bed Leveling ==============================
834
 //=============================== Bed Leveling ==============================
835
 //===========================================================================
835
 //===========================================================================
836
-// @section bedlevel
836
+// @section calibrate
837
 
837
 
838
 /**
838
 /**
839
  * Choose one of the options below to enable G29 Bed Leveling. The parameters
839
  * Choose one of the options below to enable G29 Bed Leveling. The parameters
1045
 #define HOMING_FEEDRATE_XY (60*60)
1045
 #define HOMING_FEEDRATE_XY (60*60)
1046
 #define HOMING_FEEDRATE_Z  120
1046
 #define HOMING_FEEDRATE_Z  120
1047
 
1047
 
1048
+// @section calibrate
1049
+
1050
+/**
1051
+ * Bed Skew Compensation
1052
+ *
1053
+ * This feature corrects for misalignment in the XYZ axes.
1054
+ *
1055
+ * Take the following steps to get the bed skew in the XY plane:
1056
+ *  1. Print a test square (e.g., https://www.thingiverse.com/thing:2563185)
1057
+ *  2. For XY_DIAG_AC measure the diagonal A to C
1058
+ *  3. For XY_DIAG_BD measure the diagonal B to D
1059
+ *  4. For XY_SIDE_AD measure the edge A to D
1060
+ *
1061
+ * Marlin automatically computes skew factors from these measurements.
1062
+ * Skew factors may also be computed and set manually:
1063
+ *
1064
+ *  - Compute AB     : SQRT(2*AC*AC+2*BD*BD-4*AD*AD)/2
1065
+ *  - XY_SKEW_FACTOR : TAN(PI/2-ACOS((AC*AC-AB*AB-AD*AD)/(2*AB*AD)))
1066
+ *
1067
+ * If desired, follow the same procedure for XZ and YZ.
1068
+ * Use these diagrams for reference:
1069
+ *
1070
+ *    Y                     Z                     Z
1071
+ *    ^     B-------C       ^     B-------C       ^     B-------C
1072
+ *    |    /       /        |    /       /        |    /       /
1073
+ *    |   /       /         |   /       /         |   /       /
1074
+ *    |  A-------D          |  A-------D          |  A-------D
1075
+ *    +-------------->X     +-------------->X     +-------------->Y
1076
+ *     XY_SKEW_FACTOR        XZ_SKEW_FACTOR        YZ_SKEW_FACTOR
1077
+ */
1078
+//#define SKEW_CORRECTION
1079
+
1080
+#if ENABLED(SKEW_CORRECTION)
1081
+  // Input all length measurements here:
1082
+  #define XY_DIAG_AC 282.8427124746
1083
+  #define XY_DIAG_BD 282.8427124746
1084
+  #define XY_SIDE_AD 200
1085
+
1086
+  // Or, set the default skew factors directly here
1087
+  // to override the above measurements:
1088
+  #define XY_SKEW_FACTOR 0.0
1089
+
1090
+  //#define SKEW_CORRECTION_FOR_Z
1091
+  #if ENABLED(SKEW_CORRECTION_FOR_Z)
1092
+    #define XZ_DIAG_AC 282.8427124746
1093
+    #define XZ_DIAG_BD 282.8427124746
1094
+    #define YZ_DIAG_AC 282.8427124746
1095
+    #define YZ_DIAG_BD 282.8427124746
1096
+    #define YZ_SIDE_AD 200
1097
+    #define XZ_SKEW_FACTOR 0.0
1098
+    #define YZ_SKEW_FACTOR 0.0
1099
+  #endif
1100
+
1101
+  // Enable this option for M852 to set skew at runtime
1102
+  //#define SKEW_CORRECTION_GCODE
1103
+#endif
1104
+
1048
 //=============================================================================
1105
 //=============================================================================
1049
 //============================= Additional Features ===========================
1106
 //============================= Additional Features ===========================
1050
 //=============================================================================
1107
 //=============================================================================

+ 58
- 1
Marlin/example_configurations/BQ/WITBOX/Configuration.h View File

823
 //===========================================================================
823
 //===========================================================================
824
 //=============================== Bed Leveling ==============================
824
 //=============================== Bed Leveling ==============================
825
 //===========================================================================
825
 //===========================================================================
826
-// @section bedlevel
826
+// @section calibrate
827
 
827
 
828
 /**
828
 /**
829
  * Choose one of the options below to enable G29 Bed Leveling. The parameters
829
  * Choose one of the options below to enable G29 Bed Leveling. The parameters
1035
 #define HOMING_FEEDRATE_XY (120*60)
1035
 #define HOMING_FEEDRATE_XY (120*60)
1036
 #define HOMING_FEEDRATE_Z  432
1036
 #define HOMING_FEEDRATE_Z  432
1037
 
1037
 
1038
+// @section calibrate
1039
+
1040
+/**
1041
+ * Bed Skew Compensation
1042
+ *
1043
+ * This feature corrects for misalignment in the XYZ axes.
1044
+ *
1045
+ * Take the following steps to get the bed skew in the XY plane:
1046
+ *  1. Print a test square (e.g., https://www.thingiverse.com/thing:2563185)
1047
+ *  2. For XY_DIAG_AC measure the diagonal A to C
1048
+ *  3. For XY_DIAG_BD measure the diagonal B to D
1049
+ *  4. For XY_SIDE_AD measure the edge A to D
1050
+ *
1051
+ * Marlin automatically computes skew factors from these measurements.
1052
+ * Skew factors may also be computed and set manually:
1053
+ *
1054
+ *  - Compute AB     : SQRT(2*AC*AC+2*BD*BD-4*AD*AD)/2
1055
+ *  - XY_SKEW_FACTOR : TAN(PI/2-ACOS((AC*AC-AB*AB-AD*AD)/(2*AB*AD)))
1056
+ *
1057
+ * If desired, follow the same procedure for XZ and YZ.
1058
+ * Use these diagrams for reference:
1059
+ *
1060
+ *    Y                     Z                     Z
1061
+ *    ^     B-------C       ^     B-------C       ^     B-------C
1062
+ *    |    /       /        |    /       /        |    /       /
1063
+ *    |   /       /         |   /       /         |   /       /
1064
+ *    |  A-------D          |  A-------D          |  A-------D
1065
+ *    +-------------->X     +-------------->X     +-------------->Y
1066
+ *     XY_SKEW_FACTOR        XZ_SKEW_FACTOR        YZ_SKEW_FACTOR
1067
+ */
1068
+//#define SKEW_CORRECTION
1069
+
1070
+#if ENABLED(SKEW_CORRECTION)
1071
+  // Input all length measurements here:
1072
+  #define XY_DIAG_AC 282.8427124746
1073
+  #define XY_DIAG_BD 282.8427124746
1074
+  #define XY_SIDE_AD 200
1075
+
1076
+  // Or, set the default skew factors directly here
1077
+  // to override the above measurements:
1078
+  #define XY_SKEW_FACTOR 0.0
1079
+
1080
+  //#define SKEW_CORRECTION_FOR_Z
1081
+  #if ENABLED(SKEW_CORRECTION_FOR_Z)
1082
+    #define XZ_DIAG_AC 282.8427124746
1083
+    #define XZ_DIAG_BD 282.8427124746
1084
+    #define YZ_DIAG_AC 282.8427124746
1085
+    #define YZ_DIAG_BD 282.8427124746
1086
+    #define YZ_SIDE_AD 200
1087
+    #define XZ_SKEW_FACTOR 0.0
1088
+    #define YZ_SKEW_FACTOR 0.0
1089
+  #endif
1090
+
1091
+  // Enable this option for M852 to set skew at runtime
1092
+  //#define SKEW_CORRECTION_GCODE
1093
+#endif
1094
+
1038
 //=============================================================================
1095
 //=============================================================================
1039
 //============================= Additional Features ===========================
1096
 //============================= Additional Features ===========================
1040
 //=============================================================================
1097
 //=============================================================================

+ 58
- 1
Marlin/example_configurations/Cartesio/Configuration.h View File

831
 //===========================================================================
831
 //===========================================================================
832
 //=============================== Bed Leveling ==============================
832
 //=============================== Bed Leveling ==============================
833
 //===========================================================================
833
 //===========================================================================
834
-// @section bedlevel
834
+// @section calibrate
835
 
835
 
836
 /**
836
 /**
837
  * Choose one of the options below to enable G29 Bed Leveling. The parameters
837
  * Choose one of the options below to enable G29 Bed Leveling. The parameters
1043
 #define HOMING_FEEDRATE_XY (50*60)
1043
 #define HOMING_FEEDRATE_XY (50*60)
1044
 #define HOMING_FEEDRATE_Z  (10*60)
1044
 #define HOMING_FEEDRATE_Z  (10*60)
1045
 
1045
 
1046
+// @section calibrate
1047
+
1048
+/**
1049
+ * Bed Skew Compensation
1050
+ *
1051
+ * This feature corrects for misalignment in the XYZ axes.
1052
+ *
1053
+ * Take the following steps to get the bed skew in the XY plane:
1054
+ *  1. Print a test square (e.g., https://www.thingiverse.com/thing:2563185)
1055
+ *  2. For XY_DIAG_AC measure the diagonal A to C
1056
+ *  3. For XY_DIAG_BD measure the diagonal B to D
1057
+ *  4. For XY_SIDE_AD measure the edge A to D
1058
+ *
1059
+ * Marlin automatically computes skew factors from these measurements.
1060
+ * Skew factors may also be computed and set manually:
1061
+ *
1062
+ *  - Compute AB     : SQRT(2*AC*AC+2*BD*BD-4*AD*AD)/2
1063
+ *  - XY_SKEW_FACTOR : TAN(PI/2-ACOS((AC*AC-AB*AB-AD*AD)/(2*AB*AD)))
1064
+ *
1065
+ * If desired, follow the same procedure for XZ and YZ.
1066
+ * Use these diagrams for reference:
1067
+ *
1068
+ *    Y                     Z                     Z
1069
+ *    ^     B-------C       ^     B-------C       ^     B-------C
1070
+ *    |    /       /        |    /       /        |    /       /
1071
+ *    |   /       /         |   /       /         |   /       /
1072
+ *    |  A-------D          |  A-------D          |  A-------D
1073
+ *    +-------------->X     +-------------->X     +-------------->Y
1074
+ *     XY_SKEW_FACTOR        XZ_SKEW_FACTOR        YZ_SKEW_FACTOR
1075
+ */
1076
+//#define SKEW_CORRECTION
1077
+
1078
+#if ENABLED(SKEW_CORRECTION)
1079
+  // Input all length measurements here:
1080
+  #define XY_DIAG_AC 282.8427124746
1081
+  #define XY_DIAG_BD 282.8427124746
1082
+  #define XY_SIDE_AD 200
1083
+
1084
+  // Or, set the default skew factors directly here
1085
+  // to override the above measurements:
1086
+  #define XY_SKEW_FACTOR 0.0
1087
+
1088
+  //#define SKEW_CORRECTION_FOR_Z
1089
+  #if ENABLED(SKEW_CORRECTION_FOR_Z)
1090
+    #define XZ_DIAG_AC 282.8427124746
1091
+    #define XZ_DIAG_BD 282.8427124746
1092
+    #define YZ_DIAG_AC 282.8427124746
1093
+    #define YZ_DIAG_BD 282.8427124746
1094
+    #define YZ_SIDE_AD 200
1095
+    #define XZ_SKEW_FACTOR 0.0
1096
+    #define YZ_SKEW_FACTOR 0.0
1097
+  #endif
1098
+
1099
+  // Enable this option for M852 to set skew at runtime
1100
+  //#define SKEW_CORRECTION_GCODE
1101
+#endif
1102
+
1046
 //=============================================================================
1103
 //=============================================================================
1047
 //============================= Additional Features ===========================
1104
 //============================= Additional Features ===========================
1048
 //=============================================================================
1105
 //=============================================================================

+ 58
- 1
Marlin/example_configurations/Creality/CR-10/Configuration.h View File

842
 //===========================================================================
842
 //===========================================================================
843
 //=============================== Bed Leveling ==============================
843
 //=============================== Bed Leveling ==============================
844
 //===========================================================================
844
 //===========================================================================
845
-// @section bedlevel
845
+// @section calibrate
846
 
846
 
847
 /**
847
 /**
848
  * Choose one of the options below to enable G29 Bed Leveling. The parameters
848
  * Choose one of the options below to enable G29 Bed Leveling. The parameters
1054
 #define HOMING_FEEDRATE_XY (50*60)
1054
 #define HOMING_FEEDRATE_XY (50*60)
1055
 #define HOMING_FEEDRATE_Z  (4*60)
1055
 #define HOMING_FEEDRATE_Z  (4*60)
1056
 
1056
 
1057
+// @section calibrate
1058
+
1059
+/**
1060
+ * Bed Skew Compensation
1061
+ *
1062
+ * This feature corrects for misalignment in the XYZ axes.
1063
+ *
1064
+ * Take the following steps to get the bed skew in the XY plane:
1065
+ *  1. Print a test square (e.g., https://www.thingiverse.com/thing:2563185)
1066
+ *  2. For XY_DIAG_AC measure the diagonal A to C
1067
+ *  3. For XY_DIAG_BD measure the diagonal B to D
1068
+ *  4. For XY_SIDE_AD measure the edge A to D
1069
+ *
1070
+ * Marlin automatically computes skew factors from these measurements.
1071
+ * Skew factors may also be computed and set manually:
1072
+ *
1073
+ *  - Compute AB     : SQRT(2*AC*AC+2*BD*BD-4*AD*AD)/2
1074
+ *  - XY_SKEW_FACTOR : TAN(PI/2-ACOS((AC*AC-AB*AB-AD*AD)/(2*AB*AD)))
1075
+ *
1076
+ * If desired, follow the same procedure for XZ and YZ.
1077
+ * Use these diagrams for reference:
1078
+ *
1079
+ *    Y                     Z                     Z
1080
+ *    ^     B-------C       ^     B-------C       ^     B-------C
1081
+ *    |    /       /        |    /       /        |    /       /
1082
+ *    |   /       /         |   /       /         |   /       /
1083
+ *    |  A-------D          |  A-------D          |  A-------D
1084
+ *    +-------------->X     +-------------->X     +-------------->Y
1085
+ *     XY_SKEW_FACTOR        XZ_SKEW_FACTOR        YZ_SKEW_FACTOR
1086
+ */
1087
+//#define SKEW_CORRECTION
1088
+
1089
+#if ENABLED(SKEW_CORRECTION)
1090
+  // Input all length measurements here:
1091
+  #define XY_DIAG_AC 282.8427124746
1092
+  #define XY_DIAG_BD 282.8427124746
1093
+  #define XY_SIDE_AD 200
1094
+
1095
+  // Or, set the default skew factors directly here
1096
+  // to override the above measurements:
1097
+  #define XY_SKEW_FACTOR 0.0
1098
+
1099
+  //#define SKEW_CORRECTION_FOR_Z
1100
+  #if ENABLED(SKEW_CORRECTION_FOR_Z)
1101
+    #define XZ_DIAG_AC 282.8427124746
1102
+    #define XZ_DIAG_BD 282.8427124746
1103
+    #define YZ_DIAG_AC 282.8427124746
1104
+    #define YZ_DIAG_BD 282.8427124746
1105
+    #define YZ_SIDE_AD 200
1106
+    #define XZ_SKEW_FACTOR 0.0
1107
+    #define YZ_SKEW_FACTOR 0.0
1108
+  #endif
1109
+
1110
+  // Enable this option for M852 to set skew at runtime
1111
+  //#define SKEW_CORRECTION_GCODE
1112
+#endif
1113
+
1057
 //=============================================================================
1114
 //=============================================================================
1058
 //============================= Additional Features ===========================
1115
 //============================= Additional Features ===========================
1059
 //=============================================================================
1116
 //=============================================================================

+ 58
- 1
Marlin/example_configurations/Felix/Configuration.h View File

814
 //===========================================================================
814
 //===========================================================================
815
 //=============================== Bed Leveling ==============================
815
 //=============================== Bed Leveling ==============================
816
 //===========================================================================
816
 //===========================================================================
817
-// @section bedlevel
817
+// @section calibrate
818
 
818
 
819
 /**
819
 /**
820
  * Choose one of the options below to enable G29 Bed Leveling. The parameters
820
  * Choose one of the options below to enable G29 Bed Leveling. The parameters
1026
 #define HOMING_FEEDRATE_XY (50*60)
1026
 #define HOMING_FEEDRATE_XY (50*60)
1027
 #define HOMING_FEEDRATE_Z  (4*60)
1027
 #define HOMING_FEEDRATE_Z  (4*60)
1028
 
1028
 
1029
+// @section calibrate
1030
+
1031
+/**
1032
+ * Bed Skew Compensation
1033
+ *
1034
+ * This feature corrects for misalignment in the XYZ axes.
1035
+ *
1036
+ * Take the following steps to get the bed skew in the XY plane:
1037
+ *  1. Print a test square (e.g., https://www.thingiverse.com/thing:2563185)
1038
+ *  2. For XY_DIAG_AC measure the diagonal A to C
1039
+ *  3. For XY_DIAG_BD measure the diagonal B to D
1040
+ *  4. For XY_SIDE_AD measure the edge A to D
1041
+ *
1042
+ * Marlin automatically computes skew factors from these measurements.
1043
+ * Skew factors may also be computed and set manually:
1044
+ *
1045
+ *  - Compute AB     : SQRT(2*AC*AC+2*BD*BD-4*AD*AD)/2
1046
+ *  - XY_SKEW_FACTOR : TAN(PI/2-ACOS((AC*AC-AB*AB-AD*AD)/(2*AB*AD)))
1047
+ *
1048
+ * If desired, follow the same procedure for XZ and YZ.
1049
+ * Use these diagrams for reference:
1050
+ *
1051
+ *    Y                     Z                     Z
1052
+ *    ^     B-------C       ^     B-------C       ^     B-------C
1053
+ *    |    /       /        |    /       /        |    /       /
1054
+ *    |   /       /         |   /       /         |   /       /
1055
+ *    |  A-------D          |  A-------D          |  A-------D
1056
+ *    +-------------->X     +-------------->X     +-------------->Y
1057
+ *     XY_SKEW_FACTOR        XZ_SKEW_FACTOR        YZ_SKEW_FACTOR
1058
+ */
1059
+//#define SKEW_CORRECTION
1060
+
1061
+#if ENABLED(SKEW_CORRECTION)
1062
+  // Input all length measurements here:
1063
+  #define XY_DIAG_AC 282.8427124746
1064
+  #define XY_DIAG_BD 282.8427124746
1065
+  #define XY_SIDE_AD 200
1066
+
1067
+  // Or, set the default skew factors directly here
1068
+  // to override the above measurements:
1069
+  #define XY_SKEW_FACTOR 0.0
1070
+
1071
+  //#define SKEW_CORRECTION_FOR_Z
1072
+  #if ENABLED(SKEW_CORRECTION_FOR_Z)
1073
+    #define XZ_DIAG_AC 282.8427124746
1074
+    #define XZ_DIAG_BD 282.8427124746
1075
+    #define YZ_DIAG_AC 282.8427124746
1076
+    #define YZ_DIAG_BD 282.8427124746
1077
+    #define YZ_SIDE_AD 200
1078
+    #define XZ_SKEW_FACTOR 0.0
1079
+    #define YZ_SKEW_FACTOR 0.0
1080
+  #endif
1081
+
1082
+  // Enable this option for M852 to set skew at runtime
1083
+  //#define SKEW_CORRECTION_GCODE
1084
+#endif
1085
+
1029
 //=============================================================================
1086
 //=============================================================================
1030
 //============================= Additional Features ===========================
1087
 //============================= Additional Features ===========================
1031
 //=============================================================================
1088
 //=============================================================================

+ 58
- 1
Marlin/example_configurations/Felix/DUAL/Configuration.h View File

814
 //===========================================================================
814
 //===========================================================================
815
 //=============================== Bed Leveling ==============================
815
 //=============================== Bed Leveling ==============================
816
 //===========================================================================
816
 //===========================================================================
817
-// @section bedlevel
817
+// @section calibrate
818
 
818
 
819
 /**
819
 /**
820
  * Choose one of the options below to enable G29 Bed Leveling. The parameters
820
  * Choose one of the options below to enable G29 Bed Leveling. The parameters
1026
 #define HOMING_FEEDRATE_XY (50*60)
1026
 #define HOMING_FEEDRATE_XY (50*60)
1027
 #define HOMING_FEEDRATE_Z  (4*60)
1027
 #define HOMING_FEEDRATE_Z  (4*60)
1028
 
1028
 
1029
+// @section calibrate
1030
+
1031
+/**
1032
+ * Bed Skew Compensation
1033
+ *
1034
+ * This feature corrects for misalignment in the XYZ axes.
1035
+ *
1036
+ * Take the following steps to get the bed skew in the XY plane:
1037
+ *  1. Print a test square (e.g., https://www.thingiverse.com/thing:2563185)
1038
+ *  2. For XY_DIAG_AC measure the diagonal A to C
1039
+ *  3. For XY_DIAG_BD measure the diagonal B to D
1040
+ *  4. For XY_SIDE_AD measure the edge A to D
1041
+ *
1042
+ * Marlin automatically computes skew factors from these measurements.
1043
+ * Skew factors may also be computed and set manually:
1044
+ *
1045
+ *  - Compute AB     : SQRT(2*AC*AC+2*BD*BD-4*AD*AD)/2
1046
+ *  - XY_SKEW_FACTOR : TAN(PI/2-ACOS((AC*AC-AB*AB-AD*AD)/(2*AB*AD)))
1047
+ *
1048
+ * If desired, follow the same procedure for XZ and YZ.
1049
+ * Use these diagrams for reference:
1050
+ *
1051
+ *    Y                     Z                     Z
1052
+ *    ^     B-------C       ^     B-------C       ^     B-------C
1053
+ *    |    /       /        |    /       /        |    /       /
1054
+ *    |   /       /         |   /       /         |   /       /
1055
+ *    |  A-------D          |  A-------D          |  A-------D
1056
+ *    +-------------->X     +-------------->X     +-------------->Y
1057
+ *     XY_SKEW_FACTOR        XZ_SKEW_FACTOR        YZ_SKEW_FACTOR
1058
+ */
1059
+//#define SKEW_CORRECTION
1060
+
1061
+#if ENABLED(SKEW_CORRECTION)
1062
+  // Input all length measurements here:
1063
+  #define XY_DIAG_AC 282.8427124746
1064
+  #define XY_DIAG_BD 282.8427124746
1065
+  #define XY_SIDE_AD 200
1066
+
1067
+  // Or, set the default skew factors directly here
1068
+  // to override the above measurements:
1069
+  #define XY_SKEW_FACTOR 0.0
1070
+
1071
+  //#define SKEW_CORRECTION_FOR_Z
1072
+  #if ENABLED(SKEW_CORRECTION_FOR_Z)
1073
+    #define XZ_DIAG_AC 282.8427124746
1074
+    #define XZ_DIAG_BD 282.8427124746
1075
+    #define YZ_DIAG_AC 282.8427124746
1076
+    #define YZ_DIAG_BD 282.8427124746
1077
+    #define YZ_SIDE_AD 200
1078
+    #define XZ_SKEW_FACTOR 0.0
1079
+    #define YZ_SKEW_FACTOR 0.0
1080
+  #endif
1081
+
1082
+  // Enable this option for M852 to set skew at runtime
1083
+  //#define SKEW_CORRECTION_GCODE
1084
+#endif
1085
+
1029
 //=============================================================================
1086
 //=============================================================================
1030
 //============================= Additional Features ===========================
1087
 //============================= Additional Features ===========================
1031
 //=============================================================================
1088
 //=============================================================================

+ 58
- 1
Marlin/example_configurations/FolgerTech/i3-2020/Configuration.h View File

835
 //===========================================================================
835
 //===========================================================================
836
 //=============================== Bed Leveling ==============================
836
 //=============================== Bed Leveling ==============================
837
 //===========================================================================
837
 //===========================================================================
838
-// @section bedlevel
838
+// @section calibrate
839
 
839
 
840
 /**
840
 /**
841
  * Choose one of the options below to enable G29 Bed Leveling. The parameters
841
  * Choose one of the options below to enable G29 Bed Leveling. The parameters
1049
 #define HOMING_FEEDRATE_XY (40*60)
1049
 #define HOMING_FEEDRATE_XY (40*60)
1050
 #define HOMING_FEEDRATE_Z  (55)
1050
 #define HOMING_FEEDRATE_Z  (55)
1051
 
1051
 
1052
+// @section calibrate
1053
+
1054
+/**
1055
+ * Bed Skew Compensation
1056
+ *
1057
+ * This feature corrects for misalignment in the XYZ axes.
1058
+ *
1059
+ * Take the following steps to get the bed skew in the XY plane:
1060
+ *  1. Print a test square (e.g., https://www.thingiverse.com/thing:2563185)
1061
+ *  2. For XY_DIAG_AC measure the diagonal A to C
1062
+ *  3. For XY_DIAG_BD measure the diagonal B to D
1063
+ *  4. For XY_SIDE_AD measure the edge A to D
1064
+ *
1065
+ * Marlin automatically computes skew factors from these measurements.
1066
+ * Skew factors may also be computed and set manually:
1067
+ *
1068
+ *  - Compute AB     : SQRT(2*AC*AC+2*BD*BD-4*AD*AD)/2
1069
+ *  - XY_SKEW_FACTOR : TAN(PI/2-ACOS((AC*AC-AB*AB-AD*AD)/(2*AB*AD)))
1070
+ *
1071
+ * If desired, follow the same procedure for XZ and YZ.
1072
+ * Use these diagrams for reference:
1073
+ *
1074
+ *    Y                     Z                     Z
1075
+ *    ^     B-------C       ^     B-------C       ^     B-------C
1076
+ *    |    /       /        |    /       /        |    /       /
1077
+ *    |   /       /         |   /       /         |   /       /
1078
+ *    |  A-------D          |  A-------D          |  A-------D
1079
+ *    +-------------->X     +-------------->X     +-------------->Y
1080
+ *     XY_SKEW_FACTOR        XZ_SKEW_FACTOR        YZ_SKEW_FACTOR
1081
+ */
1082
+//#define SKEW_CORRECTION
1083
+
1084
+#if ENABLED(SKEW_CORRECTION)
1085
+  // Input all length measurements here:
1086
+  #define XY_DIAG_AC 282.8427124746
1087
+  #define XY_DIAG_BD 282.8427124746
1088
+  #define XY_SIDE_AD 200
1089
+
1090
+  // Or, set the default skew factors directly here
1091
+  // to override the above measurements:
1092
+  #define XY_SKEW_FACTOR 0.0
1093
+
1094
+  //#define SKEW_CORRECTION_FOR_Z
1095
+  #if ENABLED(SKEW_CORRECTION_FOR_Z)
1096
+    #define XZ_DIAG_AC 282.8427124746
1097
+    #define XZ_DIAG_BD 282.8427124746
1098
+    #define YZ_DIAG_AC 282.8427124746
1099
+    #define YZ_DIAG_BD 282.8427124746
1100
+    #define YZ_SIDE_AD 200
1101
+    #define XZ_SKEW_FACTOR 0.0
1102
+    #define YZ_SKEW_FACTOR 0.0
1103
+  #endif
1104
+
1105
+  // Enable this option for M852 to set skew at runtime
1106
+  //#define SKEW_CORRECTION_GCODE
1107
+#endif
1108
+
1052
 //=============================================================================
1109
 //=============================================================================
1053
 //============================= Additional Features ===========================
1110
 //============================= Additional Features ===========================
1054
 //=============================================================================
1111
 //=============================================================================

+ 58
- 1
Marlin/example_configurations/Geeetech/GT2560/Configuration.h View File

847
 //===========================================================================
847
 //===========================================================================
848
 //=============================== Bed Leveling ==============================
848
 //=============================== Bed Leveling ==============================
849
 //===========================================================================
849
 //===========================================================================
850
-// @section bedlevel
850
+// @section calibrate
851
 
851
 
852
 /**
852
 /**
853
  * Choose one of the options below to enable G29 Bed Leveling. The parameters
853
  * Choose one of the options below to enable G29 Bed Leveling. The parameters
1059
 #define HOMING_FEEDRATE_XY (50*60)
1059
 #define HOMING_FEEDRATE_XY (50*60)
1060
 #define HOMING_FEEDRATE_Z  (4*60)
1060
 #define HOMING_FEEDRATE_Z  (4*60)
1061
 
1061
 
1062
+// @section calibrate
1063
+
1064
+/**
1065
+ * Bed Skew Compensation
1066
+ *
1067
+ * This feature corrects for misalignment in the XYZ axes.
1068
+ *
1069
+ * Take the following steps to get the bed skew in the XY plane:
1070
+ *  1. Print a test square (e.g., https://www.thingiverse.com/thing:2563185)
1071
+ *  2. For XY_DIAG_AC measure the diagonal A to C
1072
+ *  3. For XY_DIAG_BD measure the diagonal B to D
1073
+ *  4. For XY_SIDE_AD measure the edge A to D
1074
+ *
1075
+ * Marlin automatically computes skew factors from these measurements.
1076
+ * Skew factors may also be computed and set manually:
1077
+ *
1078
+ *  - Compute AB     : SQRT(2*AC*AC+2*BD*BD-4*AD*AD)/2
1079
+ *  - XY_SKEW_FACTOR : TAN(PI/2-ACOS((AC*AC-AB*AB-AD*AD)/(2*AB*AD)))
1080
+ *
1081
+ * If desired, follow the same procedure for XZ and YZ.
1082
+ * Use these diagrams for reference:
1083
+ *
1084
+ *    Y                     Z                     Z
1085
+ *    ^     B-------C       ^     B-------C       ^     B-------C
1086
+ *    |    /       /        |    /       /        |    /       /
1087
+ *    |   /       /         |   /       /         |   /       /
1088
+ *    |  A-------D          |  A-------D          |  A-------D
1089
+ *    +-------------->X     +-------------->X     +-------------->Y
1090
+ *     XY_SKEW_FACTOR        XZ_SKEW_FACTOR        YZ_SKEW_FACTOR
1091
+ */
1092
+//#define SKEW_CORRECTION
1093
+
1094
+#if ENABLED(SKEW_CORRECTION)
1095
+  // Input all length measurements here:
1096
+  #define XY_DIAG_AC 282.8427124746
1097
+  #define XY_DIAG_BD 282.8427124746
1098
+  #define XY_SIDE_AD 200
1099
+
1100
+  // Or, set the default skew factors directly here
1101
+  // to override the above measurements:
1102
+  #define XY_SKEW_FACTOR 0.0
1103
+
1104
+  //#define SKEW_CORRECTION_FOR_Z
1105
+  #if ENABLED(SKEW_CORRECTION_FOR_Z)
1106
+    #define XZ_DIAG_AC 282.8427124746
1107
+    #define XZ_DIAG_BD 282.8427124746
1108
+    #define YZ_DIAG_AC 282.8427124746
1109
+    #define YZ_DIAG_BD 282.8427124746
1110
+    #define YZ_SIDE_AD 200
1111
+    #define XZ_SKEW_FACTOR 0.0
1112
+    #define YZ_SKEW_FACTOR 0.0
1113
+  #endif
1114
+
1115
+  // Enable this option for M852 to set skew at runtime
1116
+  //#define SKEW_CORRECTION_GCODE
1117
+#endif
1118
+
1062
 //=============================================================================
1119
 //=============================================================================
1063
 //============================= Additional Features ===========================
1120
 //============================= Additional Features ===========================
1064
 //=============================================================================
1121
 //=============================================================================

+ 58
- 1
Marlin/example_configurations/Geeetech/I3_Pro_X-GT2560/Configuration.h View File

832
 //===========================================================================
832
 //===========================================================================
833
 //=============================== Bed Leveling ==============================
833
 //=============================== Bed Leveling ==============================
834
 //===========================================================================
834
 //===========================================================================
835
-// @section bedlevel
835
+// @section calibrate
836
 
836
 
837
 /**
837
 /**
838
  * Choose one of the options below to enable G29 Bed Leveling. The parameters
838
  * Choose one of the options below to enable G29 Bed Leveling. The parameters
1044
 #define HOMING_FEEDRATE_XY (50*60)
1044
 #define HOMING_FEEDRATE_XY (50*60)
1045
 #define HOMING_FEEDRATE_Z  (4*60)
1045
 #define HOMING_FEEDRATE_Z  (4*60)
1046
 
1046
 
1047
+// @section calibrate
1048
+
1049
+/**
1050
+ * Bed Skew Compensation
1051
+ *
1052
+ * This feature corrects for misalignment in the XYZ axes.
1053
+ *
1054
+ * Take the following steps to get the bed skew in the XY plane:
1055
+ *  1. Print a test square (e.g., https://www.thingiverse.com/thing:2563185)
1056
+ *  2. For XY_DIAG_AC measure the diagonal A to C
1057
+ *  3. For XY_DIAG_BD measure the diagonal B to D
1058
+ *  4. For XY_SIDE_AD measure the edge A to D
1059
+ *
1060
+ * Marlin automatically computes skew factors from these measurements.
1061
+ * Skew factors may also be computed and set manually:
1062
+ *
1063
+ *  - Compute AB     : SQRT(2*AC*AC+2*BD*BD-4*AD*AD)/2
1064
+ *  - XY_SKEW_FACTOR : TAN(PI/2-ACOS((AC*AC-AB*AB-AD*AD)/(2*AB*AD)))
1065
+ *
1066
+ * If desired, follow the same procedure for XZ and YZ.
1067
+ * Use these diagrams for reference:
1068
+ *
1069
+ *    Y                     Z                     Z
1070
+ *    ^     B-------C       ^     B-------C       ^     B-------C
1071
+ *    |    /       /        |    /       /        |    /       /
1072
+ *    |   /       /         |   /       /         |   /       /
1073
+ *    |  A-------D          |  A-------D          |  A-------D
1074
+ *    +-------------->X     +-------------->X     +-------------->Y
1075
+ *     XY_SKEW_FACTOR        XZ_SKEW_FACTOR        YZ_SKEW_FACTOR
1076
+ */
1077
+//#define SKEW_CORRECTION
1078
+
1079
+#if ENABLED(SKEW_CORRECTION)
1080
+  // Input all length measurements here:
1081
+  #define XY_DIAG_AC 282.8427124746
1082
+  #define XY_DIAG_BD 282.8427124746
1083
+  #define XY_SIDE_AD 200
1084
+
1085
+  // Or, set the default skew factors directly here
1086
+  // to override the above measurements:
1087
+  #define XY_SKEW_FACTOR 0.0
1088
+
1089
+  //#define SKEW_CORRECTION_FOR_Z
1090
+  #if ENABLED(SKEW_CORRECTION_FOR_Z)
1091
+    #define XZ_DIAG_AC 282.8427124746
1092
+    #define XZ_DIAG_BD 282.8427124746
1093
+    #define YZ_DIAG_AC 282.8427124746
1094
+    #define YZ_DIAG_BD 282.8427124746
1095
+    #define YZ_SIDE_AD 200
1096
+    #define XZ_SKEW_FACTOR 0.0
1097
+    #define YZ_SKEW_FACTOR 0.0
1098
+  #endif
1099
+
1100
+  // Enable this option for M852 to set skew at runtime
1101
+  //#define SKEW_CORRECTION_GCODE
1102
+#endif
1103
+
1047
 //=============================================================================
1104
 //=============================================================================
1048
 //============================= Additional Features ===========================
1105
 //============================= Additional Features ===========================
1049
 //=============================================================================
1106
 //=============================================================================

+ 58
- 1
Marlin/example_configurations/Infitary/i3-M508/Configuration.h View File

836
 //===========================================================================
836
 //===========================================================================
837
 //=============================== Bed Leveling ==============================
837
 //=============================== Bed Leveling ==============================
838
 //===========================================================================
838
 //===========================================================================
839
-// @section bedlevel
839
+// @section calibrate
840
 
840
 
841
 /**
841
 /**
842
  * Choose one of the options below to enable G29 Bed Leveling. The parameters
842
  * Choose one of the options below to enable G29 Bed Leveling. The parameters
1048
 #define HOMING_FEEDRATE_XY (50*60)
1048
 #define HOMING_FEEDRATE_XY (50*60)
1049
 #define HOMING_FEEDRATE_Z  (4*60)
1049
 #define HOMING_FEEDRATE_Z  (4*60)
1050
 
1050
 
1051
+// @section calibrate
1052
+
1053
+/**
1054
+ * Bed Skew Compensation
1055
+ *
1056
+ * This feature corrects for misalignment in the XYZ axes.
1057
+ *
1058
+ * Take the following steps to get the bed skew in the XY plane:
1059
+ *  1. Print a test square (e.g., https://www.thingiverse.com/thing:2563185)
1060
+ *  2. For XY_DIAG_AC measure the diagonal A to C
1061
+ *  3. For XY_DIAG_BD measure the diagonal B to D
1062
+ *  4. For XY_SIDE_AD measure the edge A to D
1063
+ *
1064
+ * Marlin automatically computes skew factors from these measurements.
1065
+ * Skew factors may also be computed and set manually:
1066
+ *
1067
+ *  - Compute AB     : SQRT(2*AC*AC+2*BD*BD-4*AD*AD)/2
1068
+ *  - XY_SKEW_FACTOR : TAN(PI/2-ACOS((AC*AC-AB*AB-AD*AD)/(2*AB*AD)))
1069
+ *
1070
+ * If desired, follow the same procedure for XZ and YZ.
1071
+ * Use these diagrams for reference:
1072
+ *
1073
+ *    Y                     Z                     Z
1074
+ *    ^     B-------C       ^     B-------C       ^     B-------C
1075
+ *    |    /       /        |    /       /        |    /       /
1076
+ *    |   /       /         |   /       /         |   /       /
1077
+ *    |  A-------D          |  A-------D          |  A-------D
1078
+ *    +-------------->X     +-------------->X     +-------------->Y
1079
+ *     XY_SKEW_FACTOR        XZ_SKEW_FACTOR        YZ_SKEW_FACTOR
1080
+ */
1081
+//#define SKEW_CORRECTION
1082
+
1083
+#if ENABLED(SKEW_CORRECTION)
1084
+  // Input all length measurements here:
1085
+  #define XY_DIAG_AC 282.8427124746
1086
+  #define XY_DIAG_BD 282.8427124746
1087
+  #define XY_SIDE_AD 200
1088
+
1089
+  // Or, set the default skew factors directly here
1090
+  // to override the above measurements:
1091
+  #define XY_SKEW_FACTOR 0.0
1092
+
1093
+  //#define SKEW_CORRECTION_FOR_Z
1094
+  #if ENABLED(SKEW_CORRECTION_FOR_Z)
1095
+    #define XZ_DIAG_AC 282.8427124746
1096
+    #define XZ_DIAG_BD 282.8427124746
1097
+    #define YZ_DIAG_AC 282.8427124746
1098
+    #define YZ_DIAG_BD 282.8427124746
1099
+    #define YZ_SIDE_AD 200
1100
+    #define XZ_SKEW_FACTOR 0.0
1101
+    #define YZ_SKEW_FACTOR 0.0
1102
+  #endif
1103
+
1104
+  // Enable this option for M852 to set skew at runtime
1105
+  //#define SKEW_CORRECTION_GCODE
1106
+#endif
1107
+
1051
 //=============================================================================
1108
 //=============================================================================
1052
 //============================= Additional Features ===========================
1109
 //============================= Additional Features ===========================
1053
 //=============================================================================
1110
 //=============================================================================

+ 58
- 1
Marlin/example_configurations/Malyan/M150/Configuration.h View File

856
 //===========================================================================
856
 //===========================================================================
857
 //=============================== Bed Leveling ==============================
857
 //=============================== Bed Leveling ==============================
858
 //===========================================================================
858
 //===========================================================================
859
-// @section bedlevel
859
+// @section calibrate
860
 
860
 
861
 /**
861
 /**
862
  * Choose one of the options below to enable G29 Bed Leveling. The parameters
862
  * Choose one of the options below to enable G29 Bed Leveling. The parameters
1072
 #define HOMING_FEEDRATE_XY (50*60)
1072
 #define HOMING_FEEDRATE_XY (50*60)
1073
 #define HOMING_FEEDRATE_Z  (4*60)
1073
 #define HOMING_FEEDRATE_Z  (4*60)
1074
 
1074
 
1075
+// @section calibrate
1076
+
1077
+/**
1078
+ * Bed Skew Compensation
1079
+ *
1080
+ * This feature corrects for misalignment in the XYZ axes.
1081
+ *
1082
+ * Take the following steps to get the bed skew in the XY plane:
1083
+ *  1. Print a test square (e.g., https://www.thingiverse.com/thing:2563185)
1084
+ *  2. For XY_DIAG_AC measure the diagonal A to C
1085
+ *  3. For XY_DIAG_BD measure the diagonal B to D
1086
+ *  4. For XY_SIDE_AD measure the edge A to D
1087
+ *
1088
+ * Marlin automatically computes skew factors from these measurements.
1089
+ * Skew factors may also be computed and set manually:
1090
+ *
1091
+ *  - Compute AB     : SQRT(2*AC*AC+2*BD*BD-4*AD*AD)/2
1092
+ *  - XY_SKEW_FACTOR : TAN(PI/2-ACOS((AC*AC-AB*AB-AD*AD)/(2*AB*AD)))
1093
+ *
1094
+ * If desired, follow the same procedure for XZ and YZ.
1095
+ * Use these diagrams for reference:
1096
+ *
1097
+ *    Y                     Z                     Z
1098
+ *    ^     B-------C       ^     B-------C       ^     B-------C
1099
+ *    |    /       /        |    /       /        |    /       /
1100
+ *    |   /       /         |   /       /         |   /       /
1101
+ *    |  A-------D          |  A-------D          |  A-------D
1102
+ *    +-------------->X     +-------------->X     +-------------->Y
1103
+ *     XY_SKEW_FACTOR        XZ_SKEW_FACTOR        YZ_SKEW_FACTOR
1104
+ */
1105
+//#define SKEW_CORRECTION
1106
+
1107
+#if ENABLED(SKEW_CORRECTION)
1108
+  // Input all length measurements here:
1109
+  #define XY_DIAG_AC 282.8427124746
1110
+  #define XY_DIAG_BD 282.8427124746
1111
+  #define XY_SIDE_AD 200
1112
+
1113
+  // Or, set the default skew factors directly here
1114
+  // to override the above measurements:
1115
+  #define XY_SKEW_FACTOR 0.0
1116
+
1117
+  //#define SKEW_CORRECTION_FOR_Z
1118
+  #if ENABLED(SKEW_CORRECTION_FOR_Z)
1119
+    #define XZ_DIAG_AC 282.8427124746
1120
+    #define XZ_DIAG_BD 282.8427124746
1121
+    #define YZ_DIAG_AC 282.8427124746
1122
+    #define YZ_DIAG_BD 282.8427124746
1123
+    #define YZ_SIDE_AD 200
1124
+    #define XZ_SKEW_FACTOR 0.0
1125
+    #define YZ_SKEW_FACTOR 0.0
1126
+  #endif
1127
+
1128
+  // Enable this option for M852 to set skew at runtime
1129
+  //#define SKEW_CORRECTION_GCODE
1130
+#endif
1131
+
1075
 //=============================================================================
1132
 //=============================================================================
1076
 //============================= Additional Features ===========================
1133
 //============================= Additional Features ===========================
1077
 //=============================================================================
1134
 //=============================================================================

+ 58
- 1
Marlin/example_configurations/Micromake/C1/basic/Configuration.h View File

836
 //===========================================================================
836
 //===========================================================================
837
 //=============================== Bed Leveling ==============================
837
 //=============================== Bed Leveling ==============================
838
 //===========================================================================
838
 //===========================================================================
839
-// @section bedlevel
839
+// @section calibrate
840
 
840
 
841
 /**
841
 /**
842
  * Choose one of the options below to enable G29 Bed Leveling. The parameters
842
  * Choose one of the options below to enable G29 Bed Leveling. The parameters
1048
 #define HOMING_FEEDRATE_XY (50*60)
1048
 #define HOMING_FEEDRATE_XY (50*60)
1049
 #define HOMING_FEEDRATE_Z  (4*60)
1049
 #define HOMING_FEEDRATE_Z  (4*60)
1050
 
1050
 
1051
+// @section calibrate
1052
+
1053
+/**
1054
+ * Bed Skew Compensation
1055
+ *
1056
+ * This feature corrects for misalignment in the XYZ axes.
1057
+ *
1058
+ * Take the following steps to get the bed skew in the XY plane:
1059
+ *  1. Print a test square (e.g., https://www.thingiverse.com/thing:2563185)
1060
+ *  2. For XY_DIAG_AC measure the diagonal A to C
1061
+ *  3. For XY_DIAG_BD measure the diagonal B to D
1062
+ *  4. For XY_SIDE_AD measure the edge A to D
1063
+ *
1064
+ * Marlin automatically computes skew factors from these measurements.
1065
+ * Skew factors may also be computed and set manually:
1066
+ *
1067
+ *  - Compute AB     : SQRT(2*AC*AC+2*BD*BD-4*AD*AD)/2
1068
+ *  - XY_SKEW_FACTOR : TAN(PI/2-ACOS((AC*AC-AB*AB-AD*AD)/(2*AB*AD)))
1069
+ *
1070
+ * If desired, follow the same procedure for XZ and YZ.
1071
+ * Use these diagrams for reference:
1072
+ *
1073
+ *    Y                     Z                     Z
1074
+ *    ^     B-------C       ^     B-------C       ^     B-------C
1075
+ *    |    /       /        |    /       /        |    /       /
1076
+ *    |   /       /         |   /       /         |   /       /
1077
+ *    |  A-------D          |  A-------D          |  A-------D
1078
+ *    +-------------->X     +-------------->X     +-------------->Y
1079
+ *     XY_SKEW_FACTOR        XZ_SKEW_FACTOR        YZ_SKEW_FACTOR
1080
+ */
1081
+//#define SKEW_CORRECTION
1082
+
1083
+#if ENABLED(SKEW_CORRECTION)
1084
+  // Input all length measurements here:
1085
+  #define XY_DIAG_AC 282.8427124746
1086
+  #define XY_DIAG_BD 282.8427124746
1087
+  #define XY_SIDE_AD 200
1088
+
1089
+  // Or, set the default skew factors directly here
1090
+  // to override the above measurements:
1091
+  #define XY_SKEW_FACTOR 0.0
1092
+
1093
+  //#define SKEW_CORRECTION_FOR_Z
1094
+  #if ENABLED(SKEW_CORRECTION_FOR_Z)
1095
+    #define XZ_DIAG_AC 282.8427124746
1096
+    #define XZ_DIAG_BD 282.8427124746
1097
+    #define YZ_DIAG_AC 282.8427124746
1098
+    #define YZ_DIAG_BD 282.8427124746
1099
+    #define YZ_SIDE_AD 200
1100
+    #define XZ_SKEW_FACTOR 0.0
1101
+    #define YZ_SKEW_FACTOR 0.0
1102
+  #endif
1103
+
1104
+  // Enable this option for M852 to set skew at runtime
1105
+  //#define SKEW_CORRECTION_GCODE
1106
+#endif
1107
+
1051
 //=============================================================================
1108
 //=============================================================================
1052
 //============================= Additional Features ===========================
1109
 //============================= Additional Features ===========================
1053
 //=============================================================================
1110
 //=============================================================================

+ 58
- 1
Marlin/example_configurations/Micromake/C1/enhanced/Configuration.h View File

836
 //===========================================================================
836
 //===========================================================================
837
 //=============================== Bed Leveling ==============================
837
 //=============================== Bed Leveling ==============================
838
 //===========================================================================
838
 //===========================================================================
839
-// @section bedlevel
839
+// @section calibrate
840
 
840
 
841
 /**
841
 /**
842
  * Choose one of the options below to enable G29 Bed Leveling. The parameters
842
  * Choose one of the options below to enable G29 Bed Leveling. The parameters
1048
 #define HOMING_FEEDRATE_XY (50*60)
1048
 #define HOMING_FEEDRATE_XY (50*60)
1049
 #define HOMING_FEEDRATE_Z  (4*60)
1049
 #define HOMING_FEEDRATE_Z  (4*60)
1050
 
1050
 
1051
+// @section calibrate
1052
+
1053
+/**
1054
+ * Bed Skew Compensation
1055
+ *
1056
+ * This feature corrects for misalignment in the XYZ axes.
1057
+ *
1058
+ * Take the following steps to get the bed skew in the XY plane:
1059
+ *  1. Print a test square (e.g., https://www.thingiverse.com/thing:2563185)
1060
+ *  2. For XY_DIAG_AC measure the diagonal A to C
1061
+ *  3. For XY_DIAG_BD measure the diagonal B to D
1062
+ *  4. For XY_SIDE_AD measure the edge A to D
1063
+ *
1064
+ * Marlin automatically computes skew factors from these measurements.
1065
+ * Skew factors may also be computed and set manually:
1066
+ *
1067
+ *  - Compute AB     : SQRT(2*AC*AC+2*BD*BD-4*AD*AD)/2
1068
+ *  - XY_SKEW_FACTOR : TAN(PI/2-ACOS((AC*AC-AB*AB-AD*AD)/(2*AB*AD)))
1069
+ *
1070
+ * If desired, follow the same procedure for XZ and YZ.
1071
+ * Use these diagrams for reference:
1072
+ *
1073
+ *    Y                     Z                     Z
1074
+ *    ^     B-------C       ^     B-------C       ^     B-------C
1075
+ *    |    /       /        |    /       /        |    /       /
1076
+ *    |   /       /         |   /       /         |   /       /
1077
+ *    |  A-------D          |  A-------D          |  A-------D
1078
+ *    +-------------->X     +-------------->X     +-------------->Y
1079
+ *     XY_SKEW_FACTOR        XZ_SKEW_FACTOR        YZ_SKEW_FACTOR
1080
+ */
1081
+//#define SKEW_CORRECTION
1082
+
1083
+#if ENABLED(SKEW_CORRECTION)
1084
+  // Input all length measurements here:
1085
+  #define XY_DIAG_AC 282.8427124746
1086
+  #define XY_DIAG_BD 282.8427124746
1087
+  #define XY_SIDE_AD 200
1088
+
1089
+  // Or, set the default skew factors directly here
1090
+  // to override the above measurements:
1091
+  #define XY_SKEW_FACTOR 0.0
1092
+
1093
+  //#define SKEW_CORRECTION_FOR_Z
1094
+  #if ENABLED(SKEW_CORRECTION_FOR_Z)
1095
+    #define XZ_DIAG_AC 282.8427124746
1096
+    #define XZ_DIAG_BD 282.8427124746
1097
+    #define YZ_DIAG_AC 282.8427124746
1098
+    #define YZ_DIAG_BD 282.8427124746
1099
+    #define YZ_SIDE_AD 200
1100
+    #define XZ_SKEW_FACTOR 0.0
1101
+    #define YZ_SKEW_FACTOR 0.0
1102
+  #endif
1103
+
1104
+  // Enable this option for M852 to set skew at runtime
1105
+  //#define SKEW_CORRECTION_GCODE
1106
+#endif
1107
+
1051
 //=============================================================================
1108
 //=============================================================================
1052
 //============================= Additional Features ===========================
1109
 //============================= Additional Features ===========================
1053
 //=============================================================================
1110
 //=============================================================================

+ 58
- 1
Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h View File

832
 //===========================================================================
832
 //===========================================================================
833
 //=============================== Bed Leveling ==============================
833
 //=============================== Bed Leveling ==============================
834
 //===========================================================================
834
 //===========================================================================
835
-// @section bedlevel
835
+// @section calibrate
836
 
836
 
837
 /**
837
 /**
838
  * Choose one of the options below to enable G29 Bed Leveling. The parameters
838
  * Choose one of the options below to enable G29 Bed Leveling. The parameters
1044
 #define HOMING_FEEDRATE_XY (50*60)
1044
 #define HOMING_FEEDRATE_XY (50*60)
1045
 #define HOMING_FEEDRATE_Z  (4*60)
1045
 #define HOMING_FEEDRATE_Z  (4*60)
1046
 
1046
 
1047
+// @section calibrate
1048
+
1049
+/**
1050
+ * Bed Skew Compensation
1051
+ *
1052
+ * This feature corrects for misalignment in the XYZ axes.
1053
+ *
1054
+ * Take the following steps to get the bed skew in the XY plane:
1055
+ *  1. Print a test square (e.g., https://www.thingiverse.com/thing:2563185)
1056
+ *  2. For XY_DIAG_AC measure the diagonal A to C
1057
+ *  3. For XY_DIAG_BD measure the diagonal B to D
1058
+ *  4. For XY_SIDE_AD measure the edge A to D
1059
+ *
1060
+ * Marlin automatically computes skew factors from these measurements.
1061
+ * Skew factors may also be computed and set manually:
1062
+ *
1063
+ *  - Compute AB     : SQRT(2*AC*AC+2*BD*BD-4*AD*AD)/2
1064
+ *  - XY_SKEW_FACTOR : TAN(PI/2-ACOS((AC*AC-AB*AB-AD*AD)/(2*AB*AD)))
1065
+ *
1066
+ * If desired, follow the same procedure for XZ and YZ.
1067
+ * Use these diagrams for reference:
1068
+ *
1069
+ *    Y                     Z                     Z
1070
+ *    ^     B-------C       ^     B-------C       ^     B-------C
1071
+ *    |    /       /        |    /       /        |    /       /
1072
+ *    |   /       /         |   /       /         |   /       /
1073
+ *    |  A-------D          |  A-------D          |  A-------D
1074
+ *    +-------------->X     +-------------->X     +-------------->Y
1075
+ *     XY_SKEW_FACTOR        XZ_SKEW_FACTOR        YZ_SKEW_FACTOR
1076
+ */
1077
+//#define SKEW_CORRECTION
1078
+
1079
+#if ENABLED(SKEW_CORRECTION)
1080
+  // Input all length measurements here:
1081
+  #define XY_DIAG_AC 282.8427124746
1082
+  #define XY_DIAG_BD 282.8427124746
1083
+  #define XY_SIDE_AD 200
1084
+
1085
+  // Or, set the default skew factors directly here
1086
+  // to override the above measurements:
1087
+  #define XY_SKEW_FACTOR 0.0
1088
+
1089
+  //#define SKEW_CORRECTION_FOR_Z
1090
+  #if ENABLED(SKEW_CORRECTION_FOR_Z)
1091
+    #define XZ_DIAG_AC 282.8427124746
1092
+    #define XZ_DIAG_BD 282.8427124746
1093
+    #define YZ_DIAG_AC 282.8427124746
1094
+    #define YZ_DIAG_BD 282.8427124746
1095
+    #define YZ_SIDE_AD 200
1096
+    #define XZ_SKEW_FACTOR 0.0
1097
+    #define YZ_SKEW_FACTOR 0.0
1098
+  #endif
1099
+
1100
+  // Enable this option for M852 to set skew at runtime
1101
+  //#define SKEW_CORRECTION_GCODE
1102
+#endif
1103
+
1047
 //=============================================================================
1104
 //=============================================================================
1048
 //============================= Additional Features ===========================
1105
 //============================= Additional Features ===========================
1049
 //=============================================================================
1106
 //=============================================================================

+ 58
- 1
Marlin/example_configurations/RigidBot/Configuration.h View File

830
 //===========================================================================
830
 //===========================================================================
831
 //=============================== Bed Leveling ==============================
831
 //=============================== Bed Leveling ==============================
832
 //===========================================================================
832
 //===========================================================================
833
-// @section bedlevel
833
+// @section calibrate
834
 
834
 
835
 /**
835
 /**
836
  * Choose one of the options below to enable G29 Bed Leveling. The parameters
836
  * Choose one of the options below to enable G29 Bed Leveling. The parameters
1042
 #define HOMING_FEEDRATE_XY (50*60)
1042
 #define HOMING_FEEDRATE_XY (50*60)
1043
 #define HOMING_FEEDRATE_Z  (15*60)
1043
 #define HOMING_FEEDRATE_Z  (15*60)
1044
 
1044
 
1045
+// @section calibrate
1046
+
1047
+/**
1048
+ * Bed Skew Compensation
1049
+ *
1050
+ * This feature corrects for misalignment in the XYZ axes.
1051
+ *
1052
+ * Take the following steps to get the bed skew in the XY plane:
1053
+ *  1. Print a test square (e.g., https://www.thingiverse.com/thing:2563185)
1054
+ *  2. For XY_DIAG_AC measure the diagonal A to C
1055
+ *  3. For XY_DIAG_BD measure the diagonal B to D
1056
+ *  4. For XY_SIDE_AD measure the edge A to D
1057
+ *
1058
+ * Marlin automatically computes skew factors from these measurements.
1059
+ * Skew factors may also be computed and set manually:
1060
+ *
1061
+ *  - Compute AB     : SQRT(2*AC*AC+2*BD*BD-4*AD*AD)/2
1062
+ *  - XY_SKEW_FACTOR : TAN(PI/2-ACOS((AC*AC-AB*AB-AD*AD)/(2*AB*AD)))
1063
+ *
1064
+ * If desired, follow the same procedure for XZ and YZ.
1065
+ * Use these diagrams for reference:
1066
+ *
1067
+ *    Y                     Z                     Z
1068
+ *    ^     B-------C       ^     B-------C       ^     B-------C
1069
+ *    |    /       /        |    /       /        |    /       /
1070
+ *    |   /       /         |   /       /         |   /       /
1071
+ *    |  A-------D          |  A-------D          |  A-------D
1072
+ *    +-------------->X     +-------------->X     +-------------->Y
1073
+ *     XY_SKEW_FACTOR        XZ_SKEW_FACTOR        YZ_SKEW_FACTOR
1074
+ */
1075
+//#define SKEW_CORRECTION
1076
+
1077
+#if ENABLED(SKEW_CORRECTION)
1078
+  // Input all length measurements here:
1079
+  #define XY_DIAG_AC 282.8427124746
1080
+  #define XY_DIAG_BD 282.8427124746
1081
+  #define XY_SIDE_AD 200
1082
+
1083
+  // Or, set the default skew factors directly here
1084
+  // to override the above measurements:
1085
+  #define XY_SKEW_FACTOR 0.0
1086
+
1087
+  //#define SKEW_CORRECTION_FOR_Z
1088
+  #if ENABLED(SKEW_CORRECTION_FOR_Z)
1089
+    #define XZ_DIAG_AC 282.8427124746
1090
+    #define XZ_DIAG_BD 282.8427124746
1091
+    #define YZ_DIAG_AC 282.8427124746
1092
+    #define YZ_DIAG_BD 282.8427124746
1093
+    #define YZ_SIDE_AD 200
1094
+    #define XZ_SKEW_FACTOR 0.0
1095
+    #define YZ_SKEW_FACTOR 0.0
1096
+  #endif
1097
+
1098
+  // Enable this option for M852 to set skew at runtime
1099
+  //#define SKEW_CORRECTION_GCODE
1100
+#endif
1101
+
1045
 //=============================================================================
1102
 //=============================================================================
1046
 //============================= Additional Features ===========================
1103
 //============================= Additional Features ===========================
1047
 //=============================================================================
1104
 //=============================================================================

+ 58
- 1
Marlin/example_configurations/SCARA/Configuration.h View File

844
 //===========================================================================
844
 //===========================================================================
845
 //=============================== Bed Leveling ==============================
845
 //=============================== Bed Leveling ==============================
846
 //===========================================================================
846
 //===========================================================================
847
-// @section bedlevel
847
+// @section calibrate
848
 
848
 
849
 /**
849
 /**
850
  * Choose one of the options below to enable G29 Bed Leveling. The parameters
850
  * Choose one of the options below to enable G29 Bed Leveling. The parameters
1056
 #define HOMING_FEEDRATE_XY (40*60)
1056
 #define HOMING_FEEDRATE_XY (40*60)
1057
 #define HOMING_FEEDRATE_Z  (10*60)
1057
 #define HOMING_FEEDRATE_Z  (10*60)
1058
 
1058
 
1059
+// @section calibrate
1060
+
1061
+/**
1062
+ * Bed Skew Compensation
1063
+ *
1064
+ * This feature corrects for misalignment in the XYZ axes.
1065
+ *
1066
+ * Take the following steps to get the bed skew in the XY plane:
1067
+ *  1. Print a test square (e.g., https://www.thingiverse.com/thing:2563185)
1068
+ *  2. For XY_DIAG_AC measure the diagonal A to C
1069
+ *  3. For XY_DIAG_BD measure the diagonal B to D
1070
+ *  4. For XY_SIDE_AD measure the edge A to D
1071
+ *
1072
+ * Marlin automatically computes skew factors from these measurements.
1073
+ * Skew factors may also be computed and set manually:
1074
+ *
1075
+ *  - Compute AB     : SQRT(2*AC*AC+2*BD*BD-4*AD*AD)/2
1076
+ *  - XY_SKEW_FACTOR : TAN(PI/2-ACOS((AC*AC-AB*AB-AD*AD)/(2*AB*AD)))
1077
+ *
1078
+ * If desired, follow the same procedure for XZ and YZ.
1079
+ * Use these diagrams for reference:
1080
+ *
1081
+ *    Y                     Z                     Z
1082
+ *    ^     B-------C       ^     B-------C       ^     B-------C
1083
+ *    |    /       /        |    /       /        |    /       /
1084
+ *    |   /       /         |   /       /         |   /       /
1085
+ *    |  A-------D          |  A-------D          |  A-------D
1086
+ *    +-------------->X     +-------------->X     +-------------->Y
1087
+ *     XY_SKEW_FACTOR        XZ_SKEW_FACTOR        YZ_SKEW_FACTOR
1088
+ */
1089
+//#define SKEW_CORRECTION
1090
+
1091
+#if ENABLED(SKEW_CORRECTION)
1092
+  // Input all length measurements here:
1093
+  #define XY_DIAG_AC 282.8427124746
1094
+  #define XY_DIAG_BD 282.8427124746
1095
+  #define XY_SIDE_AD 200
1096
+
1097
+  // Or, set the default skew factors directly here
1098
+  // to override the above measurements:
1099
+  #define XY_SKEW_FACTOR 0.0
1100
+
1101
+  //#define SKEW_CORRECTION_FOR_Z
1102
+  #if ENABLED(SKEW_CORRECTION_FOR_Z)
1103
+    #define XZ_DIAG_AC 282.8427124746
1104
+    #define XZ_DIAG_BD 282.8427124746
1105
+    #define YZ_DIAG_AC 282.8427124746
1106
+    #define YZ_DIAG_BD 282.8427124746
1107
+    #define YZ_SIDE_AD 200
1108
+    #define XZ_SKEW_FACTOR 0.0
1109
+    #define YZ_SKEW_FACTOR 0.0
1110
+  #endif
1111
+
1112
+  // Enable this option for M852 to set skew at runtime
1113
+  //#define SKEW_CORRECTION_GCODE
1114
+#endif
1115
+
1059
 //=============================================================================
1116
 //=============================================================================
1060
 //============================= Additional Features ===========================
1117
 //============================= Additional Features ===========================
1061
 //=============================================================================
1118
 //=============================================================================

+ 58
- 1
Marlin/example_configurations/Sanguinololu/Configuration.h View File

863
 //===========================================================================
863
 //===========================================================================
864
 //=============================== Bed Leveling ==============================
864
 //=============================== Bed Leveling ==============================
865
 //===========================================================================
865
 //===========================================================================
866
-// @section bedlevel
866
+// @section calibrate
867
 
867
 
868
 /**
868
 /**
869
  * Choose one of the options below to enable G29 Bed Leveling. The parameters
869
  * Choose one of the options below to enable G29 Bed Leveling. The parameters
1075
 #define HOMING_FEEDRATE_XY (50*60)
1075
 #define HOMING_FEEDRATE_XY (50*60)
1076
 #define HOMING_FEEDRATE_Z  (6*60)
1076
 #define HOMING_FEEDRATE_Z  (6*60)
1077
 
1077
 
1078
+// @section calibrate
1079
+
1080
+/**
1081
+ * Bed Skew Compensation
1082
+ *
1083
+ * This feature corrects for misalignment in the XYZ axes.
1084
+ *
1085
+ * Take the following steps to get the bed skew in the XY plane:
1086
+ *  1. Print a test square (e.g., https://www.thingiverse.com/thing:2563185)
1087
+ *  2. For XY_DIAG_AC measure the diagonal A to C
1088
+ *  3. For XY_DIAG_BD measure the diagonal B to D
1089
+ *  4. For XY_SIDE_AD measure the edge A to D
1090
+ *
1091
+ * Marlin automatically computes skew factors from these measurements.
1092
+ * Skew factors may also be computed and set manually:
1093
+ *
1094
+ *  - Compute AB     : SQRT(2*AC*AC+2*BD*BD-4*AD*AD)/2
1095
+ *  - XY_SKEW_FACTOR : TAN(PI/2-ACOS((AC*AC-AB*AB-AD*AD)/(2*AB*AD)))
1096
+ *
1097
+ * If desired, follow the same procedure for XZ and YZ.
1098
+ * Use these diagrams for reference:
1099
+ *
1100
+ *    Y                     Z                     Z
1101
+ *    ^     B-------C       ^     B-------C       ^     B-------C
1102
+ *    |    /       /        |    /       /        |    /       /
1103
+ *    |   /       /         |   /       /         |   /       /
1104
+ *    |  A-------D          |  A-------D          |  A-------D
1105
+ *    +-------------->X     +-------------->X     +-------------->Y
1106
+ *     XY_SKEW_FACTOR        XZ_SKEW_FACTOR        YZ_SKEW_FACTOR
1107
+ */
1108
+//#define SKEW_CORRECTION
1109
+
1110
+#if ENABLED(SKEW_CORRECTION)
1111
+  // Input all length measurements here:
1112
+  #define XY_DIAG_AC 282.8427124746
1113
+  #define XY_DIAG_BD 282.8427124746
1114
+  #define XY_SIDE_AD 200
1115
+
1116
+  // Or, set the default skew factors directly here
1117
+  // to override the above measurements:
1118
+  #define XY_SKEW_FACTOR 0.0
1119
+
1120
+  //#define SKEW_CORRECTION_FOR_Z
1121
+  #if ENABLED(SKEW_CORRECTION_FOR_Z)
1122
+    #define XZ_DIAG_AC 282.8427124746
1123
+    #define XZ_DIAG_BD 282.8427124746
1124
+    #define YZ_DIAG_AC 282.8427124746
1125
+    #define YZ_DIAG_BD 282.8427124746
1126
+    #define YZ_SIDE_AD 200
1127
+    #define XZ_SKEW_FACTOR 0.0
1128
+    #define YZ_SKEW_FACTOR 0.0
1129
+  #endif
1130
+
1131
+  // Enable this option for M852 to set skew at runtime
1132
+  //#define SKEW_CORRECTION_GCODE
1133
+#endif
1134
+
1078
 //=============================================================================
1135
 //=============================================================================
1079
 //============================= Additional Features ===========================
1136
 //============================= Additional Features ===========================
1080
 //=============================================================================
1137
 //=============================================================================

+ 58
- 1
Marlin/example_configurations/TinyBoy2/Configuration.h View File

888
 //===========================================================================
888
 //===========================================================================
889
 //=============================== Bed Leveling ==============================
889
 //=============================== Bed Leveling ==============================
890
 //===========================================================================
890
 //===========================================================================
891
-// @section bedlevel
891
+// @section calibrate
892
 
892
 
893
 /**
893
 /**
894
  * Choose one of the options below to enable G29 Bed Leveling. The parameters
894
  * Choose one of the options below to enable G29 Bed Leveling. The parameters
1100
 #define HOMING_FEEDRATE_XY (40*60)
1100
 #define HOMING_FEEDRATE_XY (40*60)
1101
 #define HOMING_FEEDRATE_Z  (3*60)
1101
 #define HOMING_FEEDRATE_Z  (3*60)
1102
 
1102
 
1103
+// @section calibrate
1104
+
1105
+/**
1106
+ * Bed Skew Compensation
1107
+ *
1108
+ * This feature corrects for misalignment in the XYZ axes.
1109
+ *
1110
+ * Take the following steps to get the bed skew in the XY plane:
1111
+ *  1. Print a test square (e.g., https://www.thingiverse.com/thing:2563185)
1112
+ *  2. For XY_DIAG_AC measure the diagonal A to C
1113
+ *  3. For XY_DIAG_BD measure the diagonal B to D
1114
+ *  4. For XY_SIDE_AD measure the edge A to D
1115
+ *
1116
+ * Marlin automatically computes skew factors from these measurements.
1117
+ * Skew factors may also be computed and set manually:
1118
+ *
1119
+ *  - Compute AB     : SQRT(2*AC*AC+2*BD*BD-4*AD*AD)/2
1120
+ *  - XY_SKEW_FACTOR : TAN(PI/2-ACOS((AC*AC-AB*AB-AD*AD)/(2*AB*AD)))
1121
+ *
1122
+ * If desired, follow the same procedure for XZ and YZ.
1123
+ * Use these diagrams for reference:
1124
+ *
1125
+ *    Y                     Z                     Z
1126
+ *    ^     B-------C       ^     B-------C       ^     B-------C
1127
+ *    |    /       /        |    /       /        |    /       /
1128
+ *    |   /       /         |   /       /         |   /       /
1129
+ *    |  A-------D          |  A-------D          |  A-------D
1130
+ *    +-------------->X     +-------------->X     +-------------->Y
1131
+ *     XY_SKEW_FACTOR        XZ_SKEW_FACTOR        YZ_SKEW_FACTOR
1132
+ */
1133
+//#define SKEW_CORRECTION
1134
+
1135
+#if ENABLED(SKEW_CORRECTION)
1136
+  // Input all length measurements here:
1137
+  #define XY_DIAG_AC 282.8427124746
1138
+  #define XY_DIAG_BD 282.8427124746
1139
+  #define XY_SIDE_AD 200
1140
+
1141
+  // Or, set the default skew factors directly here
1142
+  // to override the above measurements:
1143
+  #define XY_SKEW_FACTOR 0.0
1144
+
1145
+  //#define SKEW_CORRECTION_FOR_Z
1146
+  #if ENABLED(SKEW_CORRECTION_FOR_Z)
1147
+    #define XZ_DIAG_AC 282.8427124746
1148
+    #define XZ_DIAG_BD 282.8427124746
1149
+    #define YZ_DIAG_AC 282.8427124746
1150
+    #define YZ_DIAG_BD 282.8427124746
1151
+    #define YZ_SIDE_AD 200
1152
+    #define XZ_SKEW_FACTOR 0.0
1153
+    #define YZ_SKEW_FACTOR 0.0
1154
+  #endif
1155
+
1156
+  // Enable this option for M852 to set skew at runtime
1157
+  //#define SKEW_CORRECTION_GCODE
1158
+#endif
1159
+
1103
 //=============================================================================
1160
 //=============================================================================
1104
 //============================= Additional Features ===========================
1161
 //============================= Additional Features ===========================
1105
 //=============================================================================
1162
 //=============================================================================

+ 58
- 1
Marlin/example_configurations/Velleman/K8200/Configuration.h View File

862
 //===========================================================================
862
 //===========================================================================
863
 //=============================== Bed Leveling ==============================
863
 //=============================== Bed Leveling ==============================
864
 //===========================================================================
864
 //===========================================================================
865
-// @section bedlevel
865
+// @section calibrate
866
 
866
 
867
 /**
867
 /**
868
  * Choose one of the options below to enable G29 Bed Leveling. The parameters
868
  * Choose one of the options below to enable G29 Bed Leveling. The parameters
1074
 #define HOMING_FEEDRATE_XY (50*60)
1074
 #define HOMING_FEEDRATE_XY (50*60)
1075
 #define HOMING_FEEDRATE_Z  (4*60)
1075
 #define HOMING_FEEDRATE_Z  (4*60)
1076
 
1076
 
1077
+// @section calibrate
1078
+
1079
+/**
1080
+ * Bed Skew Compensation
1081
+ *
1082
+ * This feature corrects for misalignment in the XYZ axes.
1083
+ *
1084
+ * Take the following steps to get the bed skew in the XY plane:
1085
+ *  1. Print a test square (e.g., https://www.thingiverse.com/thing:2563185)
1086
+ *  2. For XY_DIAG_AC measure the diagonal A to C
1087
+ *  3. For XY_DIAG_BD measure the diagonal B to D
1088
+ *  4. For XY_SIDE_AD measure the edge A to D
1089
+ *
1090
+ * Marlin automatically computes skew factors from these measurements.
1091
+ * Skew factors may also be computed and set manually:
1092
+ *
1093
+ *  - Compute AB     : SQRT(2*AC*AC+2*BD*BD-4*AD*AD)/2
1094
+ *  - XY_SKEW_FACTOR : TAN(PI/2-ACOS((AC*AC-AB*AB-AD*AD)/(2*AB*AD)))
1095
+ *
1096
+ * If desired, follow the same procedure for XZ and YZ.
1097
+ * Use these diagrams for reference:
1098
+ *
1099
+ *    Y                     Z                     Z
1100
+ *    ^     B-------C       ^     B-------C       ^     B-------C
1101
+ *    |    /       /        |    /       /        |    /       /
1102
+ *    |   /       /         |   /       /         |   /       /
1103
+ *    |  A-------D          |  A-------D          |  A-------D
1104
+ *    +-------------->X     +-------------->X     +-------------->Y
1105
+ *     XY_SKEW_FACTOR        XZ_SKEW_FACTOR        YZ_SKEW_FACTOR
1106
+ */
1107
+//#define SKEW_CORRECTION
1108
+
1109
+#if ENABLED(SKEW_CORRECTION)
1110
+  // Input all length measurements here:
1111
+  #define XY_DIAG_AC 282.8427124746
1112
+  #define XY_DIAG_BD 282.8427124746
1113
+  #define XY_SIDE_AD 200
1114
+
1115
+  // Or, set the default skew factors directly here
1116
+  // to override the above measurements:
1117
+  #define XY_SKEW_FACTOR 0.0
1118
+
1119
+  //#define SKEW_CORRECTION_FOR_Z
1120
+  #if ENABLED(SKEW_CORRECTION_FOR_Z)
1121
+    #define XZ_DIAG_AC 282.8427124746
1122
+    #define XZ_DIAG_BD 282.8427124746
1123
+    #define YZ_DIAG_AC 282.8427124746
1124
+    #define YZ_DIAG_BD 282.8427124746
1125
+    #define YZ_SIDE_AD 200
1126
+    #define XZ_SKEW_FACTOR 0.0
1127
+    #define YZ_SKEW_FACTOR 0.0
1128
+  #endif
1129
+
1130
+  // Enable this option for M852 to set skew at runtime
1131
+  //#define SKEW_CORRECTION_GCODE
1132
+#endif
1133
+
1077
 //=============================================================================
1134
 //=============================================================================
1078
 //============================= Additional Features ===========================
1135
 //============================= Additional Features ===========================
1079
 //=============================================================================
1136
 //=============================================================================

+ 58
- 1
Marlin/example_configurations/Velleman/K8400/Configuration.h View File

832
 //===========================================================================
832
 //===========================================================================
833
 //=============================== Bed Leveling ==============================
833
 //=============================== Bed Leveling ==============================
834
 //===========================================================================
834
 //===========================================================================
835
-// @section bedlevel
835
+// @section calibrate
836
 
836
 
837
 /**
837
 /**
838
  * Choose one of the options below to enable G29 Bed Leveling. The parameters
838
  * Choose one of the options below to enable G29 Bed Leveling. The parameters
1044
 #define HOMING_FEEDRATE_XY (50*60)
1044
 #define HOMING_FEEDRATE_XY (50*60)
1045
 #define HOMING_FEEDRATE_Z  (8*60)
1045
 #define HOMING_FEEDRATE_Z  (8*60)
1046
 
1046
 
1047
+// @section calibrate
1048
+
1049
+/**
1050
+ * Bed Skew Compensation
1051
+ *
1052
+ * This feature corrects for misalignment in the XYZ axes.
1053
+ *
1054
+ * Take the following steps to get the bed skew in the XY plane:
1055
+ *  1. Print a test square (e.g., https://www.thingiverse.com/thing:2563185)
1056
+ *  2. For XY_DIAG_AC measure the diagonal A to C
1057
+ *  3. For XY_DIAG_BD measure the diagonal B to D
1058
+ *  4. For XY_SIDE_AD measure the edge A to D
1059
+ *
1060
+ * Marlin automatically computes skew factors from these measurements.
1061
+ * Skew factors may also be computed and set manually:
1062
+ *
1063
+ *  - Compute AB     : SQRT(2*AC*AC+2*BD*BD-4*AD*AD)/2
1064
+ *  - XY_SKEW_FACTOR : TAN(PI/2-ACOS((AC*AC-AB*AB-AD*AD)/(2*AB*AD)))
1065
+ *
1066
+ * If desired, follow the same procedure for XZ and YZ.
1067
+ * Use these diagrams for reference:
1068
+ *
1069
+ *    Y                     Z                     Z
1070
+ *    ^     B-------C       ^     B-------C       ^     B-------C
1071
+ *    |    /       /        |    /       /        |    /       /
1072
+ *    |   /       /         |   /       /         |   /       /
1073
+ *    |  A-------D          |  A-------D          |  A-------D
1074
+ *    +-------------->X     +-------------->X     +-------------->Y
1075
+ *     XY_SKEW_FACTOR        XZ_SKEW_FACTOR        YZ_SKEW_FACTOR
1076
+ */
1077
+//#define SKEW_CORRECTION
1078
+
1079
+#if ENABLED(SKEW_CORRECTION)
1080
+  // Input all length measurements here:
1081
+  #define XY_DIAG_AC 282.8427124746
1082
+  #define XY_DIAG_BD 282.8427124746
1083
+  #define XY_SIDE_AD 200
1084
+
1085
+  // Or, set the default skew factors directly here
1086
+  // to override the above measurements:
1087
+  #define XY_SKEW_FACTOR 0.0
1088
+
1089
+  //#define SKEW_CORRECTION_FOR_Z
1090
+  #if ENABLED(SKEW_CORRECTION_FOR_Z)
1091
+    #define XZ_DIAG_AC 282.8427124746
1092
+    #define XZ_DIAG_BD 282.8427124746
1093
+    #define YZ_DIAG_AC 282.8427124746
1094
+    #define YZ_DIAG_BD 282.8427124746
1095
+    #define YZ_SIDE_AD 200
1096
+    #define XZ_SKEW_FACTOR 0.0
1097
+    #define YZ_SKEW_FACTOR 0.0
1098
+  #endif
1099
+
1100
+  // Enable this option for M852 to set skew at runtime
1101
+  //#define SKEW_CORRECTION_GCODE
1102
+#endif
1103
+
1047
 //=============================================================================
1104
 //=============================================================================
1048
 //============================= Additional Features ===========================
1105
 //============================= Additional Features ===========================
1049
 //=============================================================================
1106
 //=============================================================================

+ 58
- 1
Marlin/example_configurations/Velleman/K8400/Dual-head/Configuration.h View File

832
 //===========================================================================
832
 //===========================================================================
833
 //=============================== Bed Leveling ==============================
833
 //=============================== Bed Leveling ==============================
834
 //===========================================================================
834
 //===========================================================================
835
-// @section bedlevel
835
+// @section calibrate
836
 
836
 
837
 /**
837
 /**
838
  * Choose one of the options below to enable G29 Bed Leveling. The parameters
838
  * Choose one of the options below to enable G29 Bed Leveling. The parameters
1044
 #define HOMING_FEEDRATE_XY (50*60)
1044
 #define HOMING_FEEDRATE_XY (50*60)
1045
 #define HOMING_FEEDRATE_Z  (8*60)
1045
 #define HOMING_FEEDRATE_Z  (8*60)
1046
 
1046
 
1047
+// @section calibrate
1048
+
1049
+/**
1050
+ * Bed Skew Compensation
1051
+ *
1052
+ * This feature corrects for misalignment in the XYZ axes.
1053
+ *
1054
+ * Take the following steps to get the bed skew in the XY plane:
1055
+ *  1. Print a test square (e.g., https://www.thingiverse.com/thing:2563185)
1056
+ *  2. For XY_DIAG_AC measure the diagonal A to C
1057
+ *  3. For XY_DIAG_BD measure the diagonal B to D
1058
+ *  4. For XY_SIDE_AD measure the edge A to D
1059
+ *
1060
+ * Marlin automatically computes skew factors from these measurements.
1061
+ * Skew factors may also be computed and set manually:
1062
+ *
1063
+ *  - Compute AB     : SQRT(2*AC*AC+2*BD*BD-4*AD*AD)/2
1064
+ *  - XY_SKEW_FACTOR : TAN(PI/2-ACOS((AC*AC-AB*AB-AD*AD)/(2*AB*AD)))
1065
+ *
1066
+ * If desired, follow the same procedure for XZ and YZ.
1067
+ * Use these diagrams for reference:
1068
+ *
1069
+ *    Y                     Z                     Z
1070
+ *    ^     B-------C       ^     B-------C       ^     B-------C
1071
+ *    |    /       /        |    /       /        |    /       /
1072
+ *    |   /       /         |   /       /         |   /       /
1073
+ *    |  A-------D          |  A-------D          |  A-------D
1074
+ *    +-------------->X     +-------------->X     +-------------->Y
1075
+ *     XY_SKEW_FACTOR        XZ_SKEW_FACTOR        YZ_SKEW_FACTOR
1076
+ */
1077
+//#define SKEW_CORRECTION
1078
+
1079
+#if ENABLED(SKEW_CORRECTION)
1080
+  // Input all length measurements here:
1081
+  #define XY_DIAG_AC 282.8427124746
1082
+  #define XY_DIAG_BD 282.8427124746
1083
+  #define XY_SIDE_AD 200
1084
+
1085
+  // Or, set the default skew factors directly here
1086
+  // to override the above measurements:
1087
+  #define XY_SKEW_FACTOR 0.0
1088
+
1089
+  //#define SKEW_CORRECTION_FOR_Z
1090
+  #if ENABLED(SKEW_CORRECTION_FOR_Z)
1091
+    #define XZ_DIAG_AC 282.8427124746
1092
+    #define XZ_DIAG_BD 282.8427124746
1093
+    #define YZ_DIAG_AC 282.8427124746
1094
+    #define YZ_DIAG_BD 282.8427124746
1095
+    #define YZ_SIDE_AD 200
1096
+    #define XZ_SKEW_FACTOR 0.0
1097
+    #define YZ_SKEW_FACTOR 0.0
1098
+  #endif
1099
+
1100
+  // Enable this option for M852 to set skew at runtime
1101
+  //#define SKEW_CORRECTION_GCODE
1102
+#endif
1103
+
1047
 //=============================================================================
1104
 //=============================================================================
1048
 //============================= Additional Features ===========================
1105
 //============================= Additional Features ===========================
1049
 //=============================================================================
1106
 //=============================================================================

+ 58
- 1
Marlin/example_configurations/adafruit/ST7565/Configuration.h View File

832
 //===========================================================================
832
 //===========================================================================
833
 //=============================== Bed Leveling ==============================
833
 //=============================== Bed Leveling ==============================
834
 //===========================================================================
834
 //===========================================================================
835
-// @section bedlevel
835
+// @section calibrate
836
 
836
 
837
 /**
837
 /**
838
  * Choose one of the options below to enable G29 Bed Leveling. The parameters
838
  * Choose one of the options below to enable G29 Bed Leveling. The parameters
1044
 #define HOMING_FEEDRATE_XY (50*60)
1044
 #define HOMING_FEEDRATE_XY (50*60)
1045
 #define HOMING_FEEDRATE_Z  (4*60)
1045
 #define HOMING_FEEDRATE_Z  (4*60)
1046
 
1046
 
1047
+// @section calibrate
1048
+
1049
+/**
1050
+ * Bed Skew Compensation
1051
+ *
1052
+ * This feature corrects for misalignment in the XYZ axes.
1053
+ *
1054
+ * Take the following steps to get the bed skew in the XY plane:
1055
+ *  1. Print a test square (e.g., https://www.thingiverse.com/thing:2563185)
1056
+ *  2. For XY_DIAG_AC measure the diagonal A to C
1057
+ *  3. For XY_DIAG_BD measure the diagonal B to D
1058
+ *  4. For XY_SIDE_AD measure the edge A to D
1059
+ *
1060
+ * Marlin automatically computes skew factors from these measurements.
1061
+ * Skew factors may also be computed and set manually:
1062
+ *
1063
+ *  - Compute AB     : SQRT(2*AC*AC+2*BD*BD-4*AD*AD)/2
1064
+ *  - XY_SKEW_FACTOR : TAN(PI/2-ACOS((AC*AC-AB*AB-AD*AD)/(2*AB*AD)))
1065
+ *
1066
+ * If desired, follow the same procedure for XZ and YZ.
1067
+ * Use these diagrams for reference:
1068
+ *
1069
+ *    Y                     Z                     Z
1070
+ *    ^     B-------C       ^     B-------C       ^     B-------C
1071
+ *    |    /       /        |    /       /        |    /       /
1072
+ *    |   /       /         |   /       /         |   /       /
1073
+ *    |  A-------D          |  A-------D          |  A-------D
1074
+ *    +-------------->X     +-------------->X     +-------------->Y
1075
+ *     XY_SKEW_FACTOR        XZ_SKEW_FACTOR        YZ_SKEW_FACTOR
1076
+ */
1077
+//#define SKEW_CORRECTION
1078
+
1079
+#if ENABLED(SKEW_CORRECTION)
1080
+  // Input all length measurements here:
1081
+  #define XY_DIAG_AC 282.8427124746
1082
+  #define XY_DIAG_BD 282.8427124746
1083
+  #define XY_SIDE_AD 200
1084
+
1085
+  // Or, set the default skew factors directly here
1086
+  // to override the above measurements:
1087
+  #define XY_SKEW_FACTOR 0.0
1088
+
1089
+  //#define SKEW_CORRECTION_FOR_Z
1090
+  #if ENABLED(SKEW_CORRECTION_FOR_Z)
1091
+    #define XZ_DIAG_AC 282.8427124746
1092
+    #define XZ_DIAG_BD 282.8427124746
1093
+    #define YZ_DIAG_AC 282.8427124746
1094
+    #define YZ_DIAG_BD 282.8427124746
1095
+    #define YZ_SIDE_AD 200
1096
+    #define XZ_SKEW_FACTOR 0.0
1097
+    #define YZ_SKEW_FACTOR 0.0
1098
+  #endif
1099
+
1100
+  // Enable this option for M852 to set skew at runtime
1101
+  //#define SKEW_CORRECTION_GCODE
1102
+#endif
1103
+
1047
 //=============================================================================
1104
 //=============================================================================
1048
 //============================= Additional Features ===========================
1105
 //============================= Additional Features ===========================
1049
 //=============================================================================
1106
 //=============================================================================

+ 58
- 1
Marlin/example_configurations/delta/FLSUN/auto_calibrate/Configuration.h View File

962
 //===========================================================================
962
 //===========================================================================
963
 //=============================== Bed Leveling ==============================
963
 //=============================== Bed Leveling ==============================
964
 //===========================================================================
964
 //===========================================================================
965
-// @section bedlevel
965
+// @section calibrate
966
 
966
 
967
 /**
967
 /**
968
  * Choose one of the options below to enable G29 Bed Leveling. The parameters
968
  * Choose one of the options below to enable G29 Bed Leveling. The parameters
1177
 // Delta only homes to Z
1177
 // Delta only homes to Z
1178
 #define HOMING_FEEDRATE_Z  (100*60)
1178
 #define HOMING_FEEDRATE_Z  (100*60)
1179
 
1179
 
1180
+// @section calibrate
1181
+
1182
+/**
1183
+ * Bed Skew Compensation
1184
+ *
1185
+ * This feature corrects for misalignment in the XYZ axes.
1186
+ *
1187
+ * Take the following steps to get the bed skew in the XY plane:
1188
+ *  1. Print a test square (e.g., https://www.thingiverse.com/thing:2563185)
1189
+ *  2. For XY_DIAG_AC measure the diagonal A to C
1190
+ *  3. For XY_DIAG_BD measure the diagonal B to D
1191
+ *  4. For XY_SIDE_AD measure the edge A to D
1192
+ *
1193
+ * Marlin automatically computes skew factors from these measurements.
1194
+ * Skew factors may also be computed and set manually:
1195
+ *
1196
+ *  - Compute AB     : SQRT(2*AC*AC+2*BD*BD-4*AD*AD)/2
1197
+ *  - XY_SKEW_FACTOR : TAN(PI/2-ACOS((AC*AC-AB*AB-AD*AD)/(2*AB*AD)))
1198
+ *
1199
+ * If desired, follow the same procedure for XZ and YZ.
1200
+ * Use these diagrams for reference:
1201
+ *
1202
+ *    Y                     Z                     Z
1203
+ *    ^     B-------C       ^     B-------C       ^     B-------C
1204
+ *    |    /       /        |    /       /        |    /       /
1205
+ *    |   /       /         |   /       /         |   /       /
1206
+ *    |  A-------D          |  A-------D          |  A-------D
1207
+ *    +-------------->X     +-------------->X     +-------------->Y
1208
+ *     XY_SKEW_FACTOR        XZ_SKEW_FACTOR        YZ_SKEW_FACTOR
1209
+ */
1210
+//#define SKEW_CORRECTION
1211
+
1212
+#if ENABLED(SKEW_CORRECTION)
1213
+  // Input all length measurements here:
1214
+  #define XY_DIAG_AC 282.8427124746
1215
+  #define XY_DIAG_BD 282.8427124746
1216
+  #define XY_SIDE_AD 200
1217
+
1218
+  // Or, set the default skew factors directly here
1219
+  // to override the above measurements:
1220
+  #define XY_SKEW_FACTOR 0.0
1221
+
1222
+  //#define SKEW_CORRECTION_FOR_Z
1223
+  #if ENABLED(SKEW_CORRECTION_FOR_Z)
1224
+    #define XZ_DIAG_AC 282.8427124746
1225
+    #define XZ_DIAG_BD 282.8427124746
1226
+    #define YZ_DIAG_AC 282.8427124746
1227
+    #define YZ_DIAG_BD 282.8427124746
1228
+    #define YZ_SIDE_AD 200
1229
+    #define XZ_SKEW_FACTOR 0.0
1230
+    #define YZ_SKEW_FACTOR 0.0
1231
+  #endif
1232
+
1233
+  // Enable this option for M852 to set skew at runtime
1234
+  //#define SKEW_CORRECTION_GCODE
1235
+#endif
1236
+
1180
 //=============================================================================
1237
 //=============================================================================
1181
 //============================= Additional Features ===========================
1238
 //============================= Additional Features ===========================
1182
 //=============================================================================
1239
 //=============================================================================

+ 58
- 1
Marlin/example_configurations/delta/FLSUN/kossel_mini/Configuration.h View File

962
 //===========================================================================
962
 //===========================================================================
963
 //=============================== Bed Leveling ==============================
963
 //=============================== Bed Leveling ==============================
964
 //===========================================================================
964
 //===========================================================================
965
-// @section bedlevel
965
+// @section calibrate
966
 
966
 
967
 /**
967
 /**
968
  * Choose one of the options below to enable G29 Bed Leveling. The parameters
968
  * Choose one of the options below to enable G29 Bed Leveling. The parameters
1171
 // Delta only homes to Z
1171
 // Delta only homes to Z
1172
 #define HOMING_FEEDRATE_Z  (45*60)
1172
 #define HOMING_FEEDRATE_Z  (45*60)
1173
 
1173
 
1174
+// @section calibrate
1175
+
1176
+/**
1177
+ * Bed Skew Compensation
1178
+ *
1179
+ * This feature corrects for misalignment in the XYZ axes.
1180
+ *
1181
+ * Take the following steps to get the bed skew in the XY plane:
1182
+ *  1. Print a test square (e.g., https://www.thingiverse.com/thing:2563185)
1183
+ *  2. For XY_DIAG_AC measure the diagonal A to C
1184
+ *  3. For XY_DIAG_BD measure the diagonal B to D
1185
+ *  4. For XY_SIDE_AD measure the edge A to D
1186
+ *
1187
+ * Marlin automatically computes skew factors from these measurements.
1188
+ * Skew factors may also be computed and set manually:
1189
+ *
1190
+ *  - Compute AB     : SQRT(2*AC*AC+2*BD*BD-4*AD*AD)/2
1191
+ *  - XY_SKEW_FACTOR : TAN(PI/2-ACOS((AC*AC-AB*AB-AD*AD)/(2*AB*AD)))
1192
+ *
1193
+ * If desired, follow the same procedure for XZ and YZ.
1194
+ * Use these diagrams for reference:
1195
+ *
1196
+ *    Y                     Z                     Z
1197
+ *    ^     B-------C       ^     B-------C       ^     B-------C
1198
+ *    |    /       /        |    /       /        |    /       /
1199
+ *    |   /       /         |   /       /         |   /       /
1200
+ *    |  A-------D          |  A-------D          |  A-------D
1201
+ *    +-------------->X     +-------------->X     +-------------->Y
1202
+ *     XY_SKEW_FACTOR        XZ_SKEW_FACTOR        YZ_SKEW_FACTOR
1203
+ */
1204
+//#define SKEW_CORRECTION
1205
+
1206
+#if ENABLED(SKEW_CORRECTION)
1207
+  // Input all length measurements here:
1208
+  #define XY_DIAG_AC 282.8427124746
1209
+  #define XY_DIAG_BD 282.8427124746
1210
+  #define XY_SIDE_AD 200
1211
+
1212
+  // Or, set the default skew factors directly here
1213
+  // to override the above measurements:
1214
+  #define XY_SKEW_FACTOR 0.0
1215
+
1216
+  //#define SKEW_CORRECTION_FOR_Z
1217
+  #if ENABLED(SKEW_CORRECTION_FOR_Z)
1218
+    #define XZ_DIAG_AC 282.8427124746
1219
+    #define XZ_DIAG_BD 282.8427124746
1220
+    #define YZ_DIAG_AC 282.8427124746
1221
+    #define YZ_DIAG_BD 282.8427124746
1222
+    #define YZ_SIDE_AD 200
1223
+    #define XZ_SKEW_FACTOR 0.0
1224
+    #define YZ_SKEW_FACTOR 0.0
1225
+  #endif
1226
+
1227
+  // Enable this option for M852 to set skew at runtime
1228
+  //#define SKEW_CORRECTION_GCODE
1229
+#endif
1230
+
1174
 //=============================================================================
1231
 //=============================================================================
1175
 //============================= Additional Features ===========================
1232
 //============================= Additional Features ===========================
1176
 //=============================================================================
1233
 //=============================================================================

+ 58
- 1
Marlin/example_configurations/delta/generic/Configuration.h View File

949
 //===========================================================================
949
 //===========================================================================
950
 //=============================== Bed Leveling ==============================
950
 //=============================== Bed Leveling ==============================
951
 //===========================================================================
951
 //===========================================================================
952
-// @section bedlevel
952
+// @section calibrate
953
 
953
 
954
 /**
954
 /**
955
  * Choose one of the options below to enable G29 Bed Leveling. The parameters
955
  * Choose one of the options below to enable G29 Bed Leveling. The parameters
1166
 // Delta only homes to Z
1166
 // Delta only homes to Z
1167
 #define HOMING_FEEDRATE_Z  (200*60)
1167
 #define HOMING_FEEDRATE_Z  (200*60)
1168
 
1168
 
1169
+// @section calibrate
1170
+
1171
+/**
1172
+ * Bed Skew Compensation
1173
+ *
1174
+ * This feature corrects for misalignment in the XYZ axes.
1175
+ *
1176
+ * Take the following steps to get the bed skew in the XY plane:
1177
+ *  1. Print a test square (e.g., https://www.thingiverse.com/thing:2563185)
1178
+ *  2. For XY_DIAG_AC measure the diagonal A to C
1179
+ *  3. For XY_DIAG_BD measure the diagonal B to D
1180
+ *  4. For XY_SIDE_AD measure the edge A to D
1181
+ *
1182
+ * Marlin automatically computes skew factors from these measurements.
1183
+ * Skew factors may also be computed and set manually:
1184
+ *
1185
+ *  - Compute AB     : SQRT(2*AC*AC+2*BD*BD-4*AD*AD)/2
1186
+ *  - XY_SKEW_FACTOR : TAN(PI/2-ACOS((AC*AC-AB*AB-AD*AD)/(2*AB*AD)))
1187
+ *
1188
+ * If desired, follow the same procedure for XZ and YZ.
1189
+ * Use these diagrams for reference:
1190
+ *
1191
+ *    Y                     Z                     Z
1192
+ *    ^     B-------C       ^     B-------C       ^     B-------C
1193
+ *    |    /       /        |    /       /        |    /       /
1194
+ *    |   /       /         |   /       /         |   /       /
1195
+ *    |  A-------D          |  A-------D          |  A-------D
1196
+ *    +-------------->X     +-------------->X     +-------------->Y
1197
+ *     XY_SKEW_FACTOR        XZ_SKEW_FACTOR        YZ_SKEW_FACTOR
1198
+ */
1199
+//#define SKEW_CORRECTION
1200
+
1201
+#if ENABLED(SKEW_CORRECTION)
1202
+  // Input all length measurements here:
1203
+  #define XY_DIAG_AC 282.8427124746
1204
+  #define XY_DIAG_BD 282.8427124746
1205
+  #define XY_SIDE_AD 200
1206
+
1207
+  // Or, set the default skew factors directly here
1208
+  // to override the above measurements:
1209
+  #define XY_SKEW_FACTOR 0.0
1210
+
1211
+  //#define SKEW_CORRECTION_FOR_Z
1212
+  #if ENABLED(SKEW_CORRECTION_FOR_Z)
1213
+    #define XZ_DIAG_AC 282.8427124746
1214
+    #define XZ_DIAG_BD 282.8427124746
1215
+    #define YZ_DIAG_AC 282.8427124746
1216
+    #define YZ_DIAG_BD 282.8427124746
1217
+    #define YZ_SIDE_AD 200
1218
+    #define XZ_SKEW_FACTOR 0.0
1219
+    #define YZ_SKEW_FACTOR 0.0
1220
+  #endif
1221
+
1222
+  // Enable this option for M852 to set skew at runtime
1223
+  //#define SKEW_CORRECTION_GCODE
1224
+#endif
1225
+
1169
 //=============================================================================
1226
 //=============================================================================
1170
 //============================= Additional Features ===========================
1227
 //============================= Additional Features ===========================
1171
 //=============================================================================
1228
 //=============================================================================

+ 58
- 1
Marlin/example_configurations/delta/kossel_mini/Configuration.h View File

952
 //===========================================================================
952
 //===========================================================================
953
 //=============================== Bed Leveling ==============================
953
 //=============================== Bed Leveling ==============================
954
 //===========================================================================
954
 //===========================================================================
955
-// @section bedlevel
955
+// @section calibrate
956
 
956
 
957
 /**
957
 /**
958
  * Choose one of the options below to enable G29 Bed Leveling. The parameters
958
  * Choose one of the options below to enable G29 Bed Leveling. The parameters
1169
 // Delta only homes to Z
1169
 // Delta only homes to Z
1170
 #define HOMING_FEEDRATE_Z  (200*60)
1170
 #define HOMING_FEEDRATE_Z  (200*60)
1171
 
1171
 
1172
+// @section calibrate
1173
+
1174
+/**
1175
+ * Bed Skew Compensation
1176
+ *
1177
+ * This feature corrects for misalignment in the XYZ axes.
1178
+ *
1179
+ * Take the following steps to get the bed skew in the XY plane:
1180
+ *  1. Print a test square (e.g., https://www.thingiverse.com/thing:2563185)
1181
+ *  2. For XY_DIAG_AC measure the diagonal A to C
1182
+ *  3. For XY_DIAG_BD measure the diagonal B to D
1183
+ *  4. For XY_SIDE_AD measure the edge A to D
1184
+ *
1185
+ * Marlin automatically computes skew factors from these measurements.
1186
+ * Skew factors may also be computed and set manually:
1187
+ *
1188
+ *  - Compute AB     : SQRT(2*AC*AC+2*BD*BD-4*AD*AD)/2
1189
+ *  - XY_SKEW_FACTOR : TAN(PI/2-ACOS((AC*AC-AB*AB-AD*AD)/(2*AB*AD)))
1190
+ *
1191
+ * If desired, follow the same procedure for XZ and YZ.
1192
+ * Use these diagrams for reference:
1193
+ *
1194
+ *    Y                     Z                     Z
1195
+ *    ^     B-------C       ^     B-------C       ^     B-------C
1196
+ *    |    /       /        |    /       /        |    /       /
1197
+ *    |   /       /         |   /       /         |   /       /
1198
+ *    |  A-------D          |  A-------D          |  A-------D
1199
+ *    +-------------->X     +-------------->X     +-------------->Y
1200
+ *     XY_SKEW_FACTOR        XZ_SKEW_FACTOR        YZ_SKEW_FACTOR
1201
+ */
1202
+//#define SKEW_CORRECTION
1203
+
1204
+#if ENABLED(SKEW_CORRECTION)
1205
+  // Input all length measurements here:
1206
+  #define XY_DIAG_AC 282.8427124746
1207
+  #define XY_DIAG_BD 282.8427124746
1208
+  #define XY_SIDE_AD 200
1209
+
1210
+  // Or, set the default skew factors directly here
1211
+  // to override the above measurements:
1212
+  #define XY_SKEW_FACTOR 0.0
1213
+
1214
+  //#define SKEW_CORRECTION_FOR_Z
1215
+  #if ENABLED(SKEW_CORRECTION_FOR_Z)
1216
+    #define XZ_DIAG_AC 282.8427124746
1217
+    #define XZ_DIAG_BD 282.8427124746
1218
+    #define YZ_DIAG_AC 282.8427124746
1219
+    #define YZ_DIAG_BD 282.8427124746
1220
+    #define YZ_SIDE_AD 200
1221
+    #define XZ_SKEW_FACTOR 0.0
1222
+    #define YZ_SKEW_FACTOR 0.0
1223
+  #endif
1224
+
1225
+  // Enable this option for M852 to set skew at runtime
1226
+  //#define SKEW_CORRECTION_GCODE
1227
+#endif
1228
+
1172
 //=============================================================================
1229
 //=============================================================================
1173
 //============================= Additional Features ===========================
1230
 //============================= Additional Features ===========================
1174
 //=============================================================================
1231
 //=============================================================================

+ 58
- 1
Marlin/example_configurations/delta/kossel_pro/Configuration.h View File

952
 //===========================================================================
952
 //===========================================================================
953
 //=============================== Bed Leveling ==============================
953
 //=============================== Bed Leveling ==============================
954
 //===========================================================================
954
 //===========================================================================
955
-// @section bedlevel
955
+// @section calibrate
956
 
956
 
957
 /**
957
 /**
958
  * Choose one of the options below to enable G29 Bed Leveling. The parameters
958
  * Choose one of the options below to enable G29 Bed Leveling. The parameters
1169
 // Delta only homes to Z
1169
 // Delta only homes to Z
1170
 #define HOMING_FEEDRATE_Z  (200*60)
1170
 #define HOMING_FEEDRATE_Z  (200*60)
1171
 
1171
 
1172
+// @section calibrate
1173
+
1174
+/**
1175
+ * Bed Skew Compensation
1176
+ *
1177
+ * This feature corrects for misalignment in the XYZ axes.
1178
+ *
1179
+ * Take the following steps to get the bed skew in the XY plane:
1180
+ *  1. Print a test square (e.g., https://www.thingiverse.com/thing:2563185)
1181
+ *  2. For XY_DIAG_AC measure the diagonal A to C
1182
+ *  3. For XY_DIAG_BD measure the diagonal B to D
1183
+ *  4. For XY_SIDE_AD measure the edge A to D
1184
+ *
1185
+ * Marlin automatically computes skew factors from these measurements.
1186
+ * Skew factors may also be computed and set manually:
1187
+ *
1188
+ *  - Compute AB     : SQRT(2*AC*AC+2*BD*BD-4*AD*AD)/2
1189
+ *  - XY_SKEW_FACTOR : TAN(PI/2-ACOS((AC*AC-AB*AB-AD*AD)/(2*AB*AD)))
1190
+ *
1191
+ * If desired, follow the same procedure for XZ and YZ.
1192
+ * Use these diagrams for reference:
1193
+ *
1194
+ *    Y                     Z                     Z
1195
+ *    ^     B-------C       ^     B-------C       ^     B-------C
1196
+ *    |    /       /        |    /       /        |    /       /
1197
+ *    |   /       /         |   /       /         |   /       /
1198
+ *    |  A-------D          |  A-------D          |  A-------D
1199
+ *    +-------------->X     +-------------->X     +-------------->Y
1200
+ *     XY_SKEW_FACTOR        XZ_SKEW_FACTOR        YZ_SKEW_FACTOR
1201
+ */
1202
+//#define SKEW_CORRECTION
1203
+
1204
+#if ENABLED(SKEW_CORRECTION)
1205
+  // Input all length measurements here:
1206
+  #define XY_DIAG_AC 282.8427124746
1207
+  #define XY_DIAG_BD 282.8427124746
1208
+  #define XY_SIDE_AD 200
1209
+
1210
+  // Or, set the default skew factors directly here
1211
+  // to override the above measurements:
1212
+  #define XY_SKEW_FACTOR 0.0
1213
+
1214
+  //#define SKEW_CORRECTION_FOR_Z
1215
+  #if ENABLED(SKEW_CORRECTION_FOR_Z)
1216
+    #define XZ_DIAG_AC 282.8427124746
1217
+    #define XZ_DIAG_BD 282.8427124746
1218
+    #define YZ_DIAG_AC 282.8427124746
1219
+    #define YZ_DIAG_BD 282.8427124746
1220
+    #define YZ_SIDE_AD 200
1221
+    #define XZ_SKEW_FACTOR 0.0
1222
+    #define YZ_SKEW_FACTOR 0.0
1223
+  #endif
1224
+
1225
+  // Enable this option for M852 to set skew at runtime
1226
+  //#define SKEW_CORRECTION_GCODE
1227
+#endif
1228
+
1172
 //=============================================================================
1229
 //=============================================================================
1173
 //============================= Additional Features ===========================
1230
 //============================= Additional Features ===========================
1174
 //=============================================================================
1231
 //=============================================================================

+ 58
- 1
Marlin/example_configurations/delta/kossel_xl/Configuration.h View File

961
 //===========================================================================
961
 //===========================================================================
962
 //=============================== Bed Leveling ==============================
962
 //=============================== Bed Leveling ==============================
963
 //===========================================================================
963
 //===========================================================================
964
-// @section bedlevel
964
+// @section calibrate
965
 
965
 
966
 /**
966
 /**
967
  * Choose one of the options below to enable G29 Bed Leveling. The parameters
967
  * Choose one of the options below to enable G29 Bed Leveling. The parameters
1178
 // Delta only homes to Z
1178
 // Delta only homes to Z
1179
 #define HOMING_FEEDRATE_Z  (60*60)
1179
 #define HOMING_FEEDRATE_Z  (60*60)
1180
 
1180
 
1181
+// @section calibrate
1182
+
1183
+/**
1184
+ * Bed Skew Compensation
1185
+ *
1186
+ * This feature corrects for misalignment in the XYZ axes.
1187
+ *
1188
+ * Take the following steps to get the bed skew in the XY plane:
1189
+ *  1. Print a test square (e.g., https://www.thingiverse.com/thing:2563185)
1190
+ *  2. For XY_DIAG_AC measure the diagonal A to C
1191
+ *  3. For XY_DIAG_BD measure the diagonal B to D
1192
+ *  4. For XY_SIDE_AD measure the edge A to D
1193
+ *
1194
+ * Marlin automatically computes skew factors from these measurements.
1195
+ * Skew factors may also be computed and set manually:
1196
+ *
1197
+ *  - Compute AB     : SQRT(2*AC*AC+2*BD*BD-4*AD*AD)/2
1198
+ *  - XY_SKEW_FACTOR : TAN(PI/2-ACOS((AC*AC-AB*AB-AD*AD)/(2*AB*AD)))
1199
+ *
1200
+ * If desired, follow the same procedure for XZ and YZ.
1201
+ * Use these diagrams for reference:
1202
+ *
1203
+ *    Y                     Z                     Z
1204
+ *    ^     B-------C       ^     B-------C       ^     B-------C
1205
+ *    |    /       /        |    /       /        |    /       /
1206
+ *    |   /       /         |   /       /         |   /       /
1207
+ *    |  A-------D          |  A-------D          |  A-------D
1208
+ *    +-------------->X     +-------------->X     +-------------->Y
1209
+ *     XY_SKEW_FACTOR        XZ_SKEW_FACTOR        YZ_SKEW_FACTOR
1210
+ */
1211
+//#define SKEW_CORRECTION
1212
+
1213
+#if ENABLED(SKEW_CORRECTION)
1214
+  // Input all length measurements here:
1215
+  #define XY_DIAG_AC 282.8427124746
1216
+  #define XY_DIAG_BD 282.8427124746
1217
+  #define XY_SIDE_AD 200
1218
+
1219
+  // Or, set the default skew factors directly here
1220
+  // to override the above measurements:
1221
+  #define XY_SKEW_FACTOR 0.0
1222
+
1223
+  //#define SKEW_CORRECTION_FOR_Z
1224
+  #if ENABLED(SKEW_CORRECTION_FOR_Z)
1225
+    #define XZ_DIAG_AC 282.8427124746
1226
+    #define XZ_DIAG_BD 282.8427124746
1227
+    #define YZ_DIAG_AC 282.8427124746
1228
+    #define YZ_DIAG_BD 282.8427124746
1229
+    #define YZ_SIDE_AD 200
1230
+    #define XZ_SKEW_FACTOR 0.0
1231
+    #define YZ_SKEW_FACTOR 0.0
1232
+  #endif
1233
+
1234
+  // Enable this option for M852 to set skew at runtime
1235
+  //#define SKEW_CORRECTION_GCODE
1236
+#endif
1237
+
1181
 //=============================================================================
1238
 //=============================================================================
1182
 //============================= Additional Features ===========================
1239
 //============================= Additional Features ===========================
1183
 //=============================================================================
1240
 //=============================================================================

+ 58
- 1
Marlin/example_configurations/gCreate/gMax1.5+/Configuration.h View File

846
 //===========================================================================
846
 //===========================================================================
847
 //=============================== Bed Leveling ==============================
847
 //=============================== Bed Leveling ==============================
848
 //===========================================================================
848
 //===========================================================================
849
-// @section bedlevel
849
+// @section calibrate
850
 
850
 
851
 /**
851
 /**
852
  * Choose one of the options below to enable G29 Bed Leveling. The parameters
852
  * Choose one of the options below to enable G29 Bed Leveling. The parameters
1058
 #define HOMING_FEEDRATE_XY (60*60)
1058
 #define HOMING_FEEDRATE_XY (60*60)
1059
 #define HOMING_FEEDRATE_Z  (14*60)
1059
 #define HOMING_FEEDRATE_Z  (14*60)
1060
 
1060
 
1061
+// @section calibrate
1062
+
1063
+/**
1064
+ * Bed Skew Compensation
1065
+ *
1066
+ * This feature corrects for misalignment in the XYZ axes.
1067
+ *
1068
+ * Take the following steps to get the bed skew in the XY plane:
1069
+ *  1. Print a test square (e.g., https://www.thingiverse.com/thing:2563185)
1070
+ *  2. For XY_DIAG_AC measure the diagonal A to C
1071
+ *  3. For XY_DIAG_BD measure the diagonal B to D
1072
+ *  4. For XY_SIDE_AD measure the edge A to D
1073
+ *
1074
+ * Marlin automatically computes skew factors from these measurements.
1075
+ * Skew factors may also be computed and set manually:
1076
+ *
1077
+ *  - Compute AB     : SQRT(2*AC*AC+2*BD*BD-4*AD*AD)/2
1078
+ *  - XY_SKEW_FACTOR : TAN(PI/2-ACOS((AC*AC-AB*AB-AD*AD)/(2*AB*AD)))
1079
+ *
1080
+ * If desired, follow the same procedure for XZ and YZ.
1081
+ * Use these diagrams for reference:
1082
+ *
1083
+ *    Y                     Z                     Z
1084
+ *    ^     B-------C       ^     B-------C       ^     B-------C
1085
+ *    |    /       /        |    /       /        |    /       /
1086
+ *    |   /       /         |   /       /         |   /       /
1087
+ *    |  A-------D          |  A-------D          |  A-------D
1088
+ *    +-------------->X     +-------------->X     +-------------->Y
1089
+ *     XY_SKEW_FACTOR        XZ_SKEW_FACTOR        YZ_SKEW_FACTOR
1090
+ */
1091
+//#define SKEW_CORRECTION
1092
+
1093
+#if ENABLED(SKEW_CORRECTION)
1094
+  // Input all length measurements here:
1095
+  #define XY_DIAG_AC 282.8427124746
1096
+  #define XY_DIAG_BD 282.8427124746
1097
+  #define XY_SIDE_AD 200
1098
+
1099
+  // Or, set the default skew factors directly here
1100
+  // to override the above measurements:
1101
+  #define XY_SKEW_FACTOR 0.0
1102
+
1103
+  //#define SKEW_CORRECTION_FOR_Z
1104
+  #if ENABLED(SKEW_CORRECTION_FOR_Z)
1105
+    #define XZ_DIAG_AC 282.8427124746
1106
+    #define XZ_DIAG_BD 282.8427124746
1107
+    #define YZ_DIAG_AC 282.8427124746
1108
+    #define YZ_DIAG_BD 282.8427124746
1109
+    #define YZ_SIDE_AD 200
1110
+    #define XZ_SKEW_FACTOR 0.0
1111
+    #define YZ_SKEW_FACTOR 0.0
1112
+  #endif
1113
+
1114
+  // Enable this option for M852 to set skew at runtime
1115
+  //#define SKEW_CORRECTION_GCODE
1116
+#endif
1117
+
1061
 //=============================================================================
1118
 //=============================================================================
1062
 //============================= Additional Features ===========================
1119
 //============================= Additional Features ===========================
1063
 //=============================================================================
1120
 //=============================================================================

+ 58
- 1
Marlin/example_configurations/makibox/Configuration.h View File

835
 //===========================================================================
835
 //===========================================================================
836
 //=============================== Bed Leveling ==============================
836
 //=============================== Bed Leveling ==============================
837
 //===========================================================================
837
 //===========================================================================
838
-// @section bedlevel
838
+// @section calibrate
839
 
839
 
840
 /**
840
 /**
841
  * Choose one of the options below to enable G29 Bed Leveling. The parameters
841
  * Choose one of the options below to enable G29 Bed Leveling. The parameters
1047
 #define HOMING_FEEDRATE_XY 1500
1047
 #define HOMING_FEEDRATE_XY 1500
1048
 #define HOMING_FEEDRATE_Z  (2*60)
1048
 #define HOMING_FEEDRATE_Z  (2*60)
1049
 
1049
 
1050
+// @section calibrate
1051
+
1052
+/**
1053
+ * Bed Skew Compensation
1054
+ *
1055
+ * This feature corrects for misalignment in the XYZ axes.
1056
+ *
1057
+ * Take the following steps to get the bed skew in the XY plane:
1058
+ *  1. Print a test square (e.g., https://www.thingiverse.com/thing:2563185)
1059
+ *  2. For XY_DIAG_AC measure the diagonal A to C
1060
+ *  3. For XY_DIAG_BD measure the diagonal B to D
1061
+ *  4. For XY_SIDE_AD measure the edge A to D
1062
+ *
1063
+ * Marlin automatically computes skew factors from these measurements.
1064
+ * Skew factors may also be computed and set manually:
1065
+ *
1066
+ *  - Compute AB     : SQRT(2*AC*AC+2*BD*BD-4*AD*AD)/2
1067
+ *  - XY_SKEW_FACTOR : TAN(PI/2-ACOS((AC*AC-AB*AB-AD*AD)/(2*AB*AD)))
1068
+ *
1069
+ * If desired, follow the same procedure for XZ and YZ.
1070
+ * Use these diagrams for reference:
1071
+ *
1072
+ *    Y                     Z                     Z
1073
+ *    ^     B-------C       ^     B-------C       ^     B-------C
1074
+ *    |    /       /        |    /       /        |    /       /
1075
+ *    |   /       /         |   /       /         |   /       /
1076
+ *    |  A-------D          |  A-------D          |  A-------D
1077
+ *    +-------------->X     +-------------->X     +-------------->Y
1078
+ *     XY_SKEW_FACTOR        XZ_SKEW_FACTOR        YZ_SKEW_FACTOR
1079
+ */
1080
+//#define SKEW_CORRECTION
1081
+
1082
+#if ENABLED(SKEW_CORRECTION)
1083
+  // Input all length measurements here:
1084
+  #define XY_DIAG_AC 282.8427124746
1085
+  #define XY_DIAG_BD 282.8427124746
1086
+  #define XY_SIDE_AD 200
1087
+
1088
+  // Or, set the default skew factors directly here
1089
+  // to override the above measurements:
1090
+  #define XY_SKEW_FACTOR 0.0
1091
+
1092
+  //#define SKEW_CORRECTION_FOR_Z
1093
+  #if ENABLED(SKEW_CORRECTION_FOR_Z)
1094
+    #define XZ_DIAG_AC 282.8427124746
1095
+    #define XZ_DIAG_BD 282.8427124746
1096
+    #define YZ_DIAG_AC 282.8427124746
1097
+    #define YZ_DIAG_BD 282.8427124746
1098
+    #define YZ_SIDE_AD 200
1099
+    #define XZ_SKEW_FACTOR 0.0
1100
+    #define YZ_SKEW_FACTOR 0.0
1101
+  #endif
1102
+
1103
+  // Enable this option for M852 to set skew at runtime
1104
+  //#define SKEW_CORRECTION_GCODE
1105
+#endif
1106
+
1050
 //=============================================================================
1107
 //=============================================================================
1051
 //============================= Additional Features ===========================
1108
 //============================= Additional Features ===========================
1052
 //=============================================================================
1109
 //=============================================================================

+ 58
- 1
Marlin/example_configurations/tvrrug/Round2/Configuration.h View File

827
 //===========================================================================
827
 //===========================================================================
828
 //=============================== Bed Leveling ==============================
828
 //=============================== Bed Leveling ==============================
829
 //===========================================================================
829
 //===========================================================================
830
-// @section bedlevel
830
+// @section calibrate
831
 
831
 
832
 /**
832
 /**
833
  * Choose one of the options below to enable G29 Bed Leveling. The parameters
833
  * Choose one of the options below to enable G29 Bed Leveling. The parameters
1039
 #define HOMING_FEEDRATE_XY (50*60)
1039
 #define HOMING_FEEDRATE_XY (50*60)
1040
 #define HOMING_FEEDRATE_Z  (4*60)
1040
 #define HOMING_FEEDRATE_Z  (4*60)
1041
 
1041
 
1042
+// @section calibrate
1043
+
1044
+/**
1045
+ * Bed Skew Compensation
1046
+ *
1047
+ * This feature corrects for misalignment in the XYZ axes.
1048
+ *
1049
+ * Take the following steps to get the bed skew in the XY plane:
1050
+ *  1. Print a test square (e.g., https://www.thingiverse.com/thing:2563185)
1051
+ *  2. For XY_DIAG_AC measure the diagonal A to C
1052
+ *  3. For XY_DIAG_BD measure the diagonal B to D
1053
+ *  4. For XY_SIDE_AD measure the edge A to D
1054
+ *
1055
+ * Marlin automatically computes skew factors from these measurements.
1056
+ * Skew factors may also be computed and set manually:
1057
+ *
1058
+ *  - Compute AB     : SQRT(2*AC*AC+2*BD*BD-4*AD*AD)/2
1059
+ *  - XY_SKEW_FACTOR : TAN(PI/2-ACOS((AC*AC-AB*AB-AD*AD)/(2*AB*AD)))
1060
+ *
1061
+ * If desired, follow the same procedure for XZ and YZ.
1062
+ * Use these diagrams for reference:
1063
+ *
1064
+ *    Y                     Z                     Z
1065
+ *    ^     B-------C       ^     B-------C       ^     B-------C
1066
+ *    |    /       /        |    /       /        |    /       /
1067
+ *    |   /       /         |   /       /         |   /       /
1068
+ *    |  A-------D          |  A-------D          |  A-------D
1069
+ *    +-------------->X     +-------------->X     +-------------->Y
1070
+ *     XY_SKEW_FACTOR        XZ_SKEW_FACTOR        YZ_SKEW_FACTOR
1071
+ */
1072
+//#define SKEW_CORRECTION
1073
+
1074
+#if ENABLED(SKEW_CORRECTION)
1075
+  // Input all length measurements here:
1076
+  #define XY_DIAG_AC 282.8427124746
1077
+  #define XY_DIAG_BD 282.8427124746
1078
+  #define XY_SIDE_AD 200
1079
+
1080
+  // Or, set the default skew factors directly here
1081
+  // to override the above measurements:
1082
+  #define XY_SKEW_FACTOR 0.0
1083
+
1084
+  //#define SKEW_CORRECTION_FOR_Z
1085
+  #if ENABLED(SKEW_CORRECTION_FOR_Z)
1086
+    #define XZ_DIAG_AC 282.8427124746
1087
+    #define XZ_DIAG_BD 282.8427124746
1088
+    #define YZ_DIAG_AC 282.8427124746
1089
+    #define YZ_DIAG_BD 282.8427124746
1090
+    #define YZ_SIDE_AD 200
1091
+    #define XZ_SKEW_FACTOR 0.0
1092
+    #define YZ_SKEW_FACTOR 0.0
1093
+  #endif
1094
+
1095
+  // Enable this option for M852 to set skew at runtime
1096
+  //#define SKEW_CORRECTION_GCODE
1097
+#endif
1098
+
1042
 //=============================================================================
1099
 //=============================================================================
1043
 //============================= Additional Features ===========================
1100
 //============================= Additional Features ===========================
1044
 //=============================================================================
1101
 //=============================================================================

+ 58
- 1
Marlin/example_configurations/wt150/Configuration.h View File

837
 //===========================================================================
837
 //===========================================================================
838
 //=============================== Bed Leveling ==============================
838
 //=============================== Bed Leveling ==============================
839
 //===========================================================================
839
 //===========================================================================
840
-// @section bedlevel
840
+// @section calibrate
841
 
841
 
842
 /**
842
 /**
843
  * Choose one of the options below to enable G29 Bed Leveling. The parameters
843
  * Choose one of the options below to enable G29 Bed Leveling. The parameters
1049
 #define HOMING_FEEDRATE_XY (50*60)
1049
 #define HOMING_FEEDRATE_XY (50*60)
1050
 #define HOMING_FEEDRATE_Z  (4*60)
1050
 #define HOMING_FEEDRATE_Z  (4*60)
1051
 
1051
 
1052
+// @section calibrate
1053
+
1054
+/**
1055
+ * Bed Skew Compensation
1056
+ *
1057
+ * This feature corrects for misalignment in the XYZ axes.
1058
+ *
1059
+ * Take the following steps to get the bed skew in the XY plane:
1060
+ *  1. Print a test square (e.g., https://www.thingiverse.com/thing:2563185)
1061
+ *  2. For XY_DIAG_AC measure the diagonal A to C
1062
+ *  3. For XY_DIAG_BD measure the diagonal B to D
1063
+ *  4. For XY_SIDE_AD measure the edge A to D
1064
+ *
1065
+ * Marlin automatically computes skew factors from these measurements.
1066
+ * Skew factors may also be computed and set manually:
1067
+ *
1068
+ *  - Compute AB     : SQRT(2*AC*AC+2*BD*BD-4*AD*AD)/2
1069
+ *  - XY_SKEW_FACTOR : TAN(PI/2-ACOS((AC*AC-AB*AB-AD*AD)/(2*AB*AD)))
1070
+ *
1071
+ * If desired, follow the same procedure for XZ and YZ.
1072
+ * Use these diagrams for reference:
1073
+ *
1074
+ *    Y                     Z                     Z
1075
+ *    ^     B-------C       ^     B-------C       ^     B-------C
1076
+ *    |    /       /        |    /       /        |    /       /
1077
+ *    |   /       /         |   /       /         |   /       /
1078
+ *    |  A-------D          |  A-------D          |  A-------D
1079
+ *    +-------------->X     +-------------->X     +-------------->Y
1080
+ *     XY_SKEW_FACTOR        XZ_SKEW_FACTOR        YZ_SKEW_FACTOR
1081
+ */
1082
+//#define SKEW_CORRECTION
1083
+
1084
+#if ENABLED(SKEW_CORRECTION)
1085
+  // Input all length measurements here:
1086
+  #define XY_DIAG_AC 282.8427124746
1087
+  #define XY_DIAG_BD 282.8427124746
1088
+  #define XY_SIDE_AD 200
1089
+
1090
+  // Or, set the default skew factors directly here
1091
+  // to override the above measurements:
1092
+  #define XY_SKEW_FACTOR 0.0
1093
+
1094
+  //#define SKEW_CORRECTION_FOR_Z
1095
+  #if ENABLED(SKEW_CORRECTION_FOR_Z)
1096
+    #define XZ_DIAG_AC 282.8427124746
1097
+    #define XZ_DIAG_BD 282.8427124746
1098
+    #define YZ_DIAG_AC 282.8427124746
1099
+    #define YZ_DIAG_BD 282.8427124746
1100
+    #define YZ_SIDE_AD 200
1101
+    #define XZ_SKEW_FACTOR 0.0
1102
+    #define YZ_SKEW_FACTOR 0.0
1103
+  #endif
1104
+
1105
+  // Enable this option for M852 to set skew at runtime
1106
+  //#define SKEW_CORRECTION_GCODE
1107
+#endif
1108
+
1052
 //=============================================================================
1109
 //=============================================================================
1053
 //============================= Additional Features ===========================
1110
 //============================= Additional Features ===========================
1054
 //=============================================================================
1111
 //=============================================================================

+ 3
- 0
Marlin/language.h View File

162
 #define MSG_Z2_MAX                          "z2_max: "
162
 #define MSG_Z2_MAX                          "z2_max: "
163
 #define MSG_Z_PROBE                         "z_probe: "
163
 #define MSG_Z_PROBE                         "z_probe: "
164
 #define MSG_PROBE_Z_OFFSET                  "Probe Z Offset"
164
 #define MSG_PROBE_Z_OFFSET                  "Probe Z Offset"
165
+#define MSG_SKEW_MIN                        "min_skew_factor: "
166
+#define MSG_SKEW_MAX                        "max_skew_factor: "
167
+#define MSG_SKEW_WARN                       "WARNING: Skew compensation disabled (outside MIN/MAX limits)"
165
 #define MSG_FILAMENT_RUNOUT_SENSOR          "filament: "
168
 #define MSG_FILAMENT_RUNOUT_SENSOR          "filament: "
166
 #define MSG_ERR_MATERIAL_INDEX              "M145 S<index> out of range (0-1)"
169
 #define MSG_ERR_MATERIAL_INDEX              "M145 S<index> out of range (0-1)"
167
 #define MSG_ERR_M355_NONE                   "No case light"
170
 #define MSG_ERR_M355_NONE                   "No case light"

+ 3
- 0
Marlin/language_en.h View File

699
 #ifndef MSG_ZPROBE_OUT
699
 #ifndef MSG_ZPROBE_OUT
700
   #define MSG_ZPROBE_OUT                      _UxGT("Z probe out. bed")
700
   #define MSG_ZPROBE_OUT                      _UxGT("Z probe out. bed")
701
 #endif
701
 #endif
702
+#ifndef MSG_SKEW_FACTOR
703
+  #define MSG_SKEW_FACTOR                     _UxGT("Skew Factor")
704
+#endif
702
 #ifndef MSG_BLTOUCH
705
 #ifndef MSG_BLTOUCH
703
   #define MSG_BLTOUCH                         _UxGT("BLTouch")
706
   #define MSG_BLTOUCH                         _UxGT("BLTouch")
704
 #endif
707
 #endif

+ 68
- 30
Marlin/planner.cpp View File

124
   #endif
124
   #endif
125
 #endif
125
 #endif
126
 
126
 
127
+#if ENABLED(SKEW_CORRECTION)
128
+  #if ENABLED(SKEW_CORRECTION_GCODE)
129
+    // Initialized by settings.load()
130
+    float Planner::xy_skew_factor;
131
+    #if ENABLED(SKEW_CORRECTION_FOR_Z)
132
+      float Planner::xz_skew_factor, Planner::yz_skew_factor;
133
+    #else
134
+      constexpr float Planner::xz_skew_factor, Planner::yz_skew_factor;
135
+    #endif
136
+  #else
137
+    constexpr float Planner::xy_skew_factor, Planner::xz_skew_factor, Planner::yz_skew_factor;
138
+  #endif
139
+#endif
140
+
127
 #if ENABLED(AUTOTEMP)
141
 #if ENABLED(AUTOTEMP)
128
   float Planner::autotemp_max = 250,
142
   float Planner::autotemp_max = 250,
129
         Planner::autotemp_min = 210,
143
         Planner::autotemp_min = 210,
554
    */
568
    */
555
   void Planner::apply_leveling(float &rx, float &ry, float &rz) {
569
   void Planner::apply_leveling(float &rx, float &ry, float &rz) {
556
 
570
 
571
+    #if ENABLED(SKEW_CORRECTION)
572
+      if (WITHIN(rx, X_MIN_POS + 1, X_MAX_POS) && WITHIN(ry, Y_MIN_POS + 1, Y_MAX_POS)) {
573
+        const float tempry = ry - (rz * planner.yz_skew_factor),
574
+                    temprx = rx - (ry * planner.xy_skew_factor) - (rz * (planner.xz_skew_factor - (planner.xy_skew_factor * planner.yz_skew_factor)));
575
+        if (WITHIN(temprx, X_MIN_POS, X_MAX_POS) && WITHIN(tempry, Y_MIN_POS, Y_MAX_POS)) {
576
+          rx = temprx;
577
+          ry = tempry;
578
+        }
579
+        else
580
+          SERIAL_ECHOLN(MSG_SKEW_WARN);
581
+      }
582
+    #endif
583
+
557
     if (!leveling_active) return;
584
     if (!leveling_active) return;
558
 
585
 
559
     #if ABL_PLANAR
586
     #if ABL_PLANAR
600
 
627
 
601
   void Planner::unapply_leveling(float raw[XYZ]) {
628
   void Planner::unapply_leveling(float raw[XYZ]) {
602
 
629
 
603
-    if (!leveling_active) return;
630
+    #if ENABLED(ENABLE_LEVELING_FADE_HEIGHT)
631
+      const float fade_scaling_factor = fade_scaling_factor_for_z(raw[Z_AXIS]);
632
+    #else
633
+      constexpr float fade_scaling_factor = 1.0;
634
+    #endif
604
 
635
 
605
-    #if ABL_PLANAR
636
+    if (leveling_active && fade_scaling_factor) {
606
 
637
 
607
-      matrix_3x3 inverse = matrix_3x3::transpose(bed_level_matrix);
638
+      #if ABL_PLANAR
608
 
639
 
609
-      float dx = raw[X_AXIS] - (X_TILT_FULCRUM),
610
-            dy = raw[Y_AXIS] - (Y_TILT_FULCRUM);
640
+        matrix_3x3 inverse = matrix_3x3::transpose(bed_level_matrix);
611
 
641
 
612
-      apply_rotation_xyz(inverse, dx, dy, raw[Z_AXIS]);
642
+        float dx = raw[X_AXIS] - (X_TILT_FULCRUM),
643
+              dy = raw[Y_AXIS] - (Y_TILT_FULCRUM);
613
 
644
 
614
-      raw[X_AXIS] = dx + X_TILT_FULCRUM;
615
-      raw[Y_AXIS] = dy + Y_TILT_FULCRUM;
645
+        apply_rotation_xyz(inverse, dx, dy, raw[Z_AXIS]);
616
 
646
 
617
-    #else
647
+        raw[X_AXIS] = dx + X_TILT_FULCRUM;
648
+        raw[Y_AXIS] = dy + Y_TILT_FULCRUM;
618
 
649
 
619
-      #if ENABLED(ENABLE_LEVELING_FADE_HEIGHT)
620
-        const float fade_scaling_factor = fade_scaling_factor_for_z(raw[Z_AXIS]);
621
-        if (!fade_scaling_factor) return;
622
-      #elif HAS_MESH
623
-        constexpr float fade_scaling_factor = 1.0;
624
-      #endif
650
+      #else // !ABL_PLANAR
625
 
651
 
626
-      raw[Z_AXIS] -= (
627
-        #if ENABLED(AUTO_BED_LEVELING_UBL)
628
-          ubl.get_z_correction(raw[X_AXIS], raw[Y_AXIS]) * fade_scaling_factor
629
-        #elif ENABLED(MESH_BED_LEVELING)
630
-          mbl.get_z(raw[X_AXIS], raw[Y_AXIS]
631
-            #if ENABLED(ENABLE_LEVELING_FADE_HEIGHT)
632
-              , fade_scaling_factor
633
-            #endif
634
-          )
635
-        #elif ENABLED(AUTO_BED_LEVELING_BILINEAR)
636
-          bilinear_z_offset(raw) * fade_scaling_factor
637
-        #else
638
-          0
639
-        #endif
640
-      );
652
+        raw[Z_AXIS] -= (
653
+          #if ENABLED(AUTO_BED_LEVELING_UBL)
654
+            ubl.get_z_correction(raw[X_AXIS], raw[Y_AXIS]) * fade_scaling_factor
655
+          #elif ENABLED(MESH_BED_LEVELING)
656
+            mbl.get_z(raw[X_AXIS], raw[Y_AXIS]
657
+              #if ENABLED(ENABLE_LEVELING_FADE_HEIGHT)
658
+                , fade_scaling_factor
659
+              #endif
660
+            )
661
+          #elif ENABLED(AUTO_BED_LEVELING_BILINEAR)
662
+            bilinear_z_offset(raw) * fade_scaling_factor
663
+          #else
664
+            0
665
+          #endif
666
+        );
641
 
667
 
668
+      #endif // !ABL_PLANAR
669
+    }
670
+
671
+    #if ENABLED(SKEW_CORRECTION)
672
+      if (WITHIN(raw[X_AXIS], X_MIN_POS, X_MAX_POS) && WITHIN(raw[Y_AXIS], Y_MIN_POS, Y_MAX_POS)) {
673
+        const float temprx = raw[X_AXIS] + raw[Y_AXIS] * planner.xy_skew_factor + raw[Z_AXIS] * planner.xz_skew_factor,
674
+                    tempry = raw[Y_AXIS] + raw[Z_AXIS] * planner.yz_skew_factor;
675
+        if (WITHIN(temprx, X_MIN_POS, X_MAX_POS) && WITHIN(tempry, Y_MIN_POS, Y_MAX_POS)) {
676
+          raw[X_AXIS] = temprx;
677
+          raw[Y_AXIS] = tempry;
678
+        }
679
+      }
642
     #endif
680
     #endif
643
   }
681
   }
644
 
682
 

+ 17
- 0
Marlin/planner.h View File

176
       static float extruder_advance_k, advance_ed_ratio;
176
       static float extruder_advance_k, advance_ed_ratio;
177
     #endif
177
     #endif
178
 
178
 
179
+    #if ENABLED(SKEW_CORRECTION)
180
+      #if ENABLED(SKEW_CORRECTION_GCODE)
181
+        static float xy_skew_factor;
182
+      #else
183
+        static constexpr float xy_skew_factor = XY_SKEW_FACTOR;
184
+      #endif
185
+      #if ENABLED(SKEW_CORRECTION_FOR_Z)
186
+        #if ENABLED(SKEW_CORRECTION_GCODE)
187
+          static float xz_skew_factor, yz_skew_factor;
188
+        #else
189
+          static constexpr float xz_skew_factor = XZ_SKEW_FACTOR, yz_skew_factor = YZ_SKEW_FACTOR;
190
+        #endif
191
+      #else
192
+        static constexpr float xz_skew_factor = 0, yz_skew_factor = 0;
193
+      #endif
194
+    #endif
195
+
179
   private:
196
   private:
180
 
197
 
181
     /**
198
     /**

+ 1
- 1
Marlin/temperature.cpp View File

1318
     millis_t Temperature::thermal_runaway_bed_timer;
1318
     millis_t Temperature::thermal_runaway_bed_timer;
1319
   #endif
1319
   #endif
1320
 
1320
 
1321
-  void Temperature::thermal_runaway_protection(Temperature::TRState* state, millis_t* timer, float current, float target, int heater_id, int period_seconds, int hysteresis_degc) {
1321
+  void Temperature::thermal_runaway_protection(Temperature::TRState * const state, millis_t * const timer, const float current, const float target, const int8_t heater_id, const uint16_t period_seconds, const uint16_t hysteresis_degc) {
1322
 
1322
 
1323
     static float tr_target_temperature[HOTENDS + 1] = { 0.0 };
1323
     static float tr_target_temperature[HOTENDS + 1] = { 0.0 };
1324
 
1324
 

+ 1
- 1
Marlin/temperature.h View File

564
 
564
 
565
       typedef enum TRState { TRInactive, TRFirstHeating, TRStable, TRRunaway } TRstate;
565
       typedef enum TRState { TRInactive, TRFirstHeating, TRStable, TRRunaway } TRstate;
566
 
566
 
567
-      static void thermal_runaway_protection(TRState* state, millis_t* timer, float temperature, float target_temperature, int heater_id, int period_seconds, int hysteresis_degc);
567
+      static void thermal_runaway_protection(TRState * const state, millis_t * const timer, const float current, const float target, const int8_t heater_id, const uint16_t period_seconds, const uint16_t hysteresis_degc);
568
 
568
 
569
       #if ENABLED(THERMAL_PROTECTION_HOTENDS)
569
       #if ENABLED(THERMAL_PROTECTION_HOTENDS)
570
         static TRState thermal_runaway_state_machine[HOTENDS];
570
         static TRState thermal_runaway_state_machine[HOTENDS];

Loading…
Cancel
Save