Browse Source

Merge pull request #5973 from thinkyhead/rc_circle_pattern

Add circle pattern to nozzle clean
Scott Lahteine 7 years ago
parent
commit
33f8a8a344
26 changed files with 1152 additions and 687 deletions
  1. 12
    2
      Marlin/Configuration.h
  2. 2
    1
      Marlin/Marlin_main.cpp
  3. 13
    2
      Marlin/example_configurations/Cartesio/Configuration.h
  4. 13
    2
      Marlin/example_configurations/Felix/Configuration.h
  5. 13
    2
      Marlin/example_configurations/Felix/DUAL/Configuration.h
  6. 13
    2
      Marlin/example_configurations/Hephestos/Configuration.h
  7. 13
    2
      Marlin/example_configurations/Hephestos_2/Configuration.h
  8. 13
    2
      Marlin/example_configurations/K8200/Configuration.h
  9. 13
    2
      Marlin/example_configurations/K8400/Configuration.h
  10. 13
    2
      Marlin/example_configurations/K8400/Dual-head/Configuration.h
  11. 13
    2
      Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h
  12. 13
    2
      Marlin/example_configurations/RigidBot/Configuration.h
  13. 13
    2
      Marlin/example_configurations/SCARA/Configuration.h
  14. 13
    2
      Marlin/example_configurations/TAZ4/Configuration.h
  15. 13
    2
      Marlin/example_configurations/WITBOX/Configuration.h
  16. 13
    2
      Marlin/example_configurations/adafruit/ST7565/Configuration.h
  17. 468
    452
      Marlin/example_configurations/delta/flsun_kossel_mini/Configuration.h
  18. 154
    75
      Marlin/example_configurations/delta/flsun_kossel_mini/Configuration_adv.h
  19. 13
    2
      Marlin/example_configurations/delta/generic/Configuration.h
  20. 13
    2
      Marlin/example_configurations/delta/kossel_mini/Configuration.h
  21. 13
    2
      Marlin/example_configurations/delta/kossel_pro/Configuration.h
  22. 13
    2
      Marlin/example_configurations/delta/kossel_xl/Configuration.h
  23. 13
    2
      Marlin/example_configurations/makibox/Configuration.h
  24. 13
    2
      Marlin/example_configurations/tvrrug/Round2/Configuration.h
  25. 236
    0
      Marlin/nozzle.cpp
  26. 20
    117
      Marlin/nozzle.h

+ 12
- 2
Marlin/Configuration.h View File

@@ -96,7 +96,7 @@
96 96
 //
97 97
 // Marlin now allow you to have a vendor boot image to be displayed on machine
98 98
 // start. When SHOW_CUSTOM_BOOTSCREEN is defined Marlin will first show your
99
-// custom boot image and them the default Marlin boot image is shown.
99
+// custom boot image and then the default Marlin boot image is shown.
100 100
 //
101 101
 // We suggest for you to take advantage of this new feature and keep the Marlin
102 102
 // boot image unmodified. For an example have a look at the bq Hephestos 2
@@ -1000,6 +1000,9 @@
1000 1000
 //                       |________|_________|_________|
1001 1001
 //                           T1        T2        T3
1002 1002
 //
1003
+//   P2: This starts a circular pattern with circle with middle in
1004
+//       NOZZLE_CLEAN_CIRCLE_MIDDLE radius of R and stroke count of S.
1005
+//       Before starting the circle nozzle goes to NOZZLE_CLEAN_START_POINT.
1003 1006
 //
1004 1007
 // Caveats: End point Z should use the same value as Start point Z.
1005 1008
 //
@@ -1011,7 +1014,7 @@
1011 1014
 #if ENABLED(NOZZLE_CLEAN_FEATURE)
1012 1015
   // Default number of pattern repetitions
1013 1016
   #define NOZZLE_CLEAN_STROKES  12
1014
-  
1017
+
1015 1018
   // Default number of triangles
1016 1019
   #define NOZZLE_CLEAN_TRIANGLES  3
1017 1020
 
@@ -1019,6 +1022,13 @@
1019 1022
   #define NOZZLE_CLEAN_START_POINT { 30, 30, (Z_MIN_POS + 1)}
1020 1023
   #define NOZZLE_CLEAN_END_POINT   {100, 60, (Z_MIN_POS + 1)}
1021 1024
 
1025
+  // Circular pattern radius
1026
+  #define NOZZLE_CLEAN_CIRCLE_RADIUS 6.5
1027
+  // Circular pattern circle fragments number
1028
+  #define NOZZLE_CLEAN_CIRCLE_FN 10
1029
+  // Middle point of circle
1030
+  #define NOZZLE_CLEAN_CIRCLE_MIDDLE NOZZLE_CLEAN_START_POINT
1031
+
1022 1032
   // Moves the nozzle to the initial position
1023 1033
   #define NOZZLE_CLEAN_GOBACK
1024 1034
 #endif

+ 2
- 1
Marlin/Marlin_main.cpp View File

@@ -3164,8 +3164,9 @@ inline void gcode_G4() {
3164 3164
     const uint8_t pattern = code_seen('P') ? code_value_ushort() : 0,
3165 3165
                   strokes = code_seen('S') ? code_value_ushort() : NOZZLE_CLEAN_STROKES,
3166 3166
                   objects = code_seen('T') ? code_value_ushort() : NOZZLE_CLEAN_TRIANGLES;
3167
+    const float radius = code_seen('R') ? code_value_float() : NOZZLE_CLEAN_CIRCLE_RADIUS;
3167 3168
 
3168
-    Nozzle::clean(pattern, strokes, objects);
3169
+    Nozzle::clean(pattern, strokes, radius, objects);
3169 3170
   }
3170 3171
 #endif
3171 3172
 

+ 13
- 2
Marlin/example_configurations/Cartesio/Configuration.h View File

@@ -96,7 +96,7 @@
96 96
 //
97 97
 // Marlin now allow you to have a vendor boot image to be displayed on machine
98 98
 // start. When SHOW_CUSTOM_BOOTSCREEN is defined Marlin will first show your
99
-// custom boot image and them the default Marlin boot image is shown.
99
+// custom boot image and then the default Marlin boot image is shown.
100 100
 //
101 101
 // We suggest for you to take advantage of this new feature and keep the Marlin
102 102
 // boot image unmodified. For an example have a look at the bq Hephestos 2
@@ -1000,6 +1000,10 @@
1000 1000
 //                       |________|_________|_________|
1001 1001
 //                           T1        T2        T3
1002 1002
 //
1003
+//   P2: This starts a circular pattern with circle with middle in
1004
+//       NOZZLE_CLEAN_CIRCLE_MIDDLE radius of R and stroke count of S.
1005
+//       Before starting the circle nozzle goes to NOZZLE_CLEAN_START_POINT.
1006
+//
1003 1007
 // Caveats: End point Z should use the same value as Start point Z.
1004 1008
 //
1005 1009
 // Attention: This is an EXPERIMENTAL feature, in the future the G-code arguments
@@ -1010,7 +1014,7 @@
1010 1014
 #if ENABLED(NOZZLE_CLEAN_FEATURE)
1011 1015
   // Default number of pattern repetitions
1012 1016
   #define NOZZLE_CLEAN_STROKES  12
1013
-  
1017
+
1014 1018
   // Default number of triangles
1015 1019
   #define NOZZLE_CLEAN_TRIANGLES  3
1016 1020
 
@@ -1018,6 +1022,13 @@
1018 1022
   #define NOZZLE_CLEAN_START_POINT { 30, 30, (Z_MIN_POS + 1)}
1019 1023
   #define NOZZLE_CLEAN_END_POINT   {100, 60, (Z_MIN_POS + 1)}
1020 1024
 
1025
+  // Circular pattern radius
1026
+  #define NOZZLE_CLEAN_CIRCLE_RADIUS 6.5
1027
+  // Circular pattern circle fragments number
1028
+  #define NOZZLE_CLEAN_CIRCLE_FN 10
1029
+  // Middle point of circle
1030
+  #define NOZZLE_CLEAN_CIRCLE_MIDDLE NOZZLE_CLEAN_START_POINT
1031
+
1021 1032
   // Moves the nozzle to the initial position
1022 1033
   #define NOZZLE_CLEAN_GOBACK
1023 1034
 #endif

+ 13
- 2
Marlin/example_configurations/Felix/Configuration.h View File

@@ -96,7 +96,7 @@
96 96
 //
97 97
 // Marlin now allow you to have a vendor boot image to be displayed on machine
98 98
 // start. When SHOW_CUSTOM_BOOTSCREEN is defined Marlin will first show your
99
-// custom boot image and them the default Marlin boot image is shown.
99
+// custom boot image and then the default Marlin boot image is shown.
100 100
 //
101 101
 // We suggest for you to take advantage of this new feature and keep the Marlin
102 102
 // boot image unmodified. For an example have a look at the bq Hephestos 2
@@ -983,6 +983,10 @@
983 983
 //                       |________|_________|_________|
984 984
 //                           T1        T2        T3
985 985
 //
986
+//   P2: This starts a circular pattern with circle with middle in
987
+//       NOZZLE_CLEAN_CIRCLE_MIDDLE radius of R and stroke count of S.
988
+//       Before starting the circle nozzle goes to NOZZLE_CLEAN_START_POINT.
989
+//
986 990
 // Caveats: End point Z should use the same value as Start point Z.
987 991
 //
988 992
 // Attention: This is an EXPERIMENTAL feature, in the future the G-code arguments
@@ -993,7 +997,7 @@
993 997
 #if ENABLED(NOZZLE_CLEAN_FEATURE)
994 998
   // Default number of pattern repetitions
995 999
   #define NOZZLE_CLEAN_STROKES  12
996
-  
1000
+
997 1001
   // Default number of triangles
998 1002
   #define NOZZLE_CLEAN_TRIANGLES  3
999 1003
 
@@ -1001,6 +1005,13 @@
1001 1005
   #define NOZZLE_CLEAN_START_POINT { 30, 30, (Z_MIN_POS + 1)}
1002 1006
   #define NOZZLE_CLEAN_END_POINT   {100, 60, (Z_MIN_POS + 1)}
1003 1007
 
1008
+  // Circular pattern radius
1009
+  #define NOZZLE_CLEAN_CIRCLE_RADIUS 6.5
1010
+  // Circular pattern circle fragments number
1011
+  #define NOZZLE_CLEAN_CIRCLE_FN 10
1012
+  // Middle point of circle
1013
+  #define NOZZLE_CLEAN_CIRCLE_MIDDLE NOZZLE_CLEAN_START_POINT
1014
+
1004 1015
   // Moves the nozzle to the initial position
1005 1016
   #define NOZZLE_CLEAN_GOBACK
1006 1017
 #endif

+ 13
- 2
Marlin/example_configurations/Felix/DUAL/Configuration.h View File

@@ -96,7 +96,7 @@
96 96
 //
97 97
 // Marlin now allow you to have a vendor boot image to be displayed on machine
98 98
 // start. When SHOW_CUSTOM_BOOTSCREEN is defined Marlin will first show your
99
-// custom boot image and them the default Marlin boot image is shown.
99
+// custom boot image and then the default Marlin boot image is shown.
100 100
 //
101 101
 // We suggest for you to take advantage of this new feature and keep the Marlin
102 102
 // boot image unmodified. For an example have a look at the bq Hephestos 2
@@ -983,6 +983,10 @@
983 983
 //                       |________|_________|_________|
984 984
 //                           T1        T2        T3
985 985
 //
986
+//   P2: This starts a circular pattern with circle with middle in
987
+//       NOZZLE_CLEAN_CIRCLE_MIDDLE radius of R and stroke count of S.
988
+//       Before starting the circle nozzle goes to NOZZLE_CLEAN_START_POINT.
989
+//
986 990
 // Caveats: End point Z should use the same value as Start point Z.
987 991
 //
988 992
 // Attention: This is an EXPERIMENTAL feature, in the future the G-code arguments
@@ -993,7 +997,7 @@
993 997
 #if ENABLED(NOZZLE_CLEAN_FEATURE)
994 998
   // Default number of pattern repetitions
995 999
   #define NOZZLE_CLEAN_STROKES  12
996
-  
1000
+
997 1001
   // Default number of triangles
998 1002
   #define NOZZLE_CLEAN_TRIANGLES  3
999 1003
 
@@ -1001,6 +1005,13 @@
1001 1005
   #define NOZZLE_CLEAN_START_POINT { 30, 30, (Z_MIN_POS + 1)}
1002 1006
   #define NOZZLE_CLEAN_END_POINT   {100, 60, (Z_MIN_POS + 1)}
1003 1007
 
1008
+  // Circular pattern radius
1009
+  #define NOZZLE_CLEAN_CIRCLE_RADIUS 6.5
1010
+  // Circular pattern circle fragments number
1011
+  #define NOZZLE_CLEAN_CIRCLE_FN 10
1012
+  // Middle point of circle
1013
+  #define NOZZLE_CLEAN_CIRCLE_MIDDLE NOZZLE_CLEAN_START_POINT
1014
+
1004 1015
   // Moves the nozzle to the initial position
1005 1016
   #define NOZZLE_CLEAN_GOBACK
1006 1017
 #endif

+ 13
- 2
Marlin/example_configurations/Hephestos/Configuration.h View File

@@ -96,7 +96,7 @@
96 96
 //
97 97
 // Marlin now allow you to have a vendor boot image to be displayed on machine
98 98
 // start. When SHOW_CUSTOM_BOOTSCREEN is defined Marlin will first show your
99
-// custom boot image and them the default Marlin boot image is shown.
99
+// custom boot image and then the default Marlin boot image is shown.
100 100
 //
101 101
 // We suggest for you to take advantage of this new feature and keep the Marlin
102 102
 // boot image unmodified. For an example have a look at the bq Hephestos 2
@@ -992,6 +992,10 @@
992 992
 //                       |________|_________|_________|
993 993
 //                           T1        T2        T3
994 994
 //
995
+//   P2: This starts a circular pattern with circle with middle in
996
+//       NOZZLE_CLEAN_CIRCLE_MIDDLE radius of R and stroke count of S.
997
+//       Before starting the circle nozzle goes to NOZZLE_CLEAN_START_POINT.
998
+//
995 999
 // Caveats: End point Z should use the same value as Start point Z.
996 1000
 //
997 1001
 // Attention: This is an EXPERIMENTAL feature, in the future the G-code arguments
@@ -1002,7 +1006,7 @@
1002 1006
 #if ENABLED(NOZZLE_CLEAN_FEATURE)
1003 1007
   // Default number of pattern repetitions
1004 1008
   #define NOZZLE_CLEAN_STROKES  12
1005
-  
1009
+
1006 1010
   // Default number of triangles
1007 1011
   #define NOZZLE_CLEAN_TRIANGLES  3
1008 1012
 
@@ -1010,6 +1014,13 @@
1010 1014
   #define NOZZLE_CLEAN_START_POINT { 30, 30, (Z_MIN_POS + 1)}
1011 1015
   #define NOZZLE_CLEAN_END_POINT   {100, 60, (Z_MIN_POS + 1)}
1012 1016
 
1017
+  // Circular pattern radius
1018
+  #define NOZZLE_CLEAN_CIRCLE_RADIUS 6.5
1019
+  // Circular pattern circle fragments number
1020
+  #define NOZZLE_CLEAN_CIRCLE_FN 10
1021
+  // Middle point of circle
1022
+  #define NOZZLE_CLEAN_CIRCLE_MIDDLE NOZZLE_CLEAN_START_POINT
1023
+
1013 1024
   // Moves the nozzle to the initial position
1014 1025
   #define NOZZLE_CLEAN_GOBACK
1015 1026
 #endif

+ 13
- 2
Marlin/example_configurations/Hephestos_2/Configuration.h View File

@@ -96,7 +96,7 @@
96 96
 //
97 97
 // Marlin now allow you to have a vendor boot image to be displayed on machine
98 98
 // start. When SHOW_CUSTOM_BOOTSCREEN is defined Marlin will first show your
99
-// custom boot image and them the default Marlin boot image is shown.
99
+// custom boot image and then the default Marlin boot image is shown.
100 100
 //
101 101
 // We suggest for you to take advantage of this new feature and keep the Marlin
102 102
 // boot image unmodified. For an example have a look at the bq Hephestos 2
@@ -994,6 +994,10 @@
994 994
 //                       |________|_________|_________|
995 995
 //                           T1        T2        T3
996 996
 //
997
+//   P2: This starts a circular pattern with circle with middle in
998
+//       NOZZLE_CLEAN_CIRCLE_MIDDLE radius of R and stroke count of S.
999
+//       Before starting the circle nozzle goes to NOZZLE_CLEAN_START_POINT.
1000
+//
997 1001
 // Caveats: End point Z should use the same value as Start point Z.
998 1002
 //
999 1003
 // Attention: This is an EXPERIMENTAL feature, in the future the G-code arguments
@@ -1004,7 +1008,7 @@
1004 1008
 #if ENABLED(NOZZLE_CLEAN_FEATURE)
1005 1009
   // Default number of pattern repetitions
1006 1010
   #define NOZZLE_CLEAN_STROKES  12
1007
-  
1011
+
1008 1012
   // Default number of triangles
1009 1013
   #define NOZZLE_CLEAN_TRIANGLES  3
1010 1014
 
@@ -1012,6 +1016,13 @@
1012 1016
   #define NOZZLE_CLEAN_START_POINT { X_MIN_POS + 10, Y_MAX_POS - 9, (Z_MIN_POS + 0.5)}
1013 1017
   #define NOZZLE_CLEAN_END_POINT   { X_MIN_POS + 90, Y_MAX_POS - 0, (Z_MIN_POS + 0.5)}
1014 1018
 
1019
+  // Circular pattern radius
1020
+  #define NOZZLE_CLEAN_CIRCLE_RADIUS 6.5
1021
+  // Circular pattern circle fragments number
1022
+  #define NOZZLE_CLEAN_CIRCLE_FN 10
1023
+  // Middle point of circle
1024
+  #define NOZZLE_CLEAN_CIRCLE_MIDDLE NOZZLE_CLEAN_START_POINT
1025
+
1015 1026
   // Moves the nozzle to the initial position
1016 1027
   //#define NOZZLE_CLEAN_GOBACK
1017 1028
 #endif

+ 13
- 2
Marlin/example_configurations/K8200/Configuration.h View File

@@ -112,7 +112,7 @@
112 112
 //
113 113
 // Marlin now allow you to have a vendor boot image to be displayed on machine
114 114
 // start. When SHOW_CUSTOM_BOOTSCREEN is defined Marlin will first show your
115
-// custom boot image and them the default Marlin boot image is shown.
115
+// custom boot image and then the default Marlin boot image is shown.
116 116
 //
117 117
 // We suggest for you to take advantage of this new feature and keep the Marlin
118 118
 // boot image unmodified. For an example have a look at the bq Hephestos 2
@@ -1029,6 +1029,10 @@
1029 1029
 //                       |________|_________|_________|
1030 1030
 //                           T1        T2        T3
1031 1031
 //
1032
+//   P2: This starts a circular pattern with circle with middle in
1033
+//       NOZZLE_CLEAN_CIRCLE_MIDDLE radius of R and stroke count of S.
1034
+//       Before starting the circle nozzle goes to NOZZLE_CLEAN_START_POINT.
1035
+//
1032 1036
 // Caveats: End point Z should use the same value as Start point Z.
1033 1037
 //
1034 1038
 // Attention: This is an EXPERIMENTAL feature, in the future the G-code arguments
@@ -1039,7 +1043,7 @@
1039 1043
 #if ENABLED(NOZZLE_CLEAN_FEATURE)
1040 1044
   // Default number of pattern repetitions
1041 1045
   #define NOZZLE_CLEAN_STROKES  12
1042
-  
1046
+
1043 1047
   // Default number of triangles
1044 1048
   #define NOZZLE_CLEAN_TRIANGLES  3
1045 1049
 
@@ -1047,6 +1051,13 @@
1047 1051
   #define NOZZLE_CLEAN_START_POINT { 30, 30, (Z_MIN_POS + 1)}
1048 1052
   #define NOZZLE_CLEAN_END_POINT   {100, 60, (Z_MIN_POS + 1)}
1049 1053
 
1054
+  // Circular pattern radius
1055
+  #define NOZZLE_CLEAN_CIRCLE_RADIUS 6.5
1056
+  // Circular pattern circle fragments number
1057
+  #define NOZZLE_CLEAN_CIRCLE_FN 10
1058
+  // Middle point of circle
1059
+  #define NOZZLE_CLEAN_CIRCLE_MIDDLE NOZZLE_CLEAN_START_POINT
1060
+
1050 1061
   // Moves the nozzle to the initial position
1051 1062
   #define NOZZLE_CLEAN_GOBACK
1052 1063
 #endif

+ 13
- 2
Marlin/example_configurations/K8400/Configuration.h View File

@@ -96,7 +96,7 @@
96 96
 //
97 97
 // Marlin now allow you to have a vendor boot image to be displayed on machine
98 98
 // start. When SHOW_CUSTOM_BOOTSCREEN is defined Marlin will first show your
99
-// custom boot image and them the default Marlin boot image is shown.
99
+// custom boot image and then the default Marlin boot image is shown.
100 100
 //
101 101
 // We suggest for you to take advantage of this new feature and keep the Marlin
102 102
 // boot image unmodified. For an example have a look at the bq Hephestos 2
@@ -1000,6 +1000,10 @@
1000 1000
 //                       |________|_________|_________|
1001 1001
 //                           T1        T2        T3
1002 1002
 //
1003
+//   P2: This starts a circular pattern with circle with middle in
1004
+//       NOZZLE_CLEAN_CIRCLE_MIDDLE radius of R and stroke count of S.
1005
+//       Before starting the circle nozzle goes to NOZZLE_CLEAN_START_POINT.
1006
+//
1003 1007
 // Caveats: End point Z should use the same value as Start point Z.
1004 1008
 //
1005 1009
 // Attention: This is an EXPERIMENTAL feature, in the future the G-code arguments
@@ -1010,7 +1014,7 @@
1010 1014
 #if ENABLED(NOZZLE_CLEAN_FEATURE)
1011 1015
   // Default number of pattern repetitions
1012 1016
   #define NOZZLE_CLEAN_STROKES  12
1013
-  
1017
+
1014 1018
   // Default number of triangles
1015 1019
   #define NOZZLE_CLEAN_TRIANGLES  3
1016 1020
 
@@ -1018,6 +1022,13 @@
1018 1022
   #define NOZZLE_CLEAN_START_POINT { 30, 30, (Z_MIN_POS + 1)}
1019 1023
   #define NOZZLE_CLEAN_END_POINT   {100, 60, (Z_MIN_POS + 1)}
1020 1024
 
1025
+  // Circular pattern radius
1026
+  #define NOZZLE_CLEAN_CIRCLE_RADIUS 6.5
1027
+  // Circular pattern circle fragments number
1028
+  #define NOZZLE_CLEAN_CIRCLE_FN 10
1029
+  // Middle point of circle
1030
+  #define NOZZLE_CLEAN_CIRCLE_MIDDLE NOZZLE_CLEAN_START_POINT
1031
+
1021 1032
   // Moves the nozzle to the initial position
1022 1033
   #define NOZZLE_CLEAN_GOBACK
1023 1034
 #endif

+ 13
- 2
Marlin/example_configurations/K8400/Dual-head/Configuration.h View File

@@ -96,7 +96,7 @@
96 96
 //
97 97
 // Marlin now allow you to have a vendor boot image to be displayed on machine
98 98
 // start. When SHOW_CUSTOM_BOOTSCREEN is defined Marlin will first show your
99
-// custom boot image and them the default Marlin boot image is shown.
99
+// custom boot image and then the default Marlin boot image is shown.
100 100
 //
101 101
 // We suggest for you to take advantage of this new feature and keep the Marlin
102 102
 // boot image unmodified. For an example have a look at the bq Hephestos 2
@@ -1000,6 +1000,10 @@
1000 1000
 //                       |________|_________|_________|
1001 1001
 //                           T1        T2        T3
1002 1002
 //
1003
+//   P2: This starts a circular pattern with circle with middle in
1004
+//       NOZZLE_CLEAN_CIRCLE_MIDDLE radius of R and stroke count of S.
1005
+//       Before starting the circle nozzle goes to NOZZLE_CLEAN_START_POINT.
1006
+//
1003 1007
 // Caveats: End point Z should use the same value as Start point Z.
1004 1008
 //
1005 1009
 // Attention: This is an EXPERIMENTAL feature, in the future the G-code arguments
@@ -1010,7 +1014,7 @@
1010 1014
 #if ENABLED(NOZZLE_CLEAN_FEATURE)
1011 1015
   // Default number of pattern repetitions
1012 1016
   #define NOZZLE_CLEAN_STROKES  12
1013
-  
1017
+
1014 1018
   // Default number of triangles
1015 1019
   #define NOZZLE_CLEAN_TRIANGLES  3
1016 1020
 
@@ -1018,6 +1022,13 @@
1018 1022
   #define NOZZLE_CLEAN_START_POINT { 30, 30, (Z_MIN_POS + 1)}
1019 1023
   #define NOZZLE_CLEAN_END_POINT   {100, 60, (Z_MIN_POS + 1)}
1020 1024
 
1025
+  // Circular pattern radius
1026
+  #define NOZZLE_CLEAN_CIRCLE_RADIUS 6.5
1027
+  // Circular pattern circle fragments number
1028
+  #define NOZZLE_CLEAN_CIRCLE_FN 10
1029
+  // Middle point of circle
1030
+  #define NOZZLE_CLEAN_CIRCLE_MIDDLE NOZZLE_CLEAN_START_POINT
1031
+
1021 1032
   // Moves the nozzle to the initial position
1022 1033
   #define NOZZLE_CLEAN_GOBACK
1023 1034
 #endif

+ 13
- 2
Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h View File

@@ -96,7 +96,7 @@
96 96
 //
97 97
 // Marlin now allow you to have a vendor boot image to be displayed on machine
98 98
 // start. When SHOW_CUSTOM_BOOTSCREEN is defined Marlin will first show your
99
-// custom boot image and them the default Marlin boot image is shown.
99
+// custom boot image and then the default Marlin boot image is shown.
100 100
 //
101 101
 // We suggest for you to take advantage of this new feature and keep the Marlin
102 102
 // boot image unmodified. For an example have a look at the bq Hephestos 2
@@ -1000,6 +1000,10 @@
1000 1000
 //                       |________|_________|_________|
1001 1001
 //                           T1        T2        T3
1002 1002
 //
1003
+//   P2: This starts a circular pattern with circle with middle in
1004
+//       NOZZLE_CLEAN_CIRCLE_MIDDLE radius of R and stroke count of S.
1005
+//       Before starting the circle nozzle goes to NOZZLE_CLEAN_START_POINT.
1006
+//
1003 1007
 // Caveats: End point Z should use the same value as Start point Z.
1004 1008
 //
1005 1009
 // Attention: This is an EXPERIMENTAL feature, in the future the G-code arguments
@@ -1010,7 +1014,7 @@
1010 1014
 #if ENABLED(NOZZLE_CLEAN_FEATURE)
1011 1015
   // Default number of pattern repetitions
1012 1016
   #define NOZZLE_CLEAN_STROKES  12
1013
-  
1017
+
1014 1018
   // Default number of triangles
1015 1019
   #define NOZZLE_CLEAN_TRIANGLES  3
1016 1020
 
@@ -1018,6 +1022,13 @@
1018 1022
   #define NOZZLE_CLEAN_START_POINT { 30, 30, (Z_MIN_POS + 1)}
1019 1023
   #define NOZZLE_CLEAN_END_POINT   {100, 60, (Z_MIN_POS + 1)}
1020 1024
 
1025
+  // Circular pattern radius
1026
+  #define NOZZLE_CLEAN_CIRCLE_RADIUS 6.5
1027
+  // Circular pattern circle fragments number
1028
+  #define NOZZLE_CLEAN_CIRCLE_FN 10
1029
+  // Middle point of circle
1030
+  #define NOZZLE_CLEAN_CIRCLE_MIDDLE NOZZLE_CLEAN_START_POINT
1031
+
1021 1032
   // Moves the nozzle to the initial position
1022 1033
   #define NOZZLE_CLEAN_GOBACK
1023 1034
 #endif

+ 13
- 2
Marlin/example_configurations/RigidBot/Configuration.h View File

@@ -96,7 +96,7 @@
96 96
 //
97 97
 // Marlin now allow you to have a vendor boot image to be displayed on machine
98 98
 // start. When SHOW_CUSTOM_BOOTSCREEN is defined Marlin will first show your
99
-// custom boot image and them the default Marlin boot image is shown.
99
+// custom boot image and then the default Marlin boot image is shown.
100 100
 //
101 101
 // We suggest for you to take advantage of this new feature and keep the Marlin
102 102
 // boot image unmodified. For an example have a look at the bq Hephestos 2
@@ -999,6 +999,10 @@
999 999
 //                       |________|_________|_________|
1000 1000
 //                           T1        T2        T3
1001 1001
 //
1002
+//   P2: This starts a circular pattern with circle with middle in
1003
+//       NOZZLE_CLEAN_CIRCLE_MIDDLE radius of R and stroke count of S.
1004
+//       Before starting the circle nozzle goes to NOZZLE_CLEAN_START_POINT.
1005
+//
1002 1006
 // Caveats: End point Z should use the same value as Start point Z.
1003 1007
 //
1004 1008
 // Attention: This is an EXPERIMENTAL feature, in the future the G-code arguments
@@ -1009,7 +1013,7 @@
1009 1013
 #if ENABLED(NOZZLE_CLEAN_FEATURE)
1010 1014
   // Default number of pattern repetitions
1011 1015
   #define NOZZLE_CLEAN_STROKES  12
1012
-  
1016
+
1013 1017
   // Default number of triangles
1014 1018
   #define NOZZLE_CLEAN_TRIANGLES  3
1015 1019
 
@@ -1017,6 +1021,13 @@
1017 1021
   #define NOZZLE_CLEAN_START_POINT { 30, 30, (Z_MIN_POS + 1)}
1018 1022
   #define NOZZLE_CLEAN_END_POINT   {100, 60, (Z_MIN_POS + 1)}
1019 1023
 
1024
+  // Circular pattern radius
1025
+  #define NOZZLE_CLEAN_CIRCLE_RADIUS 6.5
1026
+  // Circular pattern circle fragments number
1027
+  #define NOZZLE_CLEAN_CIRCLE_FN 10
1028
+  // Middle point of circle
1029
+  #define NOZZLE_CLEAN_CIRCLE_MIDDLE NOZZLE_CLEAN_START_POINT
1030
+
1020 1031
   // Moves the nozzle to the initial position
1021 1032
   #define NOZZLE_CLEAN_GOBACK
1022 1033
 #endif

+ 13
- 2
Marlin/example_configurations/SCARA/Configuration.h View File

@@ -128,7 +128,7 @@
128 128
 //
129 129
 // Marlin now allow you to have a vendor boot image to be displayed on machine
130 130
 // start. When SHOW_CUSTOM_BOOTSCREEN is defined Marlin will first show your
131
-// custom boot image and them the default Marlin boot image is shown.
131
+// custom boot image and then the default Marlin boot image is shown.
132 132
 //
133 133
 // We suggest for you to take advantage of this new feature and keep the Marlin
134 134
 // boot image unmodified. For an example have a look at the bq Hephestos 2
@@ -1015,6 +1015,10 @@
1015 1015
 //                       |________|_________|_________|
1016 1016
 //                           T1        T2        T3
1017 1017
 //
1018
+//   P2: This starts a circular pattern with circle with middle in
1019
+//       NOZZLE_CLEAN_CIRCLE_MIDDLE radius of R and stroke count of S.
1020
+//       Before starting the circle nozzle goes to NOZZLE_CLEAN_START_POINT.
1021
+//
1018 1022
 // Caveats: End point Z should use the same value as Start point Z.
1019 1023
 //
1020 1024
 // Attention: This is an EXPERIMENTAL feature, in the future the G-code arguments
@@ -1025,7 +1029,7 @@
1025 1029
 #if ENABLED(NOZZLE_CLEAN_FEATURE)
1026 1030
   // Default number of pattern repetitions
1027 1031
   #define NOZZLE_CLEAN_STROKES  12
1028
-  
1032
+
1029 1033
   // Default number of triangles
1030 1034
   #define NOZZLE_CLEAN_TRIANGLES  3
1031 1035
 
@@ -1033,6 +1037,13 @@
1033 1037
   #define NOZZLE_CLEAN_START_POINT { 30, 30, (Z_MIN_POS + 1)}
1034 1038
   #define NOZZLE_CLEAN_END_POINT   {100, 60, (Z_MIN_POS + 1)}
1035 1039
 
1040
+  // Circular pattern radius
1041
+  #define NOZZLE_CLEAN_CIRCLE_RADIUS 6.5
1042
+  // Circular pattern circle fragments number
1043
+  #define NOZZLE_CLEAN_CIRCLE_FN 10
1044
+  // Middle point of circle
1045
+  #define NOZZLE_CLEAN_CIRCLE_MIDDLE NOZZLE_CLEAN_START_POINT
1046
+
1036 1047
   // Moves the nozzle to the initial position
1037 1048
   #define NOZZLE_CLEAN_GOBACK
1038 1049
 #endif

+ 13
- 2
Marlin/example_configurations/TAZ4/Configuration.h View File

@@ -96,7 +96,7 @@
96 96
 //
97 97
 // Marlin now allow you to have a vendor boot image to be displayed on machine
98 98
 // start. When SHOW_CUSTOM_BOOTSCREEN is defined Marlin will first show your
99
-// custom boot image and them the default Marlin boot image is shown.
99
+// custom boot image and then the default Marlin boot image is shown.
100 100
 //
101 101
 // We suggest for you to take advantage of this new feature and keep the Marlin
102 102
 // boot image unmodified. For an example have a look at the bq Hephestos 2
@@ -1021,6 +1021,10 @@
1021 1021
 //                       |________|_________|_________|
1022 1022
 //                           T1        T2        T3
1023 1023
 //
1024
+//   P2: This starts a circular pattern with circle with middle in
1025
+//       NOZZLE_CLEAN_CIRCLE_MIDDLE radius of R and stroke count of S.
1026
+//       Before starting the circle nozzle goes to NOZZLE_CLEAN_START_POINT.
1027
+//
1024 1028
 // Caveats: End point Z should use the same value as Start point Z.
1025 1029
 //
1026 1030
 // Attention: This is an EXPERIMENTAL feature, in the future the G-code arguments
@@ -1031,7 +1035,7 @@
1031 1035
 #if ENABLED(NOZZLE_CLEAN_FEATURE)
1032 1036
   // Default number of pattern repetitions
1033 1037
   #define NOZZLE_CLEAN_STROKES  12
1034
-  
1038
+
1035 1039
   // Default number of triangles
1036 1040
   #define NOZZLE_CLEAN_TRIANGLES  3
1037 1041
 
@@ -1039,6 +1043,13 @@
1039 1043
   #define NOZZLE_CLEAN_START_POINT { 30, 30, (Z_MIN_POS + 1)}
1040 1044
   #define NOZZLE_CLEAN_END_POINT   {100, 60, (Z_MIN_POS + 1)}
1041 1045
 
1046
+  // Circular pattern radius
1047
+  #define NOZZLE_CLEAN_CIRCLE_RADIUS 6.5
1048
+  // Circular pattern circle fragments number
1049
+  #define NOZZLE_CLEAN_CIRCLE_FN 10
1050
+  // Middle point of circle
1051
+  #define NOZZLE_CLEAN_CIRCLE_MIDDLE NOZZLE_CLEAN_START_POINT
1052
+
1042 1053
   // Moves the nozzle to the initial position
1043 1054
   #define NOZZLE_CLEAN_GOBACK
1044 1055
 #endif

+ 13
- 2
Marlin/example_configurations/WITBOX/Configuration.h View File

@@ -96,7 +96,7 @@
96 96
 //
97 97
 // Marlin now allow you to have a vendor boot image to be displayed on machine
98 98
 // start. When SHOW_CUSTOM_BOOTSCREEN is defined Marlin will first show your
99
-// custom boot image and them the default Marlin boot image is shown.
99
+// custom boot image and then the default Marlin boot image is shown.
100 100
 //
101 101
 // We suggest for you to take advantage of this new feature and keep the Marlin
102 102
 // boot image unmodified. For an example have a look at the bq Hephestos 2
@@ -992,6 +992,10 @@
992 992
 //                       |________|_________|_________|
993 993
 //                           T1        T2        T3
994 994
 //
995
+//   P2: This starts a circular pattern with circle with middle in
996
+//       NOZZLE_CLEAN_CIRCLE_MIDDLE radius of R and stroke count of S.
997
+//       Before starting the circle nozzle goes to NOZZLE_CLEAN_START_POINT.
998
+//
995 999
 // Caveats: End point Z should use the same value as Start point Z.
996 1000
 //
997 1001
 // Attention: This is an EXPERIMENTAL feature, in the future the G-code arguments
@@ -1002,7 +1006,7 @@
1002 1006
 #if ENABLED(NOZZLE_CLEAN_FEATURE)
1003 1007
   // Default number of pattern repetitions
1004 1008
   #define NOZZLE_CLEAN_STROKES  12
1005
-  
1009
+
1006 1010
   // Default number of triangles
1007 1011
   #define NOZZLE_CLEAN_TRIANGLES  3
1008 1012
 
@@ -1010,6 +1014,13 @@
1010 1014
   #define NOZZLE_CLEAN_START_POINT { 30, 30, (Z_MIN_POS + 1)}
1011 1015
   #define NOZZLE_CLEAN_END_POINT   {100, 60, (Z_MIN_POS + 1)}
1012 1016
 
1017
+  // Circular pattern radius
1018
+  #define NOZZLE_CLEAN_CIRCLE_RADIUS 6.5
1019
+  // Circular pattern circle fragments number
1020
+  #define NOZZLE_CLEAN_CIRCLE_FN 10
1021
+  // Middle point of circle
1022
+  #define NOZZLE_CLEAN_CIRCLE_MIDDLE NOZZLE_CLEAN_START_POINT
1023
+
1013 1024
   // Moves the nozzle to the initial position
1014 1025
   #define NOZZLE_CLEAN_GOBACK
1015 1026
 #endif

+ 13
- 2
Marlin/example_configurations/adafruit/ST7565/Configuration.h View File

@@ -96,7 +96,7 @@
96 96
 //
97 97
 // Marlin now allow you to have a vendor boot image to be displayed on machine
98 98
 // start. When SHOW_CUSTOM_BOOTSCREEN is defined Marlin will first show your
99
-// custom boot image and them the default Marlin boot image is shown.
99
+// custom boot image and then the default Marlin boot image is shown.
100 100
 //
101 101
 // We suggest for you to take advantage of this new feature and keep the Marlin
102 102
 // boot image unmodified. For an example have a look at the bq Hephestos 2
@@ -1000,6 +1000,10 @@
1000 1000
 //                       |________|_________|_________|
1001 1001
 //                           T1        T2        T3
1002 1002
 //
1003
+//   P2: This starts a circular pattern with circle with middle in
1004
+//       NOZZLE_CLEAN_CIRCLE_MIDDLE radius of R and stroke count of S.
1005
+//       Before starting the circle nozzle goes to NOZZLE_CLEAN_START_POINT.
1006
+//
1003 1007
 // Caveats: End point Z should use the same value as Start point Z.
1004 1008
 //
1005 1009
 // Attention: This is an EXPERIMENTAL feature, in the future the G-code arguments
@@ -1010,7 +1014,7 @@
1010 1014
 #if ENABLED(NOZZLE_CLEAN_FEATURE)
1011 1015
   // Default number of pattern repetitions
1012 1016
   #define NOZZLE_CLEAN_STROKES  12
1013
-  
1017
+
1014 1018
   // Default number of triangles
1015 1019
   #define NOZZLE_CLEAN_TRIANGLES  3
1016 1020
 
@@ -1018,6 +1022,13 @@
1018 1022
   #define NOZZLE_CLEAN_START_POINT { 30, 30, (Z_MIN_POS + 1)}
1019 1023
   #define NOZZLE_CLEAN_END_POINT   {100, 60, (Z_MIN_POS + 1)}
1020 1024
 
1025
+  // Circular pattern radius
1026
+  #define NOZZLE_CLEAN_CIRCLE_RADIUS 6.5
1027
+  // Circular pattern circle fragments number
1028
+  #define NOZZLE_CLEAN_CIRCLE_FN 10
1029
+  // Middle point of circle
1030
+  #define NOZZLE_CLEAN_CIRCLE_MIDDLE NOZZLE_CLEAN_START_POINT
1031
+
1021 1032
   // Moves the nozzle to the initial position
1022 1033
   #define NOZZLE_CLEAN_GOBACK
1023 1034
 #endif

+ 468
- 452
Marlin/example_configurations/delta/flsun_kossel_mini/Configuration.h
File diff suppressed because it is too large
View File


+ 154
- 75
Marlin/example_configurations/delta/flsun_kossel_mini/Configuration_adv.h View File

@@ -217,13 +217,12 @@
217 217
  * Multiple extruders can be assigned to the same pin in which case
218 218
  * the fan will turn on when any selected extruder is above the threshold.
219 219
  */
220
-
221 220
 #define E0_AUTO_FAN_PIN -1
222 221
 #define E1_AUTO_FAN_PIN -1
223 222
 #define E2_AUTO_FAN_PIN -1
224 223
 #define E3_AUTO_FAN_PIN -1
225 224
 #define EXTRUDER_AUTO_FAN_TEMPERATURE 50
226
-#define EXTRUDER_AUTO_FAN_SPEED   255  // 255 == full speed
225
+#define EXTRUDER_AUTO_FAN_SPEED   255  // == full speed
227 226
 
228 227
 // Define a pin to turn case light on/off
229 228
 //#define CASE_LIGHT_PIN 4
@@ -309,13 +308,13 @@
309 308
       // Remember: you should set the second extruder x-offset to 0 in your slicer.
310 309
 
311 310
   // There are a few selectable movement modes for dual x-carriages using M605 S<mode>
312
-  //    Mode 0: Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
313
-  //                           as long as it supports dual x-carriages. (M605 S0)
314
-  //    Mode 1: Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so
315
-  //                           that additional slicer support is not required. (M605 S1)
316
-  //    Mode 2: Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all
317
-  //                           actions of the first x-carriage. This allows the printer to print 2 arbitrary items at
318
-  //                           once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
311
+  //    Mode 0 (DXC_FULL_CONTROL_MODE): Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
312
+  //                                    as long as it supports dual x-carriages. (M605 S0)
313
+  //    Mode 1 (DXC_AUTO_PARK_MODE)   : Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so
314
+  //                                    that additional slicer support is not required. (M605 S1)
315
+  //    Mode 2 (DXC_DUPLICATION_MODE) : Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all
316
+  //                                    actions of the first x-carriage. This allows the printer to print 2 arbitrary items at
317
+  //                                    once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
319 318
 
320 319
   // This is the default power-up mode which can be later using M605.
321 320
   #define DEFAULT_DUAL_X_CARRIAGE_MODE DXC_FULL_CONTROL_MODE
@@ -428,6 +427,9 @@
428 427
 // On the Info Screen, display XY with one decimal place when possible
429 428
 //#define LCD_DECIMAL_SMALL_XY
430 429
 
430
+// The timeout (in ms) to return to the status screen from sub-menus
431
+//#define LCD_TIMEOUT_TO_STATUS 15000
432
+
431 433
 #if ENABLED(SDSUPPORT)
432 434
 
433 435
   // Some RAMPS and other boards don't detect when an SD card is inserted. You can work
@@ -445,6 +447,42 @@
445 447
   // using:
446 448
   //#define MENU_ADDAUTOSTART
447 449
 
450
+  /**
451
+   * Sort SD file listings in alphabetical order.
452
+   *
453
+   * With this option enabled, items on SD cards will be sorted
454
+   * by name for easier navigation.
455
+   *
456
+   * By default...
457
+   *
458
+   *  - Use the slowest -but safest- method for sorting.
459
+   *  - Folders are sorted to the top.
460
+   *  - The sort key is statically allocated.
461
+   *  - No added G-code (M34) support.
462
+   *  - 40 item sorting limit. (Items after the first 40 are unsorted.)
463
+   *
464
+   * SD sorting uses static allocation (as set by SDSORT_LIMIT), allowing the
465
+   * compiler to calculate the worst-case usage and throw an error if the SRAM
466
+   * limit is exceeded.
467
+   *
468
+   *  - SDSORT_USES_RAM provides faster sorting via a static directory buffer.
469
+   *  - SDSORT_USES_STACK does the same, but uses a local stack-based buffer.
470
+   *  - SDSORT_CACHE_NAMES will retain the sorted file listing in RAM. (Expensive!)
471
+   *  - SDSORT_DYNAMIC_RAM only uses RAM when the SD menu is visible. (Use with caution!)
472
+   */
473
+  //#define SDCARD_SORT_ALPHA
474
+
475
+  // SD Card Sorting options
476
+  #if ENABLED(SDCARD_SORT_ALPHA)
477
+    #define SDSORT_LIMIT       40     // Maximum number of sorted items (10-256).
478
+    #define FOLDER_SORTING     -1     // -1=above  0=none  1=below
479
+    #define SDSORT_GCODE       false  // Allow turning sorting on/off with LCD and M34 g-code.
480
+    #define SDSORT_USES_RAM    false  // Pre-allocate a static array for faster pre-sorting.
481
+    #define SDSORT_USES_STACK  false  // Prefer the stack for pre-sorting to give back some SRAM. (Negated by next 2 options.)
482
+    #define SDSORT_CACHE_NAMES false  // Keep sorted items in RAM longer for speedy performance. Most expensive option.
483
+    #define SDSORT_DYNAMIC_RAM false  // Use dynamic allocation (within SD menus). Least expensive option. Set SDSORT_LIMIT before use!
484
+  #endif
485
+
448 486
   // Show a progress bar on HD44780 LCDs for SD printing
449 487
   //#define LCD_PROGRESS_BAR
450 488
 
@@ -457,6 +495,8 @@
457 495
     #define PROGRESS_MSG_EXPIRE   0
458 496
     // Enable this to show messages for MSG_TIME then hide them
459 497
     //#define PROGRESS_MSG_ONCE
498
+    // Add a menu item to test the progress bar:
499
+    //#define LCD_PROGRESS_BAR_TEST
460 500
   #endif
461 501
 
462 502
   // This allows hosts to request long names for files and folders with M33
@@ -469,8 +509,25 @@
469 509
 
470 510
 #endif // SDSUPPORT
471 511
 
472
-// Some additional options are available for graphical displays:
512
+/**
513
+ * Additional options for Graphical Displays
514
+ *
515
+ * Use the optimizations here to improve printing performance,
516
+ * which can be adversely affected by graphical display drawing,
517
+ * especially when doing several short moves, and when printing
518
+ * on DELTA and SCARA machines.
519
+ *
520
+ * Some of these options may result in the display lagging behind
521
+ * controller events, as there is a trade-off between reliable
522
+ * printing performance versus fast display updates.
523
+ */
473 524
 #if ENABLED(DOGLCD)
525
+  // Enable to save many cycles by drawing a hollow frame on the Info Screen
526
+  #define XYZ_HOLLOW_FRAME
527
+
528
+  // Enable to save many cycles by drawing a hollow frame on Menu Screens
529
+  #define MENU_HOLLOW_FRAME
530
+
474 531
   // A bigger font is available for edit items. Costs 3120 bytes of PROGMEM.
475 532
   // Western only. Not available for Cyrillic, Kana, Turkish, Greek, or Chinese.
476 533
   //#define USE_BIG_EDIT_FONT
@@ -510,36 +567,6 @@
510 567
   #define BABYSTEP_MULTIPLICATOR 1 //faster movements
511 568
 #endif
512 569
 
513
-//
514
-// Ensure Smooth Moves
515
-//
516
-// Enable this option to prevent the machine from stuttering when printing multiple short segments.
517
-// This feature uses two strategies to eliminate stuttering:
518
-//
519
-// 1. During short segments a Graphical LCD update may take so much time that the planner buffer gets
520
-//    completely drained. When this happens pauses are introduced between short segments, and print moves
521
-//    will become jerky until a longer segment provides enough time for the buffer to be filled again.
522
-//    This jerkiness negatively affects print quality. The ENSURE_SMOOTH_MOVES option addresses the issue
523
-//    by pausing the LCD until there's enough time to safely update.
524
-//
525
-//    NOTE: This will cause the Info Screen to lag and controller buttons may become unresponsive.
526
-//          Enable ALWAYS_ALLOW_MENU to keep the controller responsive.
527
-//
528
-// 2. No block is allowed to take less time than MIN_BLOCK_TIME. That's the time it takes in the main
529
-//    loop to add a new block to the buffer, check temperatures, etc., including all blocked time due to
530
-//    interrupts (without LCD update). By enforcing a minimum time-per-move, the buffer is prevented from
531
-//    draining.
532
-//
533
-#define ENSURE_SMOOTH_MOVES
534
-#if ENABLED(ENSURE_SMOOTH_MOVES)
535
-  //#define ALWAYS_ALLOW_MENU      // If enabled, the menu will always be responsive.
536
-                                   // WARNING: Menu navigation during short moves may cause stuttering!
537
-  #define LCD_UPDATE_THRESHOLD 135 // (ms) Minimum duration for the current segment to allow an LCD update.
538
-                                   // Default value is good for graphical LCDs (e.g., REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER).
539
-                                   // You may try to lower this value until you printer starts stuttering again as if ENSURE_SMOOTH_MOVES is disabled.
540
-  #define MIN_BLOCK_TIME 6         // (ms) Minimum duration of a single block. You shouldn't need to modify this.
541
-#endif
542
-
543 570
 // @section extruder
544 571
 
545 572
 // extruder advance constant (s2/mm3)
@@ -561,19 +588,37 @@
561 588
  *
562 589
  * Assumption: advance = k * (delta velocity)
563 590
  * K=0 means advance disabled.
564
- * To get a rough start value for calibration, measure your "free filament length"
565
- * between the hobbed bolt and the nozzle (in cm). Use the formula below that fits
566
- * your setup, where L is the "free filament length":
567
- *
568
- * Filament diameter           |   1.75mm  |    3.0mm   |
569
- * ----------------------------|-----------|------------|
570
- * Stiff filament (PLA)        | K=47*L/10 | K=139*L/10 |
571
- * Softer filament (ABS, nGen) | K=88*L/10 | K=260*L/10 |
591
+ * See Marlin documentation for calibration instructions.
572 592
  */
573 593
 //#define LIN_ADVANCE
574 594
 
575 595
 #if ENABLED(LIN_ADVANCE)
576 596
   #define LIN_ADVANCE_K 75
597
+
598
+  /**
599
+   * Some Slicers produce Gcode with randomly jumping extrusion widths occasionally.
600
+   * For example within a 0.4mm perimeter it may produce a single segment of 0.05mm width.
601
+   * While this is harmless for normal printing (the fluid nature of the filament will
602
+   * close this very, very tiny gap), it throws off the LIN_ADVANCE pressure adaption.
603
+   *
604
+   * For this case LIN_ADVANCE_E_D_RATIO can be used to set the extrusion:distance ratio
605
+   * to a fixed value. Note that using a fixed ratio will lead to wrong nozzle pressures
606
+   * if the slicer is using variable widths or layer heights within one print!
607
+   *
608
+   * This option sets the default E:D ratio at startup. Use `M905` to override this value.
609
+   *
610
+   * Example: `M905 W0.4 H0.2 D1.75`, where:
611
+   *   - W is the extrusion width in mm
612
+   *   - H is the layer height in mm
613
+   *   - D is the filament diameter in mm
614
+   *
615
+   * Set to 0 to auto-detect the ratio based on given Gcode G1 print moves.
616
+   *
617
+   * Slic3r (including Prusa Slic3r) produces Gcode compatible with the automatic mode.
618
+   * Cura (as of this writing) may produce Gcode incompatible with the automatic mode.
619
+   */
620
+  #define LIN_ADVANCE_E_D_RATIO 0 // The calculated ratio (or 0) according to the formula W * H / ((D / 2) ^ 2 * PI)
621
+                                  // Example: 0.4 * 0.2 / ((1.75 / 2) ^ 2 * PI) = 0.033260135
577 622
 #endif
578 623
 
579 624
 // @section leveling
@@ -680,33 +725,42 @@
680 725
   #define RETRACT_RECOVER_FEEDRATE 8     //default feedrate for recovering from retraction (mm/s)
681 726
 #endif
682 727
 
683
-// Add support for experimental filament exchange support M600; requires display
684
-#if ENABLED(ULTIPANEL)
685
-  // #define FILAMENT_CHANGE_FEATURE             // Enable filament exchange menu and M600 g-code (used for runout sensor too)
686
-  #if ENABLED(FILAMENT_CHANGE_FEATURE)
687
-    #define FILAMENT_CHANGE_X_POS 3             // X position of hotend
688
-    #define FILAMENT_CHANGE_Y_POS 3             // Y position of hotend
689
-    #define FILAMENT_CHANGE_Z_ADD 10            // Z addition of hotend (lift)
690
-    #define FILAMENT_CHANGE_XY_FEEDRATE 100     // X and Y axes feedrate in mm/s (also used for delta printers Z axis)
691
-    #define FILAMENT_CHANGE_Z_FEEDRATE 5        // Z axis feedrate in mm/s (not used for delta printers)
692
-    #define FILAMENT_CHANGE_RETRACT_LENGTH 2    // Initial retract in mm
693
-                                                // It is a short retract used immediately after print interrupt before move to filament exchange position
694
-    #define FILAMENT_CHANGE_RETRACT_FEEDRATE 60 // Initial retract feedrate in mm/s
695
-    #define FILAMENT_CHANGE_UNLOAD_LENGTH 100   // Unload filament length from hotend in mm
696
-                                                // Longer length for bowden printers to unload filament from whole bowden tube,
697
-                                                // shorter lenght for printers without bowden to unload filament from extruder only,
698
-                                                // 0 to disable unloading for manual unloading
699
-    #define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10  // Unload filament feedrate in mm/s - filament unloading can be fast
700
-    #define FILAMENT_CHANGE_LOAD_LENGTH 0       // Load filament length over hotend in mm
701
-                                                // Longer length for bowden printers to fast load filament into whole bowden tube over the hotend,
702
-                                                // Short or zero length for printers without bowden where loading is not used
703
-    #define FILAMENT_CHANGE_LOAD_FEEDRATE 10    // Load filament feedrate in mm/s - filament loading into the bowden tube can be fast
704
-    #define FILAMENT_CHANGE_EXTRUDE_LENGTH 50   // Extrude filament length in mm after filament is load over the hotend,
705
-                                                // 0 to disable for manual extrusion
706
-                                                // Filament can be extruded repeatedly from the filament exchange menu to fill the hotend,
707
-                                                // or until outcoming filament color is not clear for filament color change
708
-    #define FILAMENT_CHANGE_EXTRUDE_FEEDRATE 3  // Extrude filament feedrate in mm/s - must be slower than load feedrate
709
-  #endif
728
+/**
729
+ * Filament Change
730
+ * Experimental filament change support.
731
+ * Adds the GCode M600 for initiating filament change.
732
+ *
733
+ * Requires an LCD display.
734
+ * This feature is required for the default FILAMENT_RUNOUT_SCRIPT.
735
+ */
736
+//#define FILAMENT_CHANGE_FEATURE
737
+#if ENABLED(FILAMENT_CHANGE_FEATURE)
738
+  #define FILAMENT_CHANGE_X_POS 3             // X position of hotend
739
+  #define FILAMENT_CHANGE_Y_POS 3             // Y position of hotend
740
+  #define FILAMENT_CHANGE_Z_ADD 10            // Z addition of hotend (lift)
741
+  #define FILAMENT_CHANGE_XY_FEEDRATE 100     // X and Y axes feedrate in mm/s (also used for delta printers Z axis)
742
+  #define FILAMENT_CHANGE_Z_FEEDRATE 5        // Z axis feedrate in mm/s (not used for delta printers)
743
+  #define FILAMENT_CHANGE_RETRACT_FEEDRATE 60 // Initial retract feedrate in mm/s
744
+  #define FILAMENT_CHANGE_RETRACT_LENGTH 2    // Initial retract in mm
745
+                                              // It is a short retract used immediately after print interrupt before move to filament exchange position
746
+  #define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10  // Unload filament feedrate in mm/s - filament unloading can be fast
747
+  #define FILAMENT_CHANGE_UNLOAD_LENGTH 100   // Unload filament length from hotend in mm
748
+                                              // Longer length for bowden printers to unload filament from whole bowden tube,
749
+                                              // shorter length for printers without bowden to unload filament from extruder only,
750
+                                              // 0 to disable unloading for manual unloading
751
+  #define FILAMENT_CHANGE_LOAD_FEEDRATE 6     // Load filament feedrate in mm/s - filament loading into the bowden tube can be fast
752
+  #define FILAMENT_CHANGE_LOAD_LENGTH 0       // Load filament length over hotend in mm
753
+                                              // Longer length for bowden printers to fast load filament into whole bowden tube over the hotend,
754
+                                              // Short or zero length for printers without bowden where loading is not used
755
+  #define FILAMENT_CHANGE_EXTRUDE_FEEDRATE 3  // Extrude filament feedrate in mm/s - must be slower than load feedrate
756
+  #define FILAMENT_CHANGE_EXTRUDE_LENGTH 50   // Extrude filament length in mm after filament is loaded over the hotend,
757
+                                              // 0 to disable for manual extrusion
758
+                                              // Filament can be extruded repeatedly from the filament exchange menu to fill the hotend,
759
+                                              // or until outcoming filament color is not clear for filament color change
760
+  #define FILAMENT_CHANGE_NOZZLE_TIMEOUT 45L  // Turn off nozzle if user doesn't change filament within this time limit in seconds
761
+  #define FILAMENT_CHANGE_NUMBER_OF_ALERT_BEEPS  5L  // Number of alert beeps before printer goes quiet
762
+  #define FILAMENT_CHANGE_NO_STEPPER_TIMEOUT         // Enable to have stepper motors hold position during filament change
763
+                                                     // even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME.
710 764
 #endif
711 765
 
712 766
 /******************************************************************************\
@@ -1101,4 +1155,29 @@
1101 1155
  */
1102 1156
 //#define EXTENDED_CAPABILITIES_REPORT
1103 1157
 
1158
+/**
1159
+ * Double-click the Encoder button on the Status Screen for Z Babystepping.
1160
+ */
1161
+//#define DOUBLECLICK_FOR_Z_BABYSTEPPING
1162
+#define DOUBLECLICK_MAX_INTERVAL 1250   // Maximum interval between clicks, in milliseconds.
1163
+                                        // Note: You may need to add extra time to mitigate controller latency.
1164
+
1165
+/**
1166
+ * Volumetric extrusion default state
1167
+ * Activate to make volumetric extrusion the default method,
1168
+ * with DEFAULT_NOMINAL_FILAMENT_DIA as the default diameter.
1169
+ *
1170
+ * M200 D0 to disable, M200 Dn to set a new diameter.
1171
+ */ 
1172
+//#define VOLUMETRIC_DEFAULT_ON
1173
+
1174
+/**
1175
+ * Enable this option for a leaner build of Marlin that removes all
1176
+ * workspace offsets, simplifying coordinate transformations, leveling, etc.
1177
+ *
1178
+ *  - M206 and M428 are disabled.
1179
+ *  - G92 will revert to its behavior from Marlin 1.0.
1180
+ */
1181
+//#define NO_WORKSPACE_OFFSETS
1182
+
1104 1183
 #endif // CONFIGURATION_ADV_H

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

@@ -96,7 +96,7 @@
96 96
 //
97 97
 // Marlin now allow you to have a vendor boot image to be displayed on machine
98 98
 // start. When SHOW_CUSTOM_BOOTSCREEN is defined Marlin will first show your
99
-// custom boot image and them the default Marlin boot image is shown.
99
+// custom boot image and then the default Marlin boot image is shown.
100 100
 //
101 101
 // We suggest for you to take advantage of this new feature and keep the Marlin
102 102
 // boot image unmodified. For an example have a look at the bq Hephestos 2
@@ -1087,6 +1087,10 @@
1087 1087
 //                       |________|_________|_________|
1088 1088
 //                           T1        T2        T3
1089 1089
 //
1090
+//   P2: This starts a circular pattern with circle with middle in
1091
+//       NOZZLE_CLEAN_CIRCLE_MIDDLE radius of R and stroke count of S.
1092
+//       Before starting the circle nozzle goes to NOZZLE_CLEAN_START_POINT.
1093
+//
1090 1094
 // Caveats: End point Z should use the same value as Start point Z.
1091 1095
 //
1092 1096
 // Attention: This is an EXPERIMENTAL feature, in the future the G-code arguments
@@ -1097,7 +1101,7 @@
1097 1101
 #if ENABLED(NOZZLE_CLEAN_FEATURE)
1098 1102
   // Default number of pattern repetitions
1099 1103
   #define NOZZLE_CLEAN_STROKES  12
1100
-  
1104
+
1101 1105
   // Default number of triangles
1102 1106
   #define NOZZLE_CLEAN_TRIANGLES  3
1103 1107
 
@@ -1105,6 +1109,13 @@
1105 1109
   #define NOZZLE_CLEAN_START_POINT { 30, 30, (Z_MIN_POS + 1)}
1106 1110
   #define NOZZLE_CLEAN_END_POINT   {100, 60, (Z_MIN_POS + 1)}
1107 1111
 
1112
+  // Circular pattern radius
1113
+  #define NOZZLE_CLEAN_CIRCLE_RADIUS 6.5
1114
+  // Circular pattern circle fragments number
1115
+  #define NOZZLE_CLEAN_CIRCLE_FN 10
1116
+  // Middle point of circle
1117
+  #define NOZZLE_CLEAN_CIRCLE_MIDDLE NOZZLE_CLEAN_START_POINT
1118
+
1108 1119
   // Moves the nozzle to the initial position
1109 1120
   #define NOZZLE_CLEAN_GOBACK
1110 1121
 #endif

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

@@ -96,7 +96,7 @@
96 96
 //
97 97
 // Marlin now allow you to have a vendor boot image to be displayed on machine
98 98
 // start. When SHOW_CUSTOM_BOOTSCREEN is defined Marlin will first show your
99
-// custom boot image and them the default Marlin boot image is shown.
99
+// custom boot image and then the default Marlin boot image is shown.
100 100
 //
101 101
 // We suggest for you to take advantage of this new feature and keep the Marlin
102 102
 // boot image unmodified. For an example have a look at the bq Hephestos 2
@@ -1090,6 +1090,10 @@
1090 1090
 //                       |________|_________|_________|
1091 1091
 //                           T1        T2        T3
1092 1092
 //
1093
+//   P2: This starts a circular pattern with circle with middle in
1094
+//       NOZZLE_CLEAN_CIRCLE_MIDDLE radius of R and stroke count of S.
1095
+//       Before starting the circle nozzle goes to NOZZLE_CLEAN_START_POINT.
1096
+//
1093 1097
 // Caveats: End point Z should use the same value as Start point Z.
1094 1098
 //
1095 1099
 // Attention: This is an EXPERIMENTAL feature, in the future the G-code arguments
@@ -1100,7 +1104,7 @@
1100 1104
 #if ENABLED(NOZZLE_CLEAN_FEATURE)
1101 1105
   // Default number of pattern repetitions
1102 1106
   #define NOZZLE_CLEAN_STROKES  12
1103
-  
1107
+
1104 1108
   // Default number of triangles
1105 1109
   #define NOZZLE_CLEAN_TRIANGLES  3
1106 1110
 
@@ -1108,6 +1112,13 @@
1108 1112
   #define NOZZLE_CLEAN_START_POINT { 30, 30, (Z_MIN_POS + 1)}
1109 1113
   #define NOZZLE_CLEAN_END_POINT   {100, 60, (Z_MIN_POS + 1)}
1110 1114
 
1115
+  // Circular pattern radius
1116
+  #define NOZZLE_CLEAN_CIRCLE_RADIUS 6.5
1117
+  // Circular pattern circle fragments number
1118
+  #define NOZZLE_CLEAN_CIRCLE_FN 10
1119
+  // Middle point of circle
1120
+  #define NOZZLE_CLEAN_CIRCLE_MIDDLE NOZZLE_CLEAN_START_POINT
1121
+
1111 1122
   // Moves the nozzle to the initial position
1112 1123
   #define NOZZLE_CLEAN_GOBACK
1113 1124
 #endif

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

@@ -100,7 +100,7 @@
100 100
 //
101 101
 // Marlin now allow you to have a vendor boot image to be displayed on machine
102 102
 // start. When SHOW_CUSTOM_BOOTSCREEN is defined Marlin will first show your
103
-// custom boot image and them the default Marlin boot image is shown.
103
+// custom boot image and then the default Marlin boot image is shown.
104 104
 //
105 105
 // We suggest for you to take advantage of this new feature and keep the Marlin
106 106
 // boot image unmodified. For an example have a look at the bq Hephestos 2
@@ -1089,6 +1089,10 @@
1089 1089
 //                       |________|_________|_________|
1090 1090
 //                           T1        T2        T3
1091 1091
 //
1092
+//   P2: This starts a circular pattern with circle with middle in
1093
+//       NOZZLE_CLEAN_CIRCLE_MIDDLE radius of R and stroke count of S.
1094
+//       Before starting the circle nozzle goes to NOZZLE_CLEAN_START_POINT.
1095
+//
1092 1096
 // Caveats: End point Z should use the same value as Start point Z.
1093 1097
 //
1094 1098
 // Attention: This is an EXPERIMENTAL feature, in the future the G-code arguments
@@ -1099,7 +1103,7 @@
1099 1103
 #if ENABLED(NOZZLE_CLEAN_FEATURE)
1100 1104
   // Default number of pattern repetitions
1101 1105
   #define NOZZLE_CLEAN_STROKES  12
1102
-  
1106
+
1103 1107
   // Default number of triangles
1104 1108
   #define NOZZLE_CLEAN_TRIANGLES  3
1105 1109
 
@@ -1107,6 +1111,13 @@
1107 1111
   #define NOZZLE_CLEAN_START_POINT { 30, 30, (Z_MIN_POS + 1)}
1108 1112
   #define NOZZLE_CLEAN_END_POINT   {100, 60, (Z_MIN_POS + 1)}
1109 1113
 
1114
+  // Circular pattern radius
1115
+  #define NOZZLE_CLEAN_CIRCLE_RADIUS 6.5
1116
+  // Circular pattern circle fragments number
1117
+  #define NOZZLE_CLEAN_CIRCLE_FN 10
1118
+  // Middle point of circle
1119
+  #define NOZZLE_CLEAN_CIRCLE_MIDDLE NOZZLE_CLEAN_START_POINT
1120
+
1110 1121
   // Moves the nozzle to the initial position
1111 1122
   #define NOZZLE_CLEAN_GOBACK
1112 1123
 #endif

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

@@ -89,7 +89,7 @@
89 89
 //
90 90
 // Marlin now allow you to have a vendor boot image to be displayed on machine
91 91
 // start. When SHOW_CUSTOM_BOOTSCREEN is defined Marlin will first show your
92
-// custom boot image and them the default Marlin boot image is shown.
92
+// custom boot image and then the default Marlin boot image is shown.
93 93
 //
94 94
 // We suggest for you to take advantage of this new feature and keep the Marlin
95 95
 // boot image unmodified. For an example have a look at the bq Hephestos 2
@@ -1093,6 +1093,10 @@
1093 1093
 //                       |________|_________|_________|
1094 1094
 //                           T1        T2        T3
1095 1095
 //
1096
+//   P2: This starts a circular pattern with circle with middle in
1097
+//       NOZZLE_CLEAN_CIRCLE_MIDDLE radius of R and stroke count of S.
1098
+//       Before starting the circle nozzle goes to NOZZLE_CLEAN_START_POINT.
1099
+//
1096 1100
 // Caveats: End point Z should use the same value as Start point Z.
1097 1101
 //
1098 1102
 // Attention: This is an EXPERIMENTAL feature, in the future the G-code arguments
@@ -1103,7 +1107,7 @@
1103 1107
 #if ENABLED(NOZZLE_CLEAN_FEATURE)
1104 1108
   // Default number of pattern repetitions
1105 1109
   #define NOZZLE_CLEAN_STROKES  12
1106
-  
1110
+
1107 1111
   // Default number of triangles
1108 1112
   #define NOZZLE_CLEAN_TRIANGLES  3
1109 1113
 
@@ -1111,6 +1115,13 @@
1111 1115
   #define NOZZLE_CLEAN_START_POINT { 30, 30, (Z_MIN_POS + 1)}
1112 1116
   #define NOZZLE_CLEAN_END_POINT   {100, 60, (Z_MIN_POS + 1)}
1113 1117
 
1118
+  // Circular pattern radius
1119
+  #define NOZZLE_CLEAN_CIRCLE_RADIUS 6.5
1120
+  // Circular pattern circle fragments number
1121
+  #define NOZZLE_CLEAN_CIRCLE_FN 10
1122
+  // Middle point of circle
1123
+  #define NOZZLE_CLEAN_CIRCLE_MIDDLE NOZZLE_CLEAN_START_POINT
1124
+
1114 1125
   // Moves the nozzle to the initial position
1115 1126
   #define NOZZLE_CLEAN_GOBACK
1116 1127
 #endif

+ 13
- 2
Marlin/example_configurations/makibox/Configuration.h View File

@@ -96,7 +96,7 @@
96 96
 //
97 97
 // Marlin now allow you to have a vendor boot image to be displayed on machine
98 98
 // start. When SHOW_CUSTOM_BOOTSCREEN is defined Marlin will first show your
99
-// custom boot image and them the default Marlin boot image is shown.
99
+// custom boot image and then the default Marlin boot image is shown.
100 100
 //
101 101
 // We suggest for you to take advantage of this new feature and keep the Marlin
102 102
 // boot image unmodified. For an example have a look at the bq Hephestos 2
@@ -1003,6 +1003,10 @@
1003 1003
 //                       |________|_________|_________|
1004 1004
 //                           T1        T2        T3
1005 1005
 //
1006
+//   P2: This starts a circular pattern with circle with middle in
1007
+//       NOZZLE_CLEAN_CIRCLE_MIDDLE radius of R and stroke count of S.
1008
+//       Before starting the circle nozzle goes to NOZZLE_CLEAN_START_POINT.
1009
+//
1006 1010
 // Caveats: End point Z should use the same value as Start point Z.
1007 1011
 //
1008 1012
 // Attention: This is an EXPERIMENTAL feature, in the future the G-code arguments
@@ -1013,7 +1017,7 @@
1013 1017
 #if ENABLED(NOZZLE_CLEAN_FEATURE)
1014 1018
   // Default number of pattern repetitions
1015 1019
   #define NOZZLE_CLEAN_STROKES  12
1016
-  
1020
+
1017 1021
   // Default number of triangles
1018 1022
   #define NOZZLE_CLEAN_TRIANGLES  3
1019 1023
 
@@ -1021,6 +1025,13 @@
1021 1025
   #define NOZZLE_CLEAN_START_POINT { 30, 30, (Z_MIN_POS + 1)}
1022 1026
   #define NOZZLE_CLEAN_END_POINT   {100, 60, (Z_MIN_POS + 1)}
1023 1027
 
1028
+  // Circular pattern radius
1029
+  #define NOZZLE_CLEAN_CIRCLE_RADIUS 6.5
1030
+  // Circular pattern circle fragments number
1031
+  #define NOZZLE_CLEAN_CIRCLE_FN 10
1032
+  // Middle point of circle
1033
+  #define NOZZLE_CLEAN_CIRCLE_MIDDLE NOZZLE_CLEAN_START_POINT
1034
+
1024 1035
   // Moves the nozzle to the initial position
1025 1036
   #define NOZZLE_CLEAN_GOBACK
1026 1037
 #endif

+ 13
- 2
Marlin/example_configurations/tvrrug/Round2/Configuration.h View File

@@ -96,7 +96,7 @@
96 96
 //
97 97
 // Marlin now allow you to have a vendor boot image to be displayed on machine
98 98
 // start. When SHOW_CUSTOM_BOOTSCREEN is defined Marlin will first show your
99
-// custom boot image and them the default Marlin boot image is shown.
99
+// custom boot image and then the default Marlin boot image is shown.
100 100
 //
101 101
 // We suggest for you to take advantage of this new feature and keep the Marlin
102 102
 // boot image unmodified. For an example have a look at the bq Hephestos 2
@@ -996,6 +996,10 @@
996 996
 //                       |________|_________|_________|
997 997
 //                           T1        T2        T3
998 998
 //
999
+//   P2: This starts a circular pattern with circle with middle in
1000
+//       NOZZLE_CLEAN_CIRCLE_MIDDLE radius of R and stroke count of S.
1001
+//       Before starting the circle nozzle goes to NOZZLE_CLEAN_START_POINT.
1002
+//
999 1003
 // Caveats: End point Z should use the same value as Start point Z.
1000 1004
 //
1001 1005
 // Attention: This is an EXPERIMENTAL feature, in the future the G-code arguments
@@ -1006,7 +1010,7 @@
1006 1010
 #if ENABLED(NOZZLE_CLEAN_FEATURE)
1007 1011
   // Default number of pattern repetitions
1008 1012
   #define NOZZLE_CLEAN_STROKES  12
1009
-  
1013
+
1010 1014
   // Default number of triangles
1011 1015
   #define NOZZLE_CLEAN_TRIANGLES  3
1012 1016
 
@@ -1014,6 +1018,13 @@
1014 1018
   #define NOZZLE_CLEAN_START_POINT { 30, 30, (Z_MIN_POS + 1)}
1015 1019
   #define NOZZLE_CLEAN_END_POINT   {100, 60, (Z_MIN_POS + 1)}
1016 1020
 
1021
+  // Circular pattern radius
1022
+  #define NOZZLE_CLEAN_CIRCLE_RADIUS 6.5
1023
+  // Circular pattern circle fragments number
1024
+  #define NOZZLE_CLEAN_CIRCLE_FN 10
1025
+  // Middle point of circle
1026
+  #define NOZZLE_CLEAN_CIRCLE_MIDDLE NOZZLE_CLEAN_START_POINT
1027
+
1017 1028
   // Moves the nozzle to the initial position
1018 1029
   #define NOZZLE_CLEAN_GOBACK
1019 1030
 #endif

+ 236
- 0
Marlin/nozzle.cpp View File

@@ -0,0 +1,236 @@
1
+#include "nozzle.h"
2
+
3
+#include "Marlin.h"
4
+#include "point_t.h"
5
+
6
+/**
7
+  * @brief Stroke clean pattern
8
+  * @details Wipes the nozzle back and forth in a linear movement
9
+  *
10
+  * @param start point_t defining the starting point
11
+  * @param end point_t defining the ending point
12
+  * @param strokes number of strokes to execute
13
+  */
14
+void Nozzle::stroke(
15
+  __attribute__((unused)) point_t const &start,
16
+  __attribute__((unused)) point_t const &end,
17
+  __attribute__((unused)) uint8_t const &strokes
18
+) {
19
+  #if ENABLED(NOZZLE_CLEAN_FEATURE)
20
+
21
+    #if ENABLED(NOZZLE_CLEAN_GOBACK)
22
+      // Store the current coords
23
+      point_t const initial = {
24
+        current_position[X_AXIS],
25
+        current_position[Y_AXIS],
26
+        current_position[Z_AXIS],
27
+        current_position[E_AXIS]
28
+      };
29
+    #endif // NOZZLE_CLEAN_GOBACK
30
+
31
+    // Move to the starting point
32
+    do_blocking_move_to_xy(start.x, start.y);
33
+    do_blocking_move_to_z(start.z);
34
+
35
+    // Start the stroke pattern
36
+    for (uint8_t i = 0; i < (strokes >>1); i++) {
37
+      do_blocking_move_to_xy(end.x, end.y);
38
+      do_blocking_move_to_xy(start.x, start.y);
39
+    }
40
+
41
+    #if ENABLED(NOZZLE_CLEAN_GOBACK)
42
+      // Move the nozzle to the initial point
43
+      do_blocking_move_to(initial.x, initial.y, initial.z);
44
+    #endif // NOZZLE_CLEAN_GOBACK
45
+
46
+  #endif // NOZZLE_CLEAN_FEATURE
47
+}
48
+
49
+/**
50
+  * @brief Zig-zag clean pattern
51
+  * @details Apply a zig-zag cleanning pattern
52
+  *
53
+  * @param start point_t defining the starting point
54
+  * @param end point_t defining the ending point
55
+  * @param strokes number of strokes to execute
56
+  * @param objects number of objects to create
57
+  */
58
+void Nozzle::zigzag(
59
+  __attribute__((unused)) point_t const &start,
60
+  __attribute__((unused)) point_t const &end,
61
+  __attribute__((unused)) uint8_t const &strokes,
62
+  __attribute__((unused)) uint8_t const &objects
63
+) {
64
+  #if ENABLED(NOZZLE_CLEAN_FEATURE)
65
+    const float A = nozzle_clean_horizontal ? nozzle_clean_height : nozzle_clean_length, // [twice the] Amplitude
66
+                P = (nozzle_clean_horizontal ? nozzle_clean_length : nozzle_clean_height) / (objects << 1); // Period
67
+
68
+    // Don't allow impossible triangles
69
+    if (A <= 0.0f || P <= 0.0f ) return;
70
+
71
+    #if ENABLED(NOZZLE_CLEAN_GOBACK)
72
+      // Store the current coords
73
+      point_t const initial = {
74
+        current_position[X_AXIS],
75
+        current_position[Y_AXIS],
76
+        current_position[Z_AXIS],
77
+        current_position[E_AXIS]
78
+      };
79
+    #endif // NOZZLE_CLEAN_GOBACK
80
+
81
+    for (uint8_t j = 0; j < strokes; j++) {
82
+      for (uint8_t i = 0; i < (objects << 1); i++) {
83
+        float const x = start.x + ( nozzle_clean_horizontal ? i * P : (A/P) * (P - fabs(fmod((i*P), (2*P)) - P)) );
84
+        float const y = start.y + (!nozzle_clean_horizontal ? i * P : (A/P) * (P - fabs(fmod((i*P), (2*P)) - P)) );
85
+
86
+        do_blocking_move_to_xy(x, y);
87
+        if (i == 0) do_blocking_move_to_z(start.z);
88
+      }
89
+
90
+      for (int i = (objects << 1); i > -1; i--) {
91
+        float const x = start.x + ( nozzle_clean_horizontal ? i * P : (A/P) * (P - fabs(fmod((i*P), (2*P)) - P)) );
92
+        float const y = start.y + (!nozzle_clean_horizontal ? i * P : (A/P) * (P - fabs(fmod((i*P), (2*P)) - P)) );
93
+
94
+        do_blocking_move_to_xy(x, y);
95
+      }
96
+    }
97
+
98
+    #if ENABLED(NOZZLE_CLEAN_GOBACK)
99
+      // Move the nozzle to the initial point
100
+      do_blocking_move_to_z(initial.z);
101
+      do_blocking_move_to_xy(initial.x, initial.y);
102
+    #endif // NOZZLE_CLEAN_GOBACK
103
+
104
+  #endif // NOZZLE_CLEAN_FEATURE
105
+}
106
+
107
+
108
+/**
109
+  * @brief Circular clean pattern
110
+  * @details Apply a circular cleaning pattern
111
+  *
112
+  * @param start point_t defining the middle of circle
113
+  * @param strokes number of strokes to execute
114
+  * @param radius radius of circle
115
+  */
116
+void Nozzle::circle(
117
+  __attribute__((unused)) point_t const &start,
118
+  __attribute__((unused)) point_t const &middle,
119
+  __attribute__((unused)) uint8_t const &strokes,
120
+  __attribute__((unused)) float const &radius
121
+) {
122
+  #if ENABLED(NOZZLE_CLEAN_FEATURE)
123
+    if (strokes == 0) return;
124
+
125
+    #if ENABLED(NOZZLE_CLEAN_GOBACK)
126
+      // Store the current coords
127
+      point_t const initial = {
128
+        current_position[X_AXIS],
129
+        current_position[Y_AXIS],
130
+        current_position[Z_AXIS],
131
+        current_position[E_AXIS]
132
+      };
133
+    #endif // NOZZLE_CLEAN_GOBACK
134
+
135
+    if (start.z <= current_position[Z_AXIS]) {
136
+      // Order of movement is pretty darn important here
137
+      do_blocking_move_to_xy(start.x, start.y);
138
+      do_blocking_move_to_z(start.z);
139
+    } else {
140
+      do_blocking_move_to_z(start.z);
141
+      do_blocking_move_to_xy(start.x, start.y);
142
+    }
143
+
144
+    float x, y;
145
+    for (uint8_t s = 0; s < strokes; s++) {
146
+      for (uint8_t i = 0; i < NOZZLE_CLEAN_CIRCLE_FN; i++) {
147
+        x = middle.x + sin((M_2_PI / NOZZLE_CLEAN_CIRCLE_FN) * i) * radius;
148
+        y = middle.y + cos((M_2_PI / NOZZLE_CLEAN_CIRCLE_FN) * i) * radius;
149
+
150
+        do_blocking_move_to_xy(x, y);
151
+      }
152
+    }
153
+
154
+    // Let's be safe
155
+    do_blocking_move_to_xy(start.x, start.y);
156
+
157
+    #if ENABLED(NOZZLE_CLEAN_GOBACK)
158
+      // Move the nozzle to the initial point
159
+      if (start.z <= initial.z) {
160
+        // As above order is important
161
+        do_blocking_move_to_z(initial.z);
162
+        do_blocking_move_to_xy(initial.x, initial.y);
163
+      } else {
164
+        do_blocking_move_to_xy(initial.x, initial.y);
165
+        do_blocking_move_to_z(initial.z);
166
+      }
167
+    #endif // NOZZLE_CLEAN_GOBACK
168
+
169
+  #endif // NOZZLE_CLEAN_FEATURE
170
+}
171
+
172
+/**
173
+  * @brief Clean the nozzle
174
+  * @details Starts the selected clean procedure pattern
175
+  *
176
+  * @param pattern one of the available patterns
177
+  * @param argument depends on the cleaning pattern
178
+  */
179
+void Nozzle::clean(
180
+  __attribute__((unused)) uint8_t const &pattern,
181
+  __attribute__((unused)) uint8_t const &strokes,
182
+  __attribute__((unused)) float const &radius,
183
+  __attribute__((unused)) uint8_t const &objects
184
+) {
185
+  #if ENABLED(NOZZLE_CLEAN_FEATURE)
186
+    #if ENABLED(DELTA)
187
+      if (current_position[Z_AXIS] > delta_clip_start_height)
188
+        do_blocking_move_to_z(delta_clip_start_height);
189
+    #endif
190
+    switch (pattern) {
191
+      case 1:
192
+        Nozzle::zigzag(
193
+          NOZZLE_CLEAN_START_POINT,
194
+          NOZZLE_CLEAN_END_POINT, strokes, objects);
195
+        break;
196
+
197
+      case 2:
198
+        Nozzle::circle(
199
+          NOZZLE_CLEAN_START_POINT,
200
+          NOZZLE_CLEAN_CIRCLE_MIDDLE, strokes, radius);
201
+        break;
202
+
203
+      default:
204
+        Nozzle::stroke(
205
+          NOZZLE_CLEAN_START_POINT,
206
+          NOZZLE_CLEAN_END_POINT, strokes);
207
+    }
208
+  #endif // NOZZLE_CLEAN_FEATURE
209
+}
210
+
211
+void Nozzle::park(
212
+  __attribute__((unused)) uint8_t const &z_action
213
+) {
214
+  #if ENABLED(NOZZLE_PARK_FEATURE)
215
+    float const z = current_position[Z_AXIS];
216
+    point_t const park = NOZZLE_PARK_POINT;
217
+
218
+    switch(z_action) {
219
+      case 1: // force Z-park height
220
+        do_blocking_move_to_z(park.z);
221
+        break;
222
+
223
+      case 2: // Raise by Z-park height
224
+        do_blocking_move_to_z(
225
+          (z + park.z > Z_MAX_POS) ? Z_MAX_POS : z + park.z);
226
+        break;
227
+
228
+      default: // Raise to Z-park height if lower
229
+        if (current_position[Z_AXIS] < park.z)
230
+          do_blocking_move_to_z(park.z);
231
+    }
232
+
233
+    do_blocking_move_to_xy(park.x, park.y);
234
+
235
+  #endif // NOZZLE_PARK_FEATURE
236
+}

+ 20
- 117
Marlin/nozzle.h View File

@@ -53,40 +53,11 @@ class Nozzle {
53 53
       __attribute__((unused)) point_t const &start,
54 54
       __attribute__((unused)) point_t const &end,
55 55
       __attribute__((unused)) uint8_t const &strokes
56
-    ) __attribute__((optimize ("Os"))) {
57
-      #if ENABLED(NOZZLE_CLEAN_FEATURE)
58
-
59
-        #if ENABLED(NOZZLE_CLEAN_GOBACK)
60
-          // Store the current coords
61
-          point_t const initial = {
62
-            current_position[X_AXIS],
63
-            current_position[Y_AXIS],
64
-            current_position[Z_AXIS],
65
-            current_position[E_AXIS]
66
-          };
67
-        #endif // NOZZLE_CLEAN_GOBACK
68
-
69
-        // Move to the starting point
70
-        do_blocking_move_to_xy(start.x, start.y);
71
-        do_blocking_move_to_z(start.z);
72
-
73
-        // Start the stroke pattern
74
-        for (uint8_t i = 0; i < (strokes >>1); i++) {
75
-          do_blocking_move_to_xy(end.x, end.y);
76
-          do_blocking_move_to_xy(start.x, start.y);
77
-        }
78
-
79
-        #if ENABLED(NOZZLE_CLEAN_GOBACK)
80
-          // Move the nozzle to the initial point
81
-          do_blocking_move_to(initial.x, initial.y, initial.z);
82
-        #endif // NOZZLE_CLEAN_GOBACK
83
-
84
-      #endif // NOZZLE_CLEAN_FEATURE
85
-    }
56
+    ) __attribute__((optimize ("Os")));
86 57
 
87 58
     /**
88 59
      * @brief Zig-zag clean pattern
89
-     * @details Apply a zig-zag cleanning pattern
60
+     * @details Apply a zig-zag cleaning pattern
90 61
      *
91 62
      * @param start point_t defining the starting point
92 63
      * @param end point_t defining the ending point
@@ -98,49 +69,22 @@ class Nozzle {
98 69
       __attribute__((unused)) point_t const &end,
99 70
       __attribute__((unused)) uint8_t const &strokes,
100 71
       __attribute__((unused)) uint8_t const &objects
101
-    ) __attribute__((optimize ("Os"))) {
102
-      #if ENABLED(NOZZLE_CLEAN_FEATURE)
103
-        float A = nozzle_clean_horizontal ? nozzle_clean_height : nozzle_clean_length; // [twice the] Amplitude
104
-        float P = ( nozzle_clean_horizontal ? nozzle_clean_length : nozzle_clean_height ) / (objects << 1); // Period
105
-
106
-        // Don't allow impossible triangles
107
-        if (A <= 0.0f || P <= 0.0f ) return;
108
-
109
-        #if ENABLED(NOZZLE_CLEAN_GOBACK)
110
-          // Store the current coords
111
-          point_t const initial = {
112
-            current_position[X_AXIS],
113
-            current_position[Y_AXIS],
114
-            current_position[Z_AXIS],
115
-            current_position[E_AXIS]
116
-          };
117
-        #endif // NOZZLE_CLEAN_GOBACK
118
-
119
-        for (uint8_t j = 0; j < strokes; j++) {
120
-          for (uint8_t i = 0; i < (objects << 1); i++) {
121
-            float const x = start.x + ( nozzle_clean_horizontal ? i * P : (A/P) * (P - fabs(fmod((i*P), (2*P)) - P)) );
122
-            float const y = start.y + (!nozzle_clean_horizontal ? i * P : (A/P) * (P - fabs(fmod((i*P), (2*P)) - P)) );
123
-
124
-            do_blocking_move_to_xy(x, y);
125
-            if (i == 0) do_blocking_move_to_z(start.z);
126
-          }
127
-
128
-          for (int i = (objects << 1); i > -1; i--) {
129
-            float const x = start.x + ( nozzle_clean_horizontal ? i * P : (A/P) * (P - fabs(fmod((i*P), (2*P)) - P)) );
130
-            float const y = start.y + (!nozzle_clean_horizontal ? i * P : (A/P) * (P - fabs(fmod((i*P), (2*P)) - P)) );
131
-
132
-            do_blocking_move_to_xy(x, y);
133
-          }
134
-        }
135
-
136
-        #if ENABLED(NOZZLE_CLEAN_GOBACK)
137
-          // Move the nozzle to the initial point
138
-          do_blocking_move_to_z(initial.z);
139
-          do_blocking_move_to_xy(initial.x, initial.y);
140
-        #endif // NOZZLE_CLEAN_GOBACK
72
+    ) __attribute__((optimize ("Os")));
141 73
 
142
-      #endif // NOZZLE_CLEAN_FEATURE
143
-    }
74
+    /**
75
+     * @brief Circular clean pattern
76
+     * @details Apply a circular cleaning pattern
77
+     *
78
+     * @param start point_t defining the middle of circle
79
+     * @param strokes number of strokes to execute
80
+     * @param radius radius of circle
81
+     */
82
+    static void circle(
83
+      __attribute__((unused)) point_t const &start,
84
+      __attribute__((unused)) point_t const &middle,
85
+      __attribute__((unused)) uint8_t const &strokes,
86
+      __attribute__((unused)) float const &radius
87
+    ) __attribute__((optimize ("Os")));
144 88
 
145 89
   public:
146 90
     /**
@@ -153,54 +97,13 @@ class Nozzle {
153 97
     static void clean(
154 98
       __attribute__((unused)) uint8_t const &pattern,
155 99
       __attribute__((unused)) uint8_t const &strokes,
100
+      __attribute__((unused)) float const &radius,
156 101
       __attribute__((unused)) uint8_t const &objects = 0
157
-    ) __attribute__((optimize ("Os"))) {
158
-      #if ENABLED(NOZZLE_CLEAN_FEATURE)
159
-        #if ENABLED(DELTA)
160
-          if (current_position[Z_AXIS] > delta_clip_start_height)
161
-            do_blocking_move_to_z(delta_clip_start_height);
162
-        #endif
163
-        switch (pattern) {
164
-          case 1:
165
-            Nozzle::zigzag(
166
-              NOZZLE_CLEAN_START_POINT,
167
-              NOZZLE_CLEAN_END_POINT, strokes, objects);
168
-            break;
169
-
170
-          default:
171
-            Nozzle::stroke(
172
-              NOZZLE_CLEAN_START_POINT,
173
-              NOZZLE_CLEAN_END_POINT, strokes);
174
-        }
175
-      #endif // NOZZLE_CLEAN_FEATURE
176
-    }
102
+    ) __attribute__((optimize ("Os")));
177 103
 
178 104
     static void park(
179 105
       __attribute__((unused)) uint8_t const &z_action
180
-    ) __attribute__((optimize ("Os"))) {
181
-      #if ENABLED(NOZZLE_PARK_FEATURE)
182
-        float const z = current_position[Z_AXIS];
183
-        point_t const park = NOZZLE_PARK_POINT;
184
-
185
-        switch(z_action) {
186
-          case 1: // force Z-park height
187
-            do_blocking_move_to_z(park.z);
188
-            break;
189
-
190
-          case 2: // Raise by Z-park height
191
-            do_blocking_move_to_z(
192
-              (z + park.z > Z_MAX_POS) ? Z_MAX_POS : z + park.z);
193
-            break;
194
-
195
-          default: // Raise to Z-park height if lower
196
-            if (current_position[Z_AXIS] < park.z)
197
-              do_blocking_move_to_z(park.z);
198
-        }
199
-
200
-        do_blocking_move_to_xy(park.x, park.y);
201
-
202
-      #endif // NOZZLE_PARK_FEATURE
203
-    }
106
+    ) __attribute__((optimize ("Os")));
204 107
 };
205 108
 
206 109
 #endif

Loading…
Cancel
Save