Merge pull request #5973 from thinkyhead/rc_circle_pattern
Add circle pattern to nozzle clean
This commit is contained in:
		
						commit
						33f8a8a344
					
				| @ -96,7 +96,7 @@ | |||||||
| //
 | //
 | ||||||
| // Marlin now allow you to have a vendor boot image to be displayed on machine
 | // Marlin now allow you to have a vendor boot image to be displayed on machine
 | ||||||
| // start. When SHOW_CUSTOM_BOOTSCREEN is defined Marlin will first show your
 | // start. When SHOW_CUSTOM_BOOTSCREEN is defined Marlin will first show your
 | ||||||
| // custom boot image and them the default Marlin boot image is shown.
 | // custom boot image and then the default Marlin boot image is shown.
 | ||||||
| //
 | //
 | ||||||
| // We suggest for you to take advantage of this new feature and keep the Marlin
 | // We suggest for you to take advantage of this new feature and keep the Marlin
 | ||||||
| // boot image unmodified. For an example have a look at the bq Hephestos 2
 | // boot image unmodified. For an example have a look at the bq Hephestos 2
 | ||||||
| @ -1000,6 +1000,9 @@ | |||||||
| //                       |________|_________|_________|
 | //                       |________|_________|_________|
 | ||||||
| //                           T1        T2        T3
 | //                           T1        T2        T3
 | ||||||
| //
 | //
 | ||||||
|  | //   P2: This starts a circular pattern with circle with middle in
 | ||||||
|  | //       NOZZLE_CLEAN_CIRCLE_MIDDLE radius of R and stroke count of S.
 | ||||||
|  | //       Before starting the circle nozzle goes to NOZZLE_CLEAN_START_POINT.
 | ||||||
| //
 | //
 | ||||||
| // Caveats: End point Z should use the same value as Start point Z.
 | // Caveats: End point Z should use the same value as Start point Z.
 | ||||||
| //
 | //
 | ||||||
| @ -1011,7 +1014,7 @@ | |||||||
| #if ENABLED(NOZZLE_CLEAN_FEATURE) | #if ENABLED(NOZZLE_CLEAN_FEATURE) | ||||||
|   // Default number of pattern repetitions
 |   // Default number of pattern repetitions
 | ||||||
|   #define NOZZLE_CLEAN_STROKES  12 |   #define NOZZLE_CLEAN_STROKES  12 | ||||||
|    | 
 | ||||||
|   // Default number of triangles
 |   // Default number of triangles
 | ||||||
|   #define NOZZLE_CLEAN_TRIANGLES  3 |   #define NOZZLE_CLEAN_TRIANGLES  3 | ||||||
| 
 | 
 | ||||||
| @ -1019,6 +1022,13 @@ | |||||||
|   #define NOZZLE_CLEAN_START_POINT { 30, 30, (Z_MIN_POS + 1)} |   #define NOZZLE_CLEAN_START_POINT { 30, 30, (Z_MIN_POS + 1)} | ||||||
|   #define NOZZLE_CLEAN_END_POINT   {100, 60, (Z_MIN_POS + 1)} |   #define NOZZLE_CLEAN_END_POINT   {100, 60, (Z_MIN_POS + 1)} | ||||||
| 
 | 
 | ||||||
|  |   // Circular pattern radius
 | ||||||
|  |   #define NOZZLE_CLEAN_CIRCLE_RADIUS 6.5 | ||||||
|  |   // Circular pattern circle fragments number
 | ||||||
|  |   #define NOZZLE_CLEAN_CIRCLE_FN 10 | ||||||
|  |   // Middle point of circle
 | ||||||
|  |   #define NOZZLE_CLEAN_CIRCLE_MIDDLE NOZZLE_CLEAN_START_POINT | ||||||
|  | 
 | ||||||
|   // Moves the nozzle to the initial position
 |   // Moves the nozzle to the initial position
 | ||||||
|   #define NOZZLE_CLEAN_GOBACK |   #define NOZZLE_CLEAN_GOBACK | ||||||
| #endif | #endif | ||||||
|  | |||||||
| @ -3164,8 +3164,9 @@ inline void gcode_G4() { | |||||||
|     const uint8_t pattern = code_seen('P') ? code_value_ushort() : 0, |     const uint8_t pattern = code_seen('P') ? code_value_ushort() : 0, | ||||||
|                   strokes = code_seen('S') ? code_value_ushort() : NOZZLE_CLEAN_STROKES, |                   strokes = code_seen('S') ? code_value_ushort() : NOZZLE_CLEAN_STROKES, | ||||||
|                   objects = code_seen('T') ? code_value_ushort() : NOZZLE_CLEAN_TRIANGLES; |                   objects = code_seen('T') ? code_value_ushort() : NOZZLE_CLEAN_TRIANGLES; | ||||||
|  |     const float radius = code_seen('R') ? code_value_float() : NOZZLE_CLEAN_CIRCLE_RADIUS; | ||||||
| 
 | 
 | ||||||
|     Nozzle::clean(pattern, strokes, objects); |     Nozzle::clean(pattern, strokes, radius, objects); | ||||||
|   } |   } | ||||||
| #endif | #endif | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -96,7 +96,7 @@ | |||||||
| //
 | //
 | ||||||
| // Marlin now allow you to have a vendor boot image to be displayed on machine
 | // Marlin now allow you to have a vendor boot image to be displayed on machine
 | ||||||
| // start. When SHOW_CUSTOM_BOOTSCREEN is defined Marlin will first show your
 | // start. When SHOW_CUSTOM_BOOTSCREEN is defined Marlin will first show your
 | ||||||
| // custom boot image and them the default Marlin boot image is shown.
 | // custom boot image and then the default Marlin boot image is shown.
 | ||||||
| //
 | //
 | ||||||
| // We suggest for you to take advantage of this new feature and keep the Marlin
 | // We suggest for you to take advantage of this new feature and keep the Marlin
 | ||||||
| // boot image unmodified. For an example have a look at the bq Hephestos 2
 | // boot image unmodified. For an example have a look at the bq Hephestos 2
 | ||||||
| @ -1000,6 +1000,10 @@ | |||||||
| //                       |________|_________|_________|
 | //                       |________|_________|_________|
 | ||||||
| //                           T1        T2        T3
 | //                           T1        T2        T3
 | ||||||
| //
 | //
 | ||||||
|  | //   P2: This starts a circular pattern with circle with middle in
 | ||||||
|  | //       NOZZLE_CLEAN_CIRCLE_MIDDLE radius of R and stroke count of S.
 | ||||||
|  | //       Before starting the circle nozzle goes to NOZZLE_CLEAN_START_POINT.
 | ||||||
|  | //
 | ||||||
| // Caveats: End point Z should use the same value as Start point Z.
 | // Caveats: End point Z should use the same value as Start point Z.
 | ||||||
| //
 | //
 | ||||||
| // Attention: This is an EXPERIMENTAL feature, in the future the G-code arguments
 | // Attention: This is an EXPERIMENTAL feature, in the future the G-code arguments
 | ||||||
| @ -1010,7 +1014,7 @@ | |||||||
| #if ENABLED(NOZZLE_CLEAN_FEATURE) | #if ENABLED(NOZZLE_CLEAN_FEATURE) | ||||||
|   // Default number of pattern repetitions
 |   // Default number of pattern repetitions
 | ||||||
|   #define NOZZLE_CLEAN_STROKES  12 |   #define NOZZLE_CLEAN_STROKES  12 | ||||||
|    | 
 | ||||||
|   // Default number of triangles
 |   // Default number of triangles
 | ||||||
|   #define NOZZLE_CLEAN_TRIANGLES  3 |   #define NOZZLE_CLEAN_TRIANGLES  3 | ||||||
| 
 | 
 | ||||||
| @ -1018,6 +1022,13 @@ | |||||||
|   #define NOZZLE_CLEAN_START_POINT { 30, 30, (Z_MIN_POS + 1)} |   #define NOZZLE_CLEAN_START_POINT { 30, 30, (Z_MIN_POS + 1)} | ||||||
|   #define NOZZLE_CLEAN_END_POINT   {100, 60, (Z_MIN_POS + 1)} |   #define NOZZLE_CLEAN_END_POINT   {100, 60, (Z_MIN_POS + 1)} | ||||||
| 
 | 
 | ||||||
|  |   // Circular pattern radius
 | ||||||
|  |   #define NOZZLE_CLEAN_CIRCLE_RADIUS 6.5 | ||||||
|  |   // Circular pattern circle fragments number
 | ||||||
|  |   #define NOZZLE_CLEAN_CIRCLE_FN 10 | ||||||
|  |   // Middle point of circle
 | ||||||
|  |   #define NOZZLE_CLEAN_CIRCLE_MIDDLE NOZZLE_CLEAN_START_POINT | ||||||
|  | 
 | ||||||
|   // Moves the nozzle to the initial position
 |   // Moves the nozzle to the initial position
 | ||||||
|   #define NOZZLE_CLEAN_GOBACK |   #define NOZZLE_CLEAN_GOBACK | ||||||
| #endif | #endif | ||||||
|  | |||||||
| @ -96,7 +96,7 @@ | |||||||
| //
 | //
 | ||||||
| // Marlin now allow you to have a vendor boot image to be displayed on machine
 | // Marlin now allow you to have a vendor boot image to be displayed on machine
 | ||||||
| // start. When SHOW_CUSTOM_BOOTSCREEN is defined Marlin will first show your
 | // start. When SHOW_CUSTOM_BOOTSCREEN is defined Marlin will first show your
 | ||||||
| // custom boot image and them the default Marlin boot image is shown.
 | // custom boot image and then the default Marlin boot image is shown.
 | ||||||
| //
 | //
 | ||||||
| // We suggest for you to take advantage of this new feature and keep the Marlin
 | // We suggest for you to take advantage of this new feature and keep the Marlin
 | ||||||
| // boot image unmodified. For an example have a look at the bq Hephestos 2
 | // boot image unmodified. For an example have a look at the bq Hephestos 2
 | ||||||
| @ -983,6 +983,10 @@ | |||||||
| //                       |________|_________|_________|
 | //                       |________|_________|_________|
 | ||||||
| //                           T1        T2        T3
 | //                           T1        T2        T3
 | ||||||
| //
 | //
 | ||||||
|  | //   P2: This starts a circular pattern with circle with middle in
 | ||||||
|  | //       NOZZLE_CLEAN_CIRCLE_MIDDLE radius of R and stroke count of S.
 | ||||||
|  | //       Before starting the circle nozzle goes to NOZZLE_CLEAN_START_POINT.
 | ||||||
|  | //
 | ||||||
| // Caveats: End point Z should use the same value as Start point Z.
 | // Caveats: End point Z should use the same value as Start point Z.
 | ||||||
| //
 | //
 | ||||||
| // Attention: This is an EXPERIMENTAL feature, in the future the G-code arguments
 | // Attention: This is an EXPERIMENTAL feature, in the future the G-code arguments
 | ||||||
| @ -993,7 +997,7 @@ | |||||||
| #if ENABLED(NOZZLE_CLEAN_FEATURE) | #if ENABLED(NOZZLE_CLEAN_FEATURE) | ||||||
|   // Default number of pattern repetitions
 |   // Default number of pattern repetitions
 | ||||||
|   #define NOZZLE_CLEAN_STROKES  12 |   #define NOZZLE_CLEAN_STROKES  12 | ||||||
|    | 
 | ||||||
|   // Default number of triangles
 |   // Default number of triangles
 | ||||||
|   #define NOZZLE_CLEAN_TRIANGLES  3 |   #define NOZZLE_CLEAN_TRIANGLES  3 | ||||||
| 
 | 
 | ||||||
| @ -1001,6 +1005,13 @@ | |||||||
|   #define NOZZLE_CLEAN_START_POINT { 30, 30, (Z_MIN_POS + 1)} |   #define NOZZLE_CLEAN_START_POINT { 30, 30, (Z_MIN_POS + 1)} | ||||||
|   #define NOZZLE_CLEAN_END_POINT   {100, 60, (Z_MIN_POS + 1)} |   #define NOZZLE_CLEAN_END_POINT   {100, 60, (Z_MIN_POS + 1)} | ||||||
| 
 | 
 | ||||||
|  |   // Circular pattern radius
 | ||||||
|  |   #define NOZZLE_CLEAN_CIRCLE_RADIUS 6.5 | ||||||
|  |   // Circular pattern circle fragments number
 | ||||||
|  |   #define NOZZLE_CLEAN_CIRCLE_FN 10 | ||||||
|  |   // Middle point of circle
 | ||||||
|  |   #define NOZZLE_CLEAN_CIRCLE_MIDDLE NOZZLE_CLEAN_START_POINT | ||||||
|  | 
 | ||||||
|   // Moves the nozzle to the initial position
 |   // Moves the nozzle to the initial position
 | ||||||
|   #define NOZZLE_CLEAN_GOBACK |   #define NOZZLE_CLEAN_GOBACK | ||||||
| #endif | #endif | ||||||
|  | |||||||
| @ -96,7 +96,7 @@ | |||||||
| //
 | //
 | ||||||
| // Marlin now allow you to have a vendor boot image to be displayed on machine
 | // Marlin now allow you to have a vendor boot image to be displayed on machine
 | ||||||
| // start. When SHOW_CUSTOM_BOOTSCREEN is defined Marlin will first show your
 | // start. When SHOW_CUSTOM_BOOTSCREEN is defined Marlin will first show your
 | ||||||
| // custom boot image and them the default Marlin boot image is shown.
 | // custom boot image and then the default Marlin boot image is shown.
 | ||||||
| //
 | //
 | ||||||
| // We suggest for you to take advantage of this new feature and keep the Marlin
 | // We suggest for you to take advantage of this new feature and keep the Marlin
 | ||||||
| // boot image unmodified. For an example have a look at the bq Hephestos 2
 | // boot image unmodified. For an example have a look at the bq Hephestos 2
 | ||||||
| @ -983,6 +983,10 @@ | |||||||
| //                       |________|_________|_________|
 | //                       |________|_________|_________|
 | ||||||
| //                           T1        T2        T3
 | //                           T1        T2        T3
 | ||||||
| //
 | //
 | ||||||
|  | //   P2: This starts a circular pattern with circle with middle in
 | ||||||
|  | //       NOZZLE_CLEAN_CIRCLE_MIDDLE radius of R and stroke count of S.
 | ||||||
|  | //       Before starting the circle nozzle goes to NOZZLE_CLEAN_START_POINT.
 | ||||||
|  | //
 | ||||||
| // Caveats: End point Z should use the same value as Start point Z.
 | // Caveats: End point Z should use the same value as Start point Z.
 | ||||||
| //
 | //
 | ||||||
| // Attention: This is an EXPERIMENTAL feature, in the future the G-code arguments
 | // Attention: This is an EXPERIMENTAL feature, in the future the G-code arguments
 | ||||||
| @ -993,7 +997,7 @@ | |||||||
| #if ENABLED(NOZZLE_CLEAN_FEATURE) | #if ENABLED(NOZZLE_CLEAN_FEATURE) | ||||||
|   // Default number of pattern repetitions
 |   // Default number of pattern repetitions
 | ||||||
|   #define NOZZLE_CLEAN_STROKES  12 |   #define NOZZLE_CLEAN_STROKES  12 | ||||||
|    | 
 | ||||||
|   // Default number of triangles
 |   // Default number of triangles
 | ||||||
|   #define NOZZLE_CLEAN_TRIANGLES  3 |   #define NOZZLE_CLEAN_TRIANGLES  3 | ||||||
| 
 | 
 | ||||||
| @ -1001,6 +1005,13 @@ | |||||||
|   #define NOZZLE_CLEAN_START_POINT { 30, 30, (Z_MIN_POS + 1)} |   #define NOZZLE_CLEAN_START_POINT { 30, 30, (Z_MIN_POS + 1)} | ||||||
|   #define NOZZLE_CLEAN_END_POINT   {100, 60, (Z_MIN_POS + 1)} |   #define NOZZLE_CLEAN_END_POINT   {100, 60, (Z_MIN_POS + 1)} | ||||||
| 
 | 
 | ||||||
|  |   // Circular pattern radius
 | ||||||
|  |   #define NOZZLE_CLEAN_CIRCLE_RADIUS 6.5 | ||||||
|  |   // Circular pattern circle fragments number
 | ||||||
|  |   #define NOZZLE_CLEAN_CIRCLE_FN 10 | ||||||
|  |   // Middle point of circle
 | ||||||
|  |   #define NOZZLE_CLEAN_CIRCLE_MIDDLE NOZZLE_CLEAN_START_POINT | ||||||
|  | 
 | ||||||
|   // Moves the nozzle to the initial position
 |   // Moves the nozzle to the initial position
 | ||||||
|   #define NOZZLE_CLEAN_GOBACK |   #define NOZZLE_CLEAN_GOBACK | ||||||
| #endif | #endif | ||||||
|  | |||||||
| @ -96,7 +96,7 @@ | |||||||
| //
 | //
 | ||||||
| // Marlin now allow you to have a vendor boot image to be displayed on machine
 | // Marlin now allow you to have a vendor boot image to be displayed on machine
 | ||||||
| // start. When SHOW_CUSTOM_BOOTSCREEN is defined Marlin will first show your
 | // start. When SHOW_CUSTOM_BOOTSCREEN is defined Marlin will first show your
 | ||||||
| // custom boot image and them the default Marlin boot image is shown.
 | // custom boot image and then the default Marlin boot image is shown.
 | ||||||
| //
 | //
 | ||||||
| // We suggest for you to take advantage of this new feature and keep the Marlin
 | // We suggest for you to take advantage of this new feature and keep the Marlin
 | ||||||
| // boot image unmodified. For an example have a look at the bq Hephestos 2
 | // boot image unmodified. For an example have a look at the bq Hephestos 2
 | ||||||
| @ -992,6 +992,10 @@ | |||||||
| //                       |________|_________|_________|
 | //                       |________|_________|_________|
 | ||||||
| //                           T1        T2        T3
 | //                           T1        T2        T3
 | ||||||
| //
 | //
 | ||||||
|  | //   P2: This starts a circular pattern with circle with middle in
 | ||||||
|  | //       NOZZLE_CLEAN_CIRCLE_MIDDLE radius of R and stroke count of S.
 | ||||||
|  | //       Before starting the circle nozzle goes to NOZZLE_CLEAN_START_POINT.
 | ||||||
|  | //
 | ||||||
| // Caveats: End point Z should use the same value as Start point Z.
 | // Caveats: End point Z should use the same value as Start point Z.
 | ||||||
| //
 | //
 | ||||||
| // Attention: This is an EXPERIMENTAL feature, in the future the G-code arguments
 | // Attention: This is an EXPERIMENTAL feature, in the future the G-code arguments
 | ||||||
| @ -1002,7 +1006,7 @@ | |||||||
| #if ENABLED(NOZZLE_CLEAN_FEATURE) | #if ENABLED(NOZZLE_CLEAN_FEATURE) | ||||||
|   // Default number of pattern repetitions
 |   // Default number of pattern repetitions
 | ||||||
|   #define NOZZLE_CLEAN_STROKES  12 |   #define NOZZLE_CLEAN_STROKES  12 | ||||||
|    | 
 | ||||||
|   // Default number of triangles
 |   // Default number of triangles
 | ||||||
|   #define NOZZLE_CLEAN_TRIANGLES  3 |   #define NOZZLE_CLEAN_TRIANGLES  3 | ||||||
| 
 | 
 | ||||||
| @ -1010,6 +1014,13 @@ | |||||||
|   #define NOZZLE_CLEAN_START_POINT { 30, 30, (Z_MIN_POS + 1)} |   #define NOZZLE_CLEAN_START_POINT { 30, 30, (Z_MIN_POS + 1)} | ||||||
|   #define NOZZLE_CLEAN_END_POINT   {100, 60, (Z_MIN_POS + 1)} |   #define NOZZLE_CLEAN_END_POINT   {100, 60, (Z_MIN_POS + 1)} | ||||||
| 
 | 
 | ||||||
|  |   // Circular pattern radius
 | ||||||
|  |   #define NOZZLE_CLEAN_CIRCLE_RADIUS 6.5 | ||||||
|  |   // Circular pattern circle fragments number
 | ||||||
|  |   #define NOZZLE_CLEAN_CIRCLE_FN 10 | ||||||
|  |   // Middle point of circle
 | ||||||
|  |   #define NOZZLE_CLEAN_CIRCLE_MIDDLE NOZZLE_CLEAN_START_POINT | ||||||
|  | 
 | ||||||
|   // Moves the nozzle to the initial position
 |   // Moves the nozzle to the initial position
 | ||||||
|   #define NOZZLE_CLEAN_GOBACK |   #define NOZZLE_CLEAN_GOBACK | ||||||
| #endif | #endif | ||||||
|  | |||||||
| @ -96,7 +96,7 @@ | |||||||
| //
 | //
 | ||||||
| // Marlin now allow you to have a vendor boot image to be displayed on machine
 | // Marlin now allow you to have a vendor boot image to be displayed on machine
 | ||||||
| // start. When SHOW_CUSTOM_BOOTSCREEN is defined Marlin will first show your
 | // start. When SHOW_CUSTOM_BOOTSCREEN is defined Marlin will first show your
 | ||||||
| // custom boot image and them the default Marlin boot image is shown.
 | // custom boot image and then the default Marlin boot image is shown.
 | ||||||
| //
 | //
 | ||||||
| // We suggest for you to take advantage of this new feature and keep the Marlin
 | // We suggest for you to take advantage of this new feature and keep the Marlin
 | ||||||
| // boot image unmodified. For an example have a look at the bq Hephestos 2
 | // boot image unmodified. For an example have a look at the bq Hephestos 2
 | ||||||
| @ -994,6 +994,10 @@ | |||||||
| //                       |________|_________|_________|
 | //                       |________|_________|_________|
 | ||||||
| //                           T1        T2        T3
 | //                           T1        T2        T3
 | ||||||
| //
 | //
 | ||||||
|  | //   P2: This starts a circular pattern with circle with middle in
 | ||||||
|  | //       NOZZLE_CLEAN_CIRCLE_MIDDLE radius of R and stroke count of S.
 | ||||||
|  | //       Before starting the circle nozzle goes to NOZZLE_CLEAN_START_POINT.
 | ||||||
|  | //
 | ||||||
| // Caveats: End point Z should use the same value as Start point Z.
 | // Caveats: End point Z should use the same value as Start point Z.
 | ||||||
| //
 | //
 | ||||||
| // Attention: This is an EXPERIMENTAL feature, in the future the G-code arguments
 | // Attention: This is an EXPERIMENTAL feature, in the future the G-code arguments
 | ||||||
| @ -1004,7 +1008,7 @@ | |||||||
| #if ENABLED(NOZZLE_CLEAN_FEATURE) | #if ENABLED(NOZZLE_CLEAN_FEATURE) | ||||||
|   // Default number of pattern repetitions
 |   // Default number of pattern repetitions
 | ||||||
|   #define NOZZLE_CLEAN_STROKES  12 |   #define NOZZLE_CLEAN_STROKES  12 | ||||||
|    | 
 | ||||||
|   // Default number of triangles
 |   // Default number of triangles
 | ||||||
|   #define NOZZLE_CLEAN_TRIANGLES  3 |   #define NOZZLE_CLEAN_TRIANGLES  3 | ||||||
| 
 | 
 | ||||||
| @ -1012,6 +1016,13 @@ | |||||||
|   #define NOZZLE_CLEAN_START_POINT { X_MIN_POS + 10, Y_MAX_POS - 9, (Z_MIN_POS + 0.5)} |   #define NOZZLE_CLEAN_START_POINT { X_MIN_POS + 10, Y_MAX_POS - 9, (Z_MIN_POS + 0.5)} | ||||||
|   #define NOZZLE_CLEAN_END_POINT   { X_MIN_POS + 90, Y_MAX_POS - 0, (Z_MIN_POS + 0.5)} |   #define NOZZLE_CLEAN_END_POINT   { X_MIN_POS + 90, Y_MAX_POS - 0, (Z_MIN_POS + 0.5)} | ||||||
| 
 | 
 | ||||||
|  |   // Circular pattern radius
 | ||||||
|  |   #define NOZZLE_CLEAN_CIRCLE_RADIUS 6.5 | ||||||
|  |   // Circular pattern circle fragments number
 | ||||||
|  |   #define NOZZLE_CLEAN_CIRCLE_FN 10 | ||||||
|  |   // Middle point of circle
 | ||||||
|  |   #define NOZZLE_CLEAN_CIRCLE_MIDDLE NOZZLE_CLEAN_START_POINT | ||||||
|  | 
 | ||||||
|   // Moves the nozzle to the initial position
 |   // Moves the nozzle to the initial position
 | ||||||
|   //#define NOZZLE_CLEAN_GOBACK
 |   //#define NOZZLE_CLEAN_GOBACK
 | ||||||
| #endif | #endif | ||||||
|  | |||||||
| @ -112,7 +112,7 @@ | |||||||
| //
 | //
 | ||||||
| // Marlin now allow you to have a vendor boot image to be displayed on machine
 | // Marlin now allow you to have a vendor boot image to be displayed on machine
 | ||||||
| // start. When SHOW_CUSTOM_BOOTSCREEN is defined Marlin will first show your
 | // start. When SHOW_CUSTOM_BOOTSCREEN is defined Marlin will first show your
 | ||||||
| // custom boot image and them the default Marlin boot image is shown.
 | // custom boot image and then the default Marlin boot image is shown.
 | ||||||
| //
 | //
 | ||||||
| // We suggest for you to take advantage of this new feature and keep the Marlin
 | // We suggest for you to take advantage of this new feature and keep the Marlin
 | ||||||
| // boot image unmodified. For an example have a look at the bq Hephestos 2
 | // boot image unmodified. For an example have a look at the bq Hephestos 2
 | ||||||
| @ -1029,6 +1029,10 @@ | |||||||
| //                       |________|_________|_________|
 | //                       |________|_________|_________|
 | ||||||
| //                           T1        T2        T3
 | //                           T1        T2        T3
 | ||||||
| //
 | //
 | ||||||
|  | //   P2: This starts a circular pattern with circle with middle in
 | ||||||
|  | //       NOZZLE_CLEAN_CIRCLE_MIDDLE radius of R and stroke count of S.
 | ||||||
|  | //       Before starting the circle nozzle goes to NOZZLE_CLEAN_START_POINT.
 | ||||||
|  | //
 | ||||||
| // Caveats: End point Z should use the same value as Start point Z.
 | // Caveats: End point Z should use the same value as Start point Z.
 | ||||||
| //
 | //
 | ||||||
| // Attention: This is an EXPERIMENTAL feature, in the future the G-code arguments
 | // Attention: This is an EXPERIMENTAL feature, in the future the G-code arguments
 | ||||||
| @ -1039,7 +1043,7 @@ | |||||||
| #if ENABLED(NOZZLE_CLEAN_FEATURE) | #if ENABLED(NOZZLE_CLEAN_FEATURE) | ||||||
|   // Default number of pattern repetitions
 |   // Default number of pattern repetitions
 | ||||||
|   #define NOZZLE_CLEAN_STROKES  12 |   #define NOZZLE_CLEAN_STROKES  12 | ||||||
|    | 
 | ||||||
|   // Default number of triangles
 |   // Default number of triangles
 | ||||||
|   #define NOZZLE_CLEAN_TRIANGLES  3 |   #define NOZZLE_CLEAN_TRIANGLES  3 | ||||||
| 
 | 
 | ||||||
| @ -1047,6 +1051,13 @@ | |||||||
|   #define NOZZLE_CLEAN_START_POINT { 30, 30, (Z_MIN_POS + 1)} |   #define NOZZLE_CLEAN_START_POINT { 30, 30, (Z_MIN_POS + 1)} | ||||||
|   #define NOZZLE_CLEAN_END_POINT   {100, 60, (Z_MIN_POS + 1)} |   #define NOZZLE_CLEAN_END_POINT   {100, 60, (Z_MIN_POS + 1)} | ||||||
| 
 | 
 | ||||||
|  |   // Circular pattern radius
 | ||||||
|  |   #define NOZZLE_CLEAN_CIRCLE_RADIUS 6.5 | ||||||
|  |   // Circular pattern circle fragments number
 | ||||||
|  |   #define NOZZLE_CLEAN_CIRCLE_FN 10 | ||||||
|  |   // Middle point of circle
 | ||||||
|  |   #define NOZZLE_CLEAN_CIRCLE_MIDDLE NOZZLE_CLEAN_START_POINT | ||||||
|  | 
 | ||||||
|   // Moves the nozzle to the initial position
 |   // Moves the nozzle to the initial position
 | ||||||
|   #define NOZZLE_CLEAN_GOBACK |   #define NOZZLE_CLEAN_GOBACK | ||||||
| #endif | #endif | ||||||
|  | |||||||
| @ -96,7 +96,7 @@ | |||||||
| //
 | //
 | ||||||
| // Marlin now allow you to have a vendor boot image to be displayed on machine
 | // Marlin now allow you to have a vendor boot image to be displayed on machine
 | ||||||
| // start. When SHOW_CUSTOM_BOOTSCREEN is defined Marlin will first show your
 | // start. When SHOW_CUSTOM_BOOTSCREEN is defined Marlin will first show your
 | ||||||
| // custom boot image and them the default Marlin boot image is shown.
 | // custom boot image and then the default Marlin boot image is shown.
 | ||||||
| //
 | //
 | ||||||
| // We suggest for you to take advantage of this new feature and keep the Marlin
 | // We suggest for you to take advantage of this new feature and keep the Marlin
 | ||||||
| // boot image unmodified. For an example have a look at the bq Hephestos 2
 | // boot image unmodified. For an example have a look at the bq Hephestos 2
 | ||||||
| @ -1000,6 +1000,10 @@ | |||||||
| //                       |________|_________|_________|
 | //                       |________|_________|_________|
 | ||||||
| //                           T1        T2        T3
 | //                           T1        T2        T3
 | ||||||
| //
 | //
 | ||||||
|  | //   P2: This starts a circular pattern with circle with middle in
 | ||||||
|  | //       NOZZLE_CLEAN_CIRCLE_MIDDLE radius of R and stroke count of S.
 | ||||||
|  | //       Before starting the circle nozzle goes to NOZZLE_CLEAN_START_POINT.
 | ||||||
|  | //
 | ||||||
| // Caveats: End point Z should use the same value as Start point Z.
 | // Caveats: End point Z should use the same value as Start point Z.
 | ||||||
| //
 | //
 | ||||||
| // Attention: This is an EXPERIMENTAL feature, in the future the G-code arguments
 | // Attention: This is an EXPERIMENTAL feature, in the future the G-code arguments
 | ||||||
| @ -1010,7 +1014,7 @@ | |||||||
| #if ENABLED(NOZZLE_CLEAN_FEATURE) | #if ENABLED(NOZZLE_CLEAN_FEATURE) | ||||||
|   // Default number of pattern repetitions
 |   // Default number of pattern repetitions
 | ||||||
|   #define NOZZLE_CLEAN_STROKES  12 |   #define NOZZLE_CLEAN_STROKES  12 | ||||||
|    | 
 | ||||||
|   // Default number of triangles
 |   // Default number of triangles
 | ||||||
|   #define NOZZLE_CLEAN_TRIANGLES  3 |   #define NOZZLE_CLEAN_TRIANGLES  3 | ||||||
| 
 | 
 | ||||||
| @ -1018,6 +1022,13 @@ | |||||||
|   #define NOZZLE_CLEAN_START_POINT { 30, 30, (Z_MIN_POS + 1)} |   #define NOZZLE_CLEAN_START_POINT { 30, 30, (Z_MIN_POS + 1)} | ||||||
|   #define NOZZLE_CLEAN_END_POINT   {100, 60, (Z_MIN_POS + 1)} |   #define NOZZLE_CLEAN_END_POINT   {100, 60, (Z_MIN_POS + 1)} | ||||||
| 
 | 
 | ||||||
|  |   // Circular pattern radius
 | ||||||
|  |   #define NOZZLE_CLEAN_CIRCLE_RADIUS 6.5 | ||||||
|  |   // Circular pattern circle fragments number
 | ||||||
|  |   #define NOZZLE_CLEAN_CIRCLE_FN 10 | ||||||
|  |   // Middle point of circle
 | ||||||
|  |   #define NOZZLE_CLEAN_CIRCLE_MIDDLE NOZZLE_CLEAN_START_POINT | ||||||
|  | 
 | ||||||
|   // Moves the nozzle to the initial position
 |   // Moves the nozzle to the initial position
 | ||||||
|   #define NOZZLE_CLEAN_GOBACK |   #define NOZZLE_CLEAN_GOBACK | ||||||
| #endif | #endif | ||||||
|  | |||||||
| @ -96,7 +96,7 @@ | |||||||
| //
 | //
 | ||||||
| // Marlin now allow you to have a vendor boot image to be displayed on machine
 | // Marlin now allow you to have a vendor boot image to be displayed on machine
 | ||||||
| // start. When SHOW_CUSTOM_BOOTSCREEN is defined Marlin will first show your
 | // start. When SHOW_CUSTOM_BOOTSCREEN is defined Marlin will first show your
 | ||||||
| // custom boot image and them the default Marlin boot image is shown.
 | // custom boot image and then the default Marlin boot image is shown.
 | ||||||
| //
 | //
 | ||||||
| // We suggest for you to take advantage of this new feature and keep the Marlin
 | // We suggest for you to take advantage of this new feature and keep the Marlin
 | ||||||
| // boot image unmodified. For an example have a look at the bq Hephestos 2
 | // boot image unmodified. For an example have a look at the bq Hephestos 2
 | ||||||
| @ -1000,6 +1000,10 @@ | |||||||
| //                       |________|_________|_________|
 | //                       |________|_________|_________|
 | ||||||
| //                           T1        T2        T3
 | //                           T1        T2        T3
 | ||||||
| //
 | //
 | ||||||
|  | //   P2: This starts a circular pattern with circle with middle in
 | ||||||
|  | //       NOZZLE_CLEAN_CIRCLE_MIDDLE radius of R and stroke count of S.
 | ||||||
|  | //       Before starting the circle nozzle goes to NOZZLE_CLEAN_START_POINT.
 | ||||||
|  | //
 | ||||||
| // Caveats: End point Z should use the same value as Start point Z.
 | // Caveats: End point Z should use the same value as Start point Z.
 | ||||||
| //
 | //
 | ||||||
| // Attention: This is an EXPERIMENTAL feature, in the future the G-code arguments
 | // Attention: This is an EXPERIMENTAL feature, in the future the G-code arguments
 | ||||||
| @ -1010,7 +1014,7 @@ | |||||||
| #if ENABLED(NOZZLE_CLEAN_FEATURE) | #if ENABLED(NOZZLE_CLEAN_FEATURE) | ||||||
|   // Default number of pattern repetitions
 |   // Default number of pattern repetitions
 | ||||||
|   #define NOZZLE_CLEAN_STROKES  12 |   #define NOZZLE_CLEAN_STROKES  12 | ||||||
|    | 
 | ||||||
|   // Default number of triangles
 |   // Default number of triangles
 | ||||||
|   #define NOZZLE_CLEAN_TRIANGLES  3 |   #define NOZZLE_CLEAN_TRIANGLES  3 | ||||||
| 
 | 
 | ||||||
| @ -1018,6 +1022,13 @@ | |||||||
|   #define NOZZLE_CLEAN_START_POINT { 30, 30, (Z_MIN_POS + 1)} |   #define NOZZLE_CLEAN_START_POINT { 30, 30, (Z_MIN_POS + 1)} | ||||||
|   #define NOZZLE_CLEAN_END_POINT   {100, 60, (Z_MIN_POS + 1)} |   #define NOZZLE_CLEAN_END_POINT   {100, 60, (Z_MIN_POS + 1)} | ||||||
| 
 | 
 | ||||||
|  |   // Circular pattern radius
 | ||||||
|  |   #define NOZZLE_CLEAN_CIRCLE_RADIUS 6.5 | ||||||
|  |   // Circular pattern circle fragments number
 | ||||||
|  |   #define NOZZLE_CLEAN_CIRCLE_FN 10 | ||||||
|  |   // Middle point of circle
 | ||||||
|  |   #define NOZZLE_CLEAN_CIRCLE_MIDDLE NOZZLE_CLEAN_START_POINT | ||||||
|  | 
 | ||||||
|   // Moves the nozzle to the initial position
 |   // Moves the nozzle to the initial position
 | ||||||
|   #define NOZZLE_CLEAN_GOBACK |   #define NOZZLE_CLEAN_GOBACK | ||||||
| #endif | #endif | ||||||
|  | |||||||
| @ -96,7 +96,7 @@ | |||||||
| //
 | //
 | ||||||
| // Marlin now allow you to have a vendor boot image to be displayed on machine
 | // Marlin now allow you to have a vendor boot image to be displayed on machine
 | ||||||
| // start. When SHOW_CUSTOM_BOOTSCREEN is defined Marlin will first show your
 | // start. When SHOW_CUSTOM_BOOTSCREEN is defined Marlin will first show your
 | ||||||
| // custom boot image and them the default Marlin boot image is shown.
 | // custom boot image and then the default Marlin boot image is shown.
 | ||||||
| //
 | //
 | ||||||
| // We suggest for you to take advantage of this new feature and keep the Marlin
 | // We suggest for you to take advantage of this new feature and keep the Marlin
 | ||||||
| // boot image unmodified. For an example have a look at the bq Hephestos 2
 | // boot image unmodified. For an example have a look at the bq Hephestos 2
 | ||||||
| @ -1000,6 +1000,10 @@ | |||||||
| //                       |________|_________|_________|
 | //                       |________|_________|_________|
 | ||||||
| //                           T1        T2        T3
 | //                           T1        T2        T3
 | ||||||
| //
 | //
 | ||||||
|  | //   P2: This starts a circular pattern with circle with middle in
 | ||||||
|  | //       NOZZLE_CLEAN_CIRCLE_MIDDLE radius of R and stroke count of S.
 | ||||||
|  | //       Before starting the circle nozzle goes to NOZZLE_CLEAN_START_POINT.
 | ||||||
|  | //
 | ||||||
| // Caveats: End point Z should use the same value as Start point Z.
 | // Caveats: End point Z should use the same value as Start point Z.
 | ||||||
| //
 | //
 | ||||||
| // Attention: This is an EXPERIMENTAL feature, in the future the G-code arguments
 | // Attention: This is an EXPERIMENTAL feature, in the future the G-code arguments
 | ||||||
| @ -1010,7 +1014,7 @@ | |||||||
| #if ENABLED(NOZZLE_CLEAN_FEATURE) | #if ENABLED(NOZZLE_CLEAN_FEATURE) | ||||||
|   // Default number of pattern repetitions
 |   // Default number of pattern repetitions
 | ||||||
|   #define NOZZLE_CLEAN_STROKES  12 |   #define NOZZLE_CLEAN_STROKES  12 | ||||||
|    | 
 | ||||||
|   // Default number of triangles
 |   // Default number of triangles
 | ||||||
|   #define NOZZLE_CLEAN_TRIANGLES  3 |   #define NOZZLE_CLEAN_TRIANGLES  3 | ||||||
| 
 | 
 | ||||||
| @ -1018,6 +1022,13 @@ | |||||||
|   #define NOZZLE_CLEAN_START_POINT { 30, 30, (Z_MIN_POS + 1)} |   #define NOZZLE_CLEAN_START_POINT { 30, 30, (Z_MIN_POS + 1)} | ||||||
|   #define NOZZLE_CLEAN_END_POINT   {100, 60, (Z_MIN_POS + 1)} |   #define NOZZLE_CLEAN_END_POINT   {100, 60, (Z_MIN_POS + 1)} | ||||||
| 
 | 
 | ||||||
|  |   // Circular pattern radius
 | ||||||
|  |   #define NOZZLE_CLEAN_CIRCLE_RADIUS 6.5 | ||||||
|  |   // Circular pattern circle fragments number
 | ||||||
|  |   #define NOZZLE_CLEAN_CIRCLE_FN 10 | ||||||
|  |   // Middle point of circle
 | ||||||
|  |   #define NOZZLE_CLEAN_CIRCLE_MIDDLE NOZZLE_CLEAN_START_POINT | ||||||
|  | 
 | ||||||
|   // Moves the nozzle to the initial position
 |   // Moves the nozzle to the initial position
 | ||||||
|   #define NOZZLE_CLEAN_GOBACK |   #define NOZZLE_CLEAN_GOBACK | ||||||
| #endif | #endif | ||||||
|  | |||||||
| @ -96,7 +96,7 @@ | |||||||
| //
 | //
 | ||||||
| // Marlin now allow you to have a vendor boot image to be displayed on machine
 | // Marlin now allow you to have a vendor boot image to be displayed on machine
 | ||||||
| // start. When SHOW_CUSTOM_BOOTSCREEN is defined Marlin will first show your
 | // start. When SHOW_CUSTOM_BOOTSCREEN is defined Marlin will first show your
 | ||||||
| // custom boot image and them the default Marlin boot image is shown.
 | // custom boot image and then the default Marlin boot image is shown.
 | ||||||
| //
 | //
 | ||||||
| // We suggest for you to take advantage of this new feature and keep the Marlin
 | // We suggest for you to take advantage of this new feature and keep the Marlin
 | ||||||
| // boot image unmodified. For an example have a look at the bq Hephestos 2
 | // boot image unmodified. For an example have a look at the bq Hephestos 2
 | ||||||
| @ -999,6 +999,10 @@ | |||||||
| //                       |________|_________|_________|
 | //                       |________|_________|_________|
 | ||||||
| //                           T1        T2        T3
 | //                           T1        T2        T3
 | ||||||
| //
 | //
 | ||||||
|  | //   P2: This starts a circular pattern with circle with middle in
 | ||||||
|  | //       NOZZLE_CLEAN_CIRCLE_MIDDLE radius of R and stroke count of S.
 | ||||||
|  | //       Before starting the circle nozzle goes to NOZZLE_CLEAN_START_POINT.
 | ||||||
|  | //
 | ||||||
| // Caveats: End point Z should use the same value as Start point Z.
 | // Caveats: End point Z should use the same value as Start point Z.
 | ||||||
| //
 | //
 | ||||||
| // Attention: This is an EXPERIMENTAL feature, in the future the G-code arguments
 | // Attention: This is an EXPERIMENTAL feature, in the future the G-code arguments
 | ||||||
| @ -1009,7 +1013,7 @@ | |||||||
| #if ENABLED(NOZZLE_CLEAN_FEATURE) | #if ENABLED(NOZZLE_CLEAN_FEATURE) | ||||||
|   // Default number of pattern repetitions
 |   // Default number of pattern repetitions
 | ||||||
|   #define NOZZLE_CLEAN_STROKES  12 |   #define NOZZLE_CLEAN_STROKES  12 | ||||||
|    | 
 | ||||||
|   // Default number of triangles
 |   // Default number of triangles
 | ||||||
|   #define NOZZLE_CLEAN_TRIANGLES  3 |   #define NOZZLE_CLEAN_TRIANGLES  3 | ||||||
| 
 | 
 | ||||||
| @ -1017,6 +1021,13 @@ | |||||||
|   #define NOZZLE_CLEAN_START_POINT { 30, 30, (Z_MIN_POS + 1)} |   #define NOZZLE_CLEAN_START_POINT { 30, 30, (Z_MIN_POS + 1)} | ||||||
|   #define NOZZLE_CLEAN_END_POINT   {100, 60, (Z_MIN_POS + 1)} |   #define NOZZLE_CLEAN_END_POINT   {100, 60, (Z_MIN_POS + 1)} | ||||||
| 
 | 
 | ||||||
|  |   // Circular pattern radius
 | ||||||
|  |   #define NOZZLE_CLEAN_CIRCLE_RADIUS 6.5 | ||||||
|  |   // Circular pattern circle fragments number
 | ||||||
|  |   #define NOZZLE_CLEAN_CIRCLE_FN 10 | ||||||
|  |   // Middle point of circle
 | ||||||
|  |   #define NOZZLE_CLEAN_CIRCLE_MIDDLE NOZZLE_CLEAN_START_POINT | ||||||
|  | 
 | ||||||
|   // Moves the nozzle to the initial position
 |   // Moves the nozzle to the initial position
 | ||||||
|   #define NOZZLE_CLEAN_GOBACK |   #define NOZZLE_CLEAN_GOBACK | ||||||
| #endif | #endif | ||||||
|  | |||||||
| @ -128,7 +128,7 @@ | |||||||
| //
 | //
 | ||||||
| // Marlin now allow you to have a vendor boot image to be displayed on machine
 | // Marlin now allow you to have a vendor boot image to be displayed on machine
 | ||||||
| // start. When SHOW_CUSTOM_BOOTSCREEN is defined Marlin will first show your
 | // start. When SHOW_CUSTOM_BOOTSCREEN is defined Marlin will first show your
 | ||||||
| // custom boot image and them the default Marlin boot image is shown.
 | // custom boot image and then the default Marlin boot image is shown.
 | ||||||
| //
 | //
 | ||||||
| // We suggest for you to take advantage of this new feature and keep the Marlin
 | // We suggest for you to take advantage of this new feature and keep the Marlin
 | ||||||
| // boot image unmodified. For an example have a look at the bq Hephestos 2
 | // boot image unmodified. For an example have a look at the bq Hephestos 2
 | ||||||
| @ -1015,6 +1015,10 @@ | |||||||
| //                       |________|_________|_________|
 | //                       |________|_________|_________|
 | ||||||
| //                           T1        T2        T3
 | //                           T1        T2        T3
 | ||||||
| //
 | //
 | ||||||
|  | //   P2: This starts a circular pattern with circle with middle in
 | ||||||
|  | //       NOZZLE_CLEAN_CIRCLE_MIDDLE radius of R and stroke count of S.
 | ||||||
|  | //       Before starting the circle nozzle goes to NOZZLE_CLEAN_START_POINT.
 | ||||||
|  | //
 | ||||||
| // Caveats: End point Z should use the same value as Start point Z.
 | // Caveats: End point Z should use the same value as Start point Z.
 | ||||||
| //
 | //
 | ||||||
| // Attention: This is an EXPERIMENTAL feature, in the future the G-code arguments
 | // Attention: This is an EXPERIMENTAL feature, in the future the G-code arguments
 | ||||||
| @ -1025,7 +1029,7 @@ | |||||||
| #if ENABLED(NOZZLE_CLEAN_FEATURE) | #if ENABLED(NOZZLE_CLEAN_FEATURE) | ||||||
|   // Default number of pattern repetitions
 |   // Default number of pattern repetitions
 | ||||||
|   #define NOZZLE_CLEAN_STROKES  12 |   #define NOZZLE_CLEAN_STROKES  12 | ||||||
|    | 
 | ||||||
|   // Default number of triangles
 |   // Default number of triangles
 | ||||||
|   #define NOZZLE_CLEAN_TRIANGLES  3 |   #define NOZZLE_CLEAN_TRIANGLES  3 | ||||||
| 
 | 
 | ||||||
| @ -1033,6 +1037,13 @@ | |||||||
|   #define NOZZLE_CLEAN_START_POINT { 30, 30, (Z_MIN_POS + 1)} |   #define NOZZLE_CLEAN_START_POINT { 30, 30, (Z_MIN_POS + 1)} | ||||||
|   #define NOZZLE_CLEAN_END_POINT   {100, 60, (Z_MIN_POS + 1)} |   #define NOZZLE_CLEAN_END_POINT   {100, 60, (Z_MIN_POS + 1)} | ||||||
| 
 | 
 | ||||||
|  |   // Circular pattern radius
 | ||||||
|  |   #define NOZZLE_CLEAN_CIRCLE_RADIUS 6.5 | ||||||
|  |   // Circular pattern circle fragments number
 | ||||||
|  |   #define NOZZLE_CLEAN_CIRCLE_FN 10 | ||||||
|  |   // Middle point of circle
 | ||||||
|  |   #define NOZZLE_CLEAN_CIRCLE_MIDDLE NOZZLE_CLEAN_START_POINT | ||||||
|  | 
 | ||||||
|   // Moves the nozzle to the initial position
 |   // Moves the nozzle to the initial position
 | ||||||
|   #define NOZZLE_CLEAN_GOBACK |   #define NOZZLE_CLEAN_GOBACK | ||||||
| #endif | #endif | ||||||
|  | |||||||
| @ -96,7 +96,7 @@ | |||||||
| //
 | //
 | ||||||
| // Marlin now allow you to have a vendor boot image to be displayed on machine
 | // Marlin now allow you to have a vendor boot image to be displayed on machine
 | ||||||
| // start. When SHOW_CUSTOM_BOOTSCREEN is defined Marlin will first show your
 | // start. When SHOW_CUSTOM_BOOTSCREEN is defined Marlin will first show your
 | ||||||
| // custom boot image and them the default Marlin boot image is shown.
 | // custom boot image and then the default Marlin boot image is shown.
 | ||||||
| //
 | //
 | ||||||
| // We suggest for you to take advantage of this new feature and keep the Marlin
 | // We suggest for you to take advantage of this new feature and keep the Marlin
 | ||||||
| // boot image unmodified. For an example have a look at the bq Hephestos 2
 | // boot image unmodified. For an example have a look at the bq Hephestos 2
 | ||||||
| @ -1021,6 +1021,10 @@ | |||||||
| //                       |________|_________|_________|
 | //                       |________|_________|_________|
 | ||||||
| //                           T1        T2        T3
 | //                           T1        T2        T3
 | ||||||
| //
 | //
 | ||||||
|  | //   P2: This starts a circular pattern with circle with middle in
 | ||||||
|  | //       NOZZLE_CLEAN_CIRCLE_MIDDLE radius of R and stroke count of S.
 | ||||||
|  | //       Before starting the circle nozzle goes to NOZZLE_CLEAN_START_POINT.
 | ||||||
|  | //
 | ||||||
| // Caveats: End point Z should use the same value as Start point Z.
 | // Caveats: End point Z should use the same value as Start point Z.
 | ||||||
| //
 | //
 | ||||||
| // Attention: This is an EXPERIMENTAL feature, in the future the G-code arguments
 | // Attention: This is an EXPERIMENTAL feature, in the future the G-code arguments
 | ||||||
| @ -1031,7 +1035,7 @@ | |||||||
| #if ENABLED(NOZZLE_CLEAN_FEATURE) | #if ENABLED(NOZZLE_CLEAN_FEATURE) | ||||||
|   // Default number of pattern repetitions
 |   // Default number of pattern repetitions
 | ||||||
|   #define NOZZLE_CLEAN_STROKES  12 |   #define NOZZLE_CLEAN_STROKES  12 | ||||||
|    | 
 | ||||||
|   // Default number of triangles
 |   // Default number of triangles
 | ||||||
|   #define NOZZLE_CLEAN_TRIANGLES  3 |   #define NOZZLE_CLEAN_TRIANGLES  3 | ||||||
| 
 | 
 | ||||||
| @ -1039,6 +1043,13 @@ | |||||||
|   #define NOZZLE_CLEAN_START_POINT { 30, 30, (Z_MIN_POS + 1)} |   #define NOZZLE_CLEAN_START_POINT { 30, 30, (Z_MIN_POS + 1)} | ||||||
|   #define NOZZLE_CLEAN_END_POINT   {100, 60, (Z_MIN_POS + 1)} |   #define NOZZLE_CLEAN_END_POINT   {100, 60, (Z_MIN_POS + 1)} | ||||||
| 
 | 
 | ||||||
|  |   // Circular pattern radius
 | ||||||
|  |   #define NOZZLE_CLEAN_CIRCLE_RADIUS 6.5 | ||||||
|  |   // Circular pattern circle fragments number
 | ||||||
|  |   #define NOZZLE_CLEAN_CIRCLE_FN 10 | ||||||
|  |   // Middle point of circle
 | ||||||
|  |   #define NOZZLE_CLEAN_CIRCLE_MIDDLE NOZZLE_CLEAN_START_POINT | ||||||
|  | 
 | ||||||
|   // Moves the nozzle to the initial position
 |   // Moves the nozzle to the initial position
 | ||||||
|   #define NOZZLE_CLEAN_GOBACK |   #define NOZZLE_CLEAN_GOBACK | ||||||
| #endif | #endif | ||||||
|  | |||||||
| @ -96,7 +96,7 @@ | |||||||
| //
 | //
 | ||||||
| // Marlin now allow you to have a vendor boot image to be displayed on machine
 | // Marlin now allow you to have a vendor boot image to be displayed on machine
 | ||||||
| // start. When SHOW_CUSTOM_BOOTSCREEN is defined Marlin will first show your
 | // start. When SHOW_CUSTOM_BOOTSCREEN is defined Marlin will first show your
 | ||||||
| // custom boot image and them the default Marlin boot image is shown.
 | // custom boot image and then the default Marlin boot image is shown.
 | ||||||
| //
 | //
 | ||||||
| // We suggest for you to take advantage of this new feature and keep the Marlin
 | // We suggest for you to take advantage of this new feature and keep the Marlin
 | ||||||
| // boot image unmodified. For an example have a look at the bq Hephestos 2
 | // boot image unmodified. For an example have a look at the bq Hephestos 2
 | ||||||
| @ -992,6 +992,10 @@ | |||||||
| //                       |________|_________|_________|
 | //                       |________|_________|_________|
 | ||||||
| //                           T1        T2        T3
 | //                           T1        T2        T3
 | ||||||
| //
 | //
 | ||||||
|  | //   P2: This starts a circular pattern with circle with middle in
 | ||||||
|  | //       NOZZLE_CLEAN_CIRCLE_MIDDLE radius of R and stroke count of S.
 | ||||||
|  | //       Before starting the circle nozzle goes to NOZZLE_CLEAN_START_POINT.
 | ||||||
|  | //
 | ||||||
| // Caveats: End point Z should use the same value as Start point Z.
 | // Caveats: End point Z should use the same value as Start point Z.
 | ||||||
| //
 | //
 | ||||||
| // Attention: This is an EXPERIMENTAL feature, in the future the G-code arguments
 | // Attention: This is an EXPERIMENTAL feature, in the future the G-code arguments
 | ||||||
| @ -1002,7 +1006,7 @@ | |||||||
| #if ENABLED(NOZZLE_CLEAN_FEATURE) | #if ENABLED(NOZZLE_CLEAN_FEATURE) | ||||||
|   // Default number of pattern repetitions
 |   // Default number of pattern repetitions
 | ||||||
|   #define NOZZLE_CLEAN_STROKES  12 |   #define NOZZLE_CLEAN_STROKES  12 | ||||||
|    | 
 | ||||||
|   // Default number of triangles
 |   // Default number of triangles
 | ||||||
|   #define NOZZLE_CLEAN_TRIANGLES  3 |   #define NOZZLE_CLEAN_TRIANGLES  3 | ||||||
| 
 | 
 | ||||||
| @ -1010,6 +1014,13 @@ | |||||||
|   #define NOZZLE_CLEAN_START_POINT { 30, 30, (Z_MIN_POS + 1)} |   #define NOZZLE_CLEAN_START_POINT { 30, 30, (Z_MIN_POS + 1)} | ||||||
|   #define NOZZLE_CLEAN_END_POINT   {100, 60, (Z_MIN_POS + 1)} |   #define NOZZLE_CLEAN_END_POINT   {100, 60, (Z_MIN_POS + 1)} | ||||||
| 
 | 
 | ||||||
|  |   // Circular pattern radius
 | ||||||
|  |   #define NOZZLE_CLEAN_CIRCLE_RADIUS 6.5 | ||||||
|  |   // Circular pattern circle fragments number
 | ||||||
|  |   #define NOZZLE_CLEAN_CIRCLE_FN 10 | ||||||
|  |   // Middle point of circle
 | ||||||
|  |   #define NOZZLE_CLEAN_CIRCLE_MIDDLE NOZZLE_CLEAN_START_POINT | ||||||
|  | 
 | ||||||
|   // Moves the nozzle to the initial position
 |   // Moves the nozzle to the initial position
 | ||||||
|   #define NOZZLE_CLEAN_GOBACK |   #define NOZZLE_CLEAN_GOBACK | ||||||
| #endif | #endif | ||||||
|  | |||||||
| @ -96,7 +96,7 @@ | |||||||
| //
 | //
 | ||||||
| // Marlin now allow you to have a vendor boot image to be displayed on machine
 | // Marlin now allow you to have a vendor boot image to be displayed on machine
 | ||||||
| // start. When SHOW_CUSTOM_BOOTSCREEN is defined Marlin will first show your
 | // start. When SHOW_CUSTOM_BOOTSCREEN is defined Marlin will first show your
 | ||||||
| // custom boot image and them the default Marlin boot image is shown.
 | // custom boot image and then the default Marlin boot image is shown.
 | ||||||
| //
 | //
 | ||||||
| // We suggest for you to take advantage of this new feature and keep the Marlin
 | // We suggest for you to take advantage of this new feature and keep the Marlin
 | ||||||
| // boot image unmodified. For an example have a look at the bq Hephestos 2
 | // boot image unmodified. For an example have a look at the bq Hephestos 2
 | ||||||
| @ -1000,6 +1000,10 @@ | |||||||
| //                       |________|_________|_________|
 | //                       |________|_________|_________|
 | ||||||
| //                           T1        T2        T3
 | //                           T1        T2        T3
 | ||||||
| //
 | //
 | ||||||
|  | //   P2: This starts a circular pattern with circle with middle in
 | ||||||
|  | //       NOZZLE_CLEAN_CIRCLE_MIDDLE radius of R and stroke count of S.
 | ||||||
|  | //       Before starting the circle nozzle goes to NOZZLE_CLEAN_START_POINT.
 | ||||||
|  | //
 | ||||||
| // Caveats: End point Z should use the same value as Start point Z.
 | // Caveats: End point Z should use the same value as Start point Z.
 | ||||||
| //
 | //
 | ||||||
| // Attention: This is an EXPERIMENTAL feature, in the future the G-code arguments
 | // Attention: This is an EXPERIMENTAL feature, in the future the G-code arguments
 | ||||||
| @ -1010,7 +1014,7 @@ | |||||||
| #if ENABLED(NOZZLE_CLEAN_FEATURE) | #if ENABLED(NOZZLE_CLEAN_FEATURE) | ||||||
|   // Default number of pattern repetitions
 |   // Default number of pattern repetitions
 | ||||||
|   #define NOZZLE_CLEAN_STROKES  12 |   #define NOZZLE_CLEAN_STROKES  12 | ||||||
|    | 
 | ||||||
|   // Default number of triangles
 |   // Default number of triangles
 | ||||||
|   #define NOZZLE_CLEAN_TRIANGLES  3 |   #define NOZZLE_CLEAN_TRIANGLES  3 | ||||||
| 
 | 
 | ||||||
| @ -1018,6 +1022,13 @@ | |||||||
|   #define NOZZLE_CLEAN_START_POINT { 30, 30, (Z_MIN_POS + 1)} |   #define NOZZLE_CLEAN_START_POINT { 30, 30, (Z_MIN_POS + 1)} | ||||||
|   #define NOZZLE_CLEAN_END_POINT   {100, 60, (Z_MIN_POS + 1)} |   #define NOZZLE_CLEAN_END_POINT   {100, 60, (Z_MIN_POS + 1)} | ||||||
| 
 | 
 | ||||||
|  |   // Circular pattern radius
 | ||||||
|  |   #define NOZZLE_CLEAN_CIRCLE_RADIUS 6.5 | ||||||
|  |   // Circular pattern circle fragments number
 | ||||||
|  |   #define NOZZLE_CLEAN_CIRCLE_FN 10 | ||||||
|  |   // Middle point of circle
 | ||||||
|  |   #define NOZZLE_CLEAN_CIRCLE_MIDDLE NOZZLE_CLEAN_START_POINT | ||||||
|  | 
 | ||||||
|   // Moves the nozzle to the initial position
 |   // Moves the nozzle to the initial position
 | ||||||
|   #define NOZZLE_CLEAN_GOBACK |   #define NOZZLE_CLEAN_GOBACK | ||||||
| #endif | #endif | ||||||
|  | |||||||
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							| @ -217,13 +217,12 @@ | |||||||
|  * Multiple extruders can be assigned to the same pin in which case |  * Multiple extruders can be assigned to the same pin in which case | ||||||
|  * the fan will turn on when any selected extruder is above the threshold. |  * the fan will turn on when any selected extruder is above the threshold. | ||||||
|  */ |  */ | ||||||
| 
 |  | ||||||
| #define E0_AUTO_FAN_PIN -1 | #define E0_AUTO_FAN_PIN -1 | ||||||
| #define E1_AUTO_FAN_PIN -1 | #define E1_AUTO_FAN_PIN -1 | ||||||
| #define E2_AUTO_FAN_PIN -1 | #define E2_AUTO_FAN_PIN -1 | ||||||
| #define E3_AUTO_FAN_PIN -1 | #define E3_AUTO_FAN_PIN -1 | ||||||
| #define EXTRUDER_AUTO_FAN_TEMPERATURE 50 | #define EXTRUDER_AUTO_FAN_TEMPERATURE 50 | ||||||
| #define EXTRUDER_AUTO_FAN_SPEED   255  // 255 == full speed
 | #define EXTRUDER_AUTO_FAN_SPEED   255  // == full speed
 | ||||||
| 
 | 
 | ||||||
| // Define a pin to turn case light on/off
 | // Define a pin to turn case light on/off
 | ||||||
| //#define CASE_LIGHT_PIN 4
 | //#define CASE_LIGHT_PIN 4
 | ||||||
| @ -309,13 +308,13 @@ | |||||||
|       // Remember: you should set the second extruder x-offset to 0 in your slicer.
 |       // Remember: you should set the second extruder x-offset to 0 in your slicer.
 | ||||||
| 
 | 
 | ||||||
|   // There are a few selectable movement modes for dual x-carriages using M605 S<mode>
 |   // There are a few selectable movement modes for dual x-carriages using M605 S<mode>
 | ||||||
|   //    Mode 0: Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
 |   //    Mode 0 (DXC_FULL_CONTROL_MODE): Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
 | ||||||
|   //                           as long as it supports dual x-carriages. (M605 S0)
 |   //                                    as long as it supports dual x-carriages. (M605 S0)
 | ||||||
|   //    Mode 1: Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so
 |   //    Mode 1 (DXC_AUTO_PARK_MODE)   : Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so
 | ||||||
|   //                           that additional slicer support is not required. (M605 S1)
 |   //                                    that additional slicer support is not required. (M605 S1)
 | ||||||
|   //    Mode 2: Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all
 |   //    Mode 2 (DXC_DUPLICATION_MODE) : Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all
 | ||||||
|   //                           actions of the first x-carriage. This allows the printer to print 2 arbitrary items at
 |   //                                    actions of the first x-carriage. This allows the printer to print 2 arbitrary items at
 | ||||||
|   //                           once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
 |   //                                    once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
 | ||||||
| 
 | 
 | ||||||
|   // This is the default power-up mode which can be later using M605.
 |   // This is the default power-up mode which can be later using M605.
 | ||||||
|   #define DEFAULT_DUAL_X_CARRIAGE_MODE DXC_FULL_CONTROL_MODE |   #define DEFAULT_DUAL_X_CARRIAGE_MODE DXC_FULL_CONTROL_MODE | ||||||
| @ -428,6 +427,9 @@ | |||||||
| // On the Info Screen, display XY with one decimal place when possible
 | // On the Info Screen, display XY with one decimal place when possible
 | ||||||
| //#define LCD_DECIMAL_SMALL_XY
 | //#define LCD_DECIMAL_SMALL_XY
 | ||||||
| 
 | 
 | ||||||
|  | // The timeout (in ms) to return to the status screen from sub-menus
 | ||||||
|  | //#define LCD_TIMEOUT_TO_STATUS 15000
 | ||||||
|  | 
 | ||||||
| #if ENABLED(SDSUPPORT) | #if ENABLED(SDSUPPORT) | ||||||
| 
 | 
 | ||||||
|   // Some RAMPS and other boards don't detect when an SD card is inserted. You can work
 |   // Some RAMPS and other boards don't detect when an SD card is inserted. You can work
 | ||||||
| @ -445,6 +447,42 @@ | |||||||
|   // using:
 |   // using:
 | ||||||
|   //#define MENU_ADDAUTOSTART
 |   //#define MENU_ADDAUTOSTART
 | ||||||
| 
 | 
 | ||||||
|  |   /**
 | ||||||
|  |    * Sort SD file listings in alphabetical order. | ||||||
|  |    * | ||||||
|  |    * With this option enabled, items on SD cards will be sorted | ||||||
|  |    * by name for easier navigation. | ||||||
|  |    * | ||||||
|  |    * By default... | ||||||
|  |    * | ||||||
|  |    *  - Use the slowest -but safest- method for sorting. | ||||||
|  |    *  - Folders are sorted to the top. | ||||||
|  |    *  - The sort key is statically allocated. | ||||||
|  |    *  - No added G-code (M34) support. | ||||||
|  |    *  - 40 item sorting limit. (Items after the first 40 are unsorted.) | ||||||
|  |    * | ||||||
|  |    * SD sorting uses static allocation (as set by SDSORT_LIMIT), allowing the | ||||||
|  |    * compiler to calculate the worst-case usage and throw an error if the SRAM | ||||||
|  |    * limit is exceeded. | ||||||
|  |    * | ||||||
|  |    *  - SDSORT_USES_RAM provides faster sorting via a static directory buffer. | ||||||
|  |    *  - SDSORT_USES_STACK does the same, but uses a local stack-based buffer. | ||||||
|  |    *  - SDSORT_CACHE_NAMES will retain the sorted file listing in RAM. (Expensive!) | ||||||
|  |    *  - SDSORT_DYNAMIC_RAM only uses RAM when the SD menu is visible. (Use with caution!) | ||||||
|  |    */ | ||||||
|  |   //#define SDCARD_SORT_ALPHA
 | ||||||
|  | 
 | ||||||
|  |   // SD Card Sorting options
 | ||||||
|  |   #if ENABLED(SDCARD_SORT_ALPHA) | ||||||
|  |     #define SDSORT_LIMIT       40     // Maximum number of sorted items (10-256).
 | ||||||
|  |     #define FOLDER_SORTING     -1     // -1=above  0=none  1=below
 | ||||||
|  |     #define SDSORT_GCODE       false  // Allow turning sorting on/off with LCD and M34 g-code.
 | ||||||
|  |     #define SDSORT_USES_RAM    false  // Pre-allocate a static array for faster pre-sorting.
 | ||||||
|  |     #define SDSORT_USES_STACK  false  // Prefer the stack for pre-sorting to give back some SRAM. (Negated by next 2 options.)
 | ||||||
|  |     #define SDSORT_CACHE_NAMES false  // Keep sorted items in RAM longer for speedy performance. Most expensive option.
 | ||||||
|  |     #define SDSORT_DYNAMIC_RAM false  // Use dynamic allocation (within SD menus). Least expensive option. Set SDSORT_LIMIT before use!
 | ||||||
|  |   #endif | ||||||
|  | 
 | ||||||
|   // Show a progress bar on HD44780 LCDs for SD printing
 |   // Show a progress bar on HD44780 LCDs for SD printing
 | ||||||
|   //#define LCD_PROGRESS_BAR
 |   //#define LCD_PROGRESS_BAR
 | ||||||
| 
 | 
 | ||||||
| @ -457,6 +495,8 @@ | |||||||
|     #define PROGRESS_MSG_EXPIRE   0 |     #define PROGRESS_MSG_EXPIRE   0 | ||||||
|     // Enable this to show messages for MSG_TIME then hide them
 |     // Enable this to show messages for MSG_TIME then hide them
 | ||||||
|     //#define PROGRESS_MSG_ONCE
 |     //#define PROGRESS_MSG_ONCE
 | ||||||
|  |     // Add a menu item to test the progress bar:
 | ||||||
|  |     //#define LCD_PROGRESS_BAR_TEST
 | ||||||
|   #endif |   #endif | ||||||
| 
 | 
 | ||||||
|   // This allows hosts to request long names for files and folders with M33
 |   // This allows hosts to request long names for files and folders with M33
 | ||||||
| @ -469,8 +509,25 @@ | |||||||
| 
 | 
 | ||||||
| #endif // SDSUPPORT
 | #endif // SDSUPPORT
 | ||||||
| 
 | 
 | ||||||
| // Some additional options are available for graphical displays:
 | /**
 | ||||||
|  |  * Additional options for Graphical Displays | ||||||
|  |  * | ||||||
|  |  * Use the optimizations here to improve printing performance, | ||||||
|  |  * which can be adversely affected by graphical display drawing, | ||||||
|  |  * especially when doing several short moves, and when printing | ||||||
|  |  * on DELTA and SCARA machines. | ||||||
|  |  * | ||||||
|  |  * Some of these options may result in the display lagging behind | ||||||
|  |  * controller events, as there is a trade-off between reliable | ||||||
|  |  * printing performance versus fast display updates. | ||||||
|  |  */ | ||||||
| #if ENABLED(DOGLCD) | #if ENABLED(DOGLCD) | ||||||
|  |   // Enable to save many cycles by drawing a hollow frame on the Info Screen
 | ||||||
|  |   #define XYZ_HOLLOW_FRAME | ||||||
|  | 
 | ||||||
|  |   // Enable to save many cycles by drawing a hollow frame on Menu Screens
 | ||||||
|  |   #define MENU_HOLLOW_FRAME | ||||||
|  | 
 | ||||||
|   // A bigger font is available for edit items. Costs 3120 bytes of PROGMEM.
 |   // A bigger font is available for edit items. Costs 3120 bytes of PROGMEM.
 | ||||||
|   // Western only. Not available for Cyrillic, Kana, Turkish, Greek, or Chinese.
 |   // Western only. Not available for Cyrillic, Kana, Turkish, Greek, or Chinese.
 | ||||||
|   //#define USE_BIG_EDIT_FONT
 |   //#define USE_BIG_EDIT_FONT
 | ||||||
| @ -510,36 +567,6 @@ | |||||||
|   #define BABYSTEP_MULTIPLICATOR 1 //faster movements
 |   #define BABYSTEP_MULTIPLICATOR 1 //faster movements
 | ||||||
| #endif | #endif | ||||||
| 
 | 
 | ||||||
| //
 |  | ||||||
| // Ensure Smooth Moves
 |  | ||||||
| //
 |  | ||||||
| // Enable this option to prevent the machine from stuttering when printing multiple short segments.
 |  | ||||||
| // This feature uses two strategies to eliminate stuttering:
 |  | ||||||
| //
 |  | ||||||
| // 1. During short segments a Graphical LCD update may take so much time that the planner buffer gets
 |  | ||||||
| //    completely drained. When this happens pauses are introduced between short segments, and print moves
 |  | ||||||
| //    will become jerky until a longer segment provides enough time for the buffer to be filled again.
 |  | ||||||
| //    This jerkiness negatively affects print quality. The ENSURE_SMOOTH_MOVES option addresses the issue
 |  | ||||||
| //    by pausing the LCD until there's enough time to safely update.
 |  | ||||||
| //
 |  | ||||||
| //    NOTE: This will cause the Info Screen to lag and controller buttons may become unresponsive.
 |  | ||||||
| //          Enable ALWAYS_ALLOW_MENU to keep the controller responsive.
 |  | ||||||
| //
 |  | ||||||
| // 2. No block is allowed to take less time than MIN_BLOCK_TIME. That's the time it takes in the main
 |  | ||||||
| //    loop to add a new block to the buffer, check temperatures, etc., including all blocked time due to
 |  | ||||||
| //    interrupts (without LCD update). By enforcing a minimum time-per-move, the buffer is prevented from
 |  | ||||||
| //    draining.
 |  | ||||||
| //
 |  | ||||||
| #define ENSURE_SMOOTH_MOVES |  | ||||||
| #if ENABLED(ENSURE_SMOOTH_MOVES) |  | ||||||
|   //#define ALWAYS_ALLOW_MENU      // If enabled, the menu will always be responsive.
 |  | ||||||
|                                    // WARNING: Menu navigation during short moves may cause stuttering!
 |  | ||||||
|   #define LCD_UPDATE_THRESHOLD 135 // (ms) Minimum duration for the current segment to allow an LCD update.
 |  | ||||||
|                                    // Default value is good for graphical LCDs (e.g., REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER).
 |  | ||||||
|                                    // You may try to lower this value until you printer starts stuttering again as if ENSURE_SMOOTH_MOVES is disabled.
 |  | ||||||
|   #define MIN_BLOCK_TIME 6         // (ms) Minimum duration of a single block. You shouldn't need to modify this.
 |  | ||||||
| #endif |  | ||||||
| 
 |  | ||||||
| // @section extruder
 | // @section extruder
 | ||||||
| 
 | 
 | ||||||
| // extruder advance constant (s2/mm3)
 | // extruder advance constant (s2/mm3)
 | ||||||
| @ -561,19 +588,37 @@ | |||||||
|  * |  * | ||||||
|  * Assumption: advance = k * (delta velocity) |  * Assumption: advance = k * (delta velocity) | ||||||
|  * K=0 means advance disabled. |  * K=0 means advance disabled. | ||||||
|  * To get a rough start value for calibration, measure your "free filament length" |  * See Marlin documentation for calibration instructions. | ||||||
|  * between the hobbed bolt and the nozzle (in cm). Use the formula below that fits |  | ||||||
|  * your setup, where L is the "free filament length": |  | ||||||
|  * |  | ||||||
|  * Filament diameter           |   1.75mm  |    3.0mm   | |  | ||||||
|  * ----------------------------|-----------|------------| |  | ||||||
|  * Stiff filament (PLA)        | K=47*L/10 | K=139*L/10 | |  | ||||||
|  * Softer filament (ABS, nGen) | K=88*L/10 | K=260*L/10 | |  | ||||||
|  */ |  */ | ||||||
| //#define LIN_ADVANCE
 | //#define LIN_ADVANCE
 | ||||||
| 
 | 
 | ||||||
| #if ENABLED(LIN_ADVANCE) | #if ENABLED(LIN_ADVANCE) | ||||||
|   #define LIN_ADVANCE_K 75 |   #define LIN_ADVANCE_K 75 | ||||||
|  | 
 | ||||||
|  |   /**
 | ||||||
|  |    * Some Slicers produce Gcode with randomly jumping extrusion widths occasionally. | ||||||
|  |    * For example within a 0.4mm perimeter it may produce a single segment of 0.05mm width. | ||||||
|  |    * While this is harmless for normal printing (the fluid nature of the filament will | ||||||
|  |    * close this very, very tiny gap), it throws off the LIN_ADVANCE pressure adaption. | ||||||
|  |    * | ||||||
|  |    * For this case LIN_ADVANCE_E_D_RATIO can be used to set the extrusion:distance ratio | ||||||
|  |    * to a fixed value. Note that using a fixed ratio will lead to wrong nozzle pressures | ||||||
|  |    * if the slicer is using variable widths or layer heights within one print! | ||||||
|  |    * | ||||||
|  |    * This option sets the default E:D ratio at startup. Use `M905` to override this value. | ||||||
|  |    * | ||||||
|  |    * Example: `M905 W0.4 H0.2 D1.75`, where: | ||||||
|  |    *   - W is the extrusion width in mm | ||||||
|  |    *   - H is the layer height in mm | ||||||
|  |    *   - D is the filament diameter in mm | ||||||
|  |    * | ||||||
|  |    * Set to 0 to auto-detect the ratio based on given Gcode G1 print moves. | ||||||
|  |    * | ||||||
|  |    * Slic3r (including Prusa Slic3r) produces Gcode compatible with the automatic mode. | ||||||
|  |    * Cura (as of this writing) may produce Gcode incompatible with the automatic mode. | ||||||
|  |    */ | ||||||
|  |   #define LIN_ADVANCE_E_D_RATIO 0 // The calculated ratio (or 0) according to the formula W * H / ((D / 2) ^ 2 * PI)
 | ||||||
|  |                                   // Example: 0.4 * 0.2 / ((1.75 / 2) ^ 2 * PI) = 0.033260135
 | ||||||
| #endif | #endif | ||||||
| 
 | 
 | ||||||
| // @section leveling
 | // @section leveling
 | ||||||
| @ -680,33 +725,42 @@ | |||||||
|   #define RETRACT_RECOVER_FEEDRATE 8     //default feedrate for recovering from retraction (mm/s)
 |   #define RETRACT_RECOVER_FEEDRATE 8     //default feedrate for recovering from retraction (mm/s)
 | ||||||
| #endif | #endif | ||||||
| 
 | 
 | ||||||
| // Add support for experimental filament exchange support M600; requires display
 | /**
 | ||||||
| #if ENABLED(ULTIPANEL) |  * Filament Change | ||||||
|   // #define FILAMENT_CHANGE_FEATURE             // Enable filament exchange menu and M600 g-code (used for runout sensor too)
 |  * Experimental filament change support. | ||||||
|   #if ENABLED(FILAMENT_CHANGE_FEATURE) |  * Adds the GCode M600 for initiating filament change. | ||||||
|     #define FILAMENT_CHANGE_X_POS 3             // X position of hotend
 |  * | ||||||
|     #define FILAMENT_CHANGE_Y_POS 3             // Y position of hotend
 |  * Requires an LCD display. | ||||||
|     #define FILAMENT_CHANGE_Z_ADD 10            // Z addition of hotend (lift)
 |  * This feature is required for the default FILAMENT_RUNOUT_SCRIPT. | ||||||
|     #define FILAMENT_CHANGE_XY_FEEDRATE 100     // X and Y axes feedrate in mm/s (also used for delta printers Z axis)
 |  */ | ||||||
|     #define FILAMENT_CHANGE_Z_FEEDRATE 5        // Z axis feedrate in mm/s (not used for delta printers)
 | //#define FILAMENT_CHANGE_FEATURE
 | ||||||
|     #define FILAMENT_CHANGE_RETRACT_LENGTH 2    // Initial retract in mm
 | #if ENABLED(FILAMENT_CHANGE_FEATURE) | ||||||
|                                                 // It is a short retract used immediately after print interrupt before move to filament exchange position
 |   #define FILAMENT_CHANGE_X_POS 3             // X position of hotend
 | ||||||
|     #define FILAMENT_CHANGE_RETRACT_FEEDRATE 60 // Initial retract feedrate in mm/s
 |   #define FILAMENT_CHANGE_Y_POS 3             // Y position of hotend
 | ||||||
|     #define FILAMENT_CHANGE_UNLOAD_LENGTH 100   // Unload filament length from hotend in mm
 |   #define FILAMENT_CHANGE_Z_ADD 10            // Z addition of hotend (lift)
 | ||||||
|                                                 // Longer length for bowden printers to unload filament from whole bowden tube,
 |   #define FILAMENT_CHANGE_XY_FEEDRATE 100     // X and Y axes feedrate in mm/s (also used for delta printers Z axis)
 | ||||||
|                                                 // shorter lenght for printers without bowden to unload filament from extruder only,
 |   #define FILAMENT_CHANGE_Z_FEEDRATE 5        // Z axis feedrate in mm/s (not used for delta printers)
 | ||||||
|                                                 // 0 to disable unloading for manual unloading
 |   #define FILAMENT_CHANGE_RETRACT_FEEDRATE 60 // Initial retract feedrate in mm/s
 | ||||||
|     #define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10  // Unload filament feedrate in mm/s - filament unloading can be fast
 |   #define FILAMENT_CHANGE_RETRACT_LENGTH 2    // Initial retract in mm
 | ||||||
|     #define FILAMENT_CHANGE_LOAD_LENGTH 0       // Load filament length over hotend in mm
 |                                               // It is a short retract used immediately after print interrupt before move to filament exchange position
 | ||||||
|                                                 // Longer length for bowden printers to fast load filament into whole bowden tube over the hotend,
 |   #define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10  // Unload filament feedrate in mm/s - filament unloading can be fast
 | ||||||
|                                                 // Short or zero length for printers without bowden where loading is not used
 |   #define FILAMENT_CHANGE_UNLOAD_LENGTH 100   // Unload filament length from hotend in mm
 | ||||||
|     #define FILAMENT_CHANGE_LOAD_FEEDRATE 10    // Load filament feedrate in mm/s - filament loading into the bowden tube can be fast
 |                                               // Longer length for bowden printers to unload filament from whole bowden tube,
 | ||||||
|     #define FILAMENT_CHANGE_EXTRUDE_LENGTH 50   // Extrude filament length in mm after filament is load over the hotend,
 |                                               // shorter length for printers without bowden to unload filament from extruder only,
 | ||||||
|                                                 // 0 to disable for manual extrusion
 |                                               // 0 to disable unloading for manual unloading
 | ||||||
|                                                 // Filament can be extruded repeatedly from the filament exchange menu to fill the hotend,
 |   #define FILAMENT_CHANGE_LOAD_FEEDRATE 6     // Load filament feedrate in mm/s - filament loading into the bowden tube can be fast
 | ||||||
|                                                 // or until outcoming filament color is not clear for filament color change
 |   #define FILAMENT_CHANGE_LOAD_LENGTH 0       // Load filament length over hotend in mm
 | ||||||
|     #define FILAMENT_CHANGE_EXTRUDE_FEEDRATE 3  // Extrude filament feedrate in mm/s - must be slower than load feedrate
 |                                               // Longer length for bowden printers to fast load filament into whole bowden tube over the hotend,
 | ||||||
|   #endif |                                               // Short or zero length for printers without bowden where loading is not used
 | ||||||
|  |   #define FILAMENT_CHANGE_EXTRUDE_FEEDRATE 3  // Extrude filament feedrate in mm/s - must be slower than load feedrate
 | ||||||
|  |   #define FILAMENT_CHANGE_EXTRUDE_LENGTH 50   // Extrude filament length in mm after filament is loaded over the hotend,
 | ||||||
|  |                                               // 0 to disable for manual extrusion
 | ||||||
|  |                                               // Filament can be extruded repeatedly from the filament exchange menu to fill the hotend,
 | ||||||
|  |                                               // or until outcoming filament color is not clear for filament color change
 | ||||||
|  |   #define FILAMENT_CHANGE_NOZZLE_TIMEOUT 45L  // Turn off nozzle if user doesn't change filament within this time limit in seconds
 | ||||||
|  |   #define FILAMENT_CHANGE_NUMBER_OF_ALERT_BEEPS  5L  // Number of alert beeps before printer goes quiet
 | ||||||
|  |   #define FILAMENT_CHANGE_NO_STEPPER_TIMEOUT         // Enable to have stepper motors hold position during filament change
 | ||||||
|  |                                                      // even if it takes longer than DEFAULT_STEPPER_DEACTIVE_TIME.
 | ||||||
| #endif | #endif | ||||||
| 
 | 
 | ||||||
| /******************************************************************************\
 | /******************************************************************************\
 | ||||||
| @ -1101,4 +1155,29 @@ | |||||||
|  */ |  */ | ||||||
| //#define EXTENDED_CAPABILITIES_REPORT
 | //#define EXTENDED_CAPABILITIES_REPORT
 | ||||||
| 
 | 
 | ||||||
|  | /**
 | ||||||
|  |  * Double-click the Encoder button on the Status Screen for Z Babystepping. | ||||||
|  |  */ | ||||||
|  | //#define DOUBLECLICK_FOR_Z_BABYSTEPPING
 | ||||||
|  | #define DOUBLECLICK_MAX_INTERVAL 1250   // Maximum interval between clicks, in milliseconds.
 | ||||||
|  |                                         // Note: You may need to add extra time to mitigate controller latency.
 | ||||||
|  | 
 | ||||||
|  | /**
 | ||||||
|  |  * Volumetric extrusion default state | ||||||
|  |  * Activate to make volumetric extrusion the default method, | ||||||
|  |  * with DEFAULT_NOMINAL_FILAMENT_DIA as the default diameter. | ||||||
|  |  * | ||||||
|  |  * M200 D0 to disable, M200 Dn to set a new diameter. | ||||||
|  |  */  | ||||||
|  | //#define VOLUMETRIC_DEFAULT_ON
 | ||||||
|  | 
 | ||||||
|  | /**
 | ||||||
|  |  * Enable this option for a leaner build of Marlin that removes all | ||||||
|  |  * workspace offsets, simplifying coordinate transformations, leveling, etc. | ||||||
|  |  * | ||||||
|  |  *  - M206 and M428 are disabled. | ||||||
|  |  *  - G92 will revert to its behavior from Marlin 1.0. | ||||||
|  |  */ | ||||||
|  | //#define NO_WORKSPACE_OFFSETS
 | ||||||
|  | 
 | ||||||
| #endif // CONFIGURATION_ADV_H
 | #endif // CONFIGURATION_ADV_H
 | ||||||
|  | |||||||
| @ -96,7 +96,7 @@ | |||||||
| //
 | //
 | ||||||
| // Marlin now allow you to have a vendor boot image to be displayed on machine
 | // Marlin now allow you to have a vendor boot image to be displayed on machine
 | ||||||
| // start. When SHOW_CUSTOM_BOOTSCREEN is defined Marlin will first show your
 | // start. When SHOW_CUSTOM_BOOTSCREEN is defined Marlin will first show your
 | ||||||
| // custom boot image and them the default Marlin boot image is shown.
 | // custom boot image and then the default Marlin boot image is shown.
 | ||||||
| //
 | //
 | ||||||
| // We suggest for you to take advantage of this new feature and keep the Marlin
 | // We suggest for you to take advantage of this new feature and keep the Marlin
 | ||||||
| // boot image unmodified. For an example have a look at the bq Hephestos 2
 | // boot image unmodified. For an example have a look at the bq Hephestos 2
 | ||||||
| @ -1087,6 +1087,10 @@ | |||||||
| //                       |________|_________|_________|
 | //                       |________|_________|_________|
 | ||||||
| //                           T1        T2        T3
 | //                           T1        T2        T3
 | ||||||
| //
 | //
 | ||||||
|  | //   P2: This starts a circular pattern with circle with middle in
 | ||||||
|  | //       NOZZLE_CLEAN_CIRCLE_MIDDLE radius of R and stroke count of S.
 | ||||||
|  | //       Before starting the circle nozzle goes to NOZZLE_CLEAN_START_POINT.
 | ||||||
|  | //
 | ||||||
| // Caveats: End point Z should use the same value as Start point Z.
 | // Caveats: End point Z should use the same value as Start point Z.
 | ||||||
| //
 | //
 | ||||||
| // Attention: This is an EXPERIMENTAL feature, in the future the G-code arguments
 | // Attention: This is an EXPERIMENTAL feature, in the future the G-code arguments
 | ||||||
| @ -1097,7 +1101,7 @@ | |||||||
| #if ENABLED(NOZZLE_CLEAN_FEATURE) | #if ENABLED(NOZZLE_CLEAN_FEATURE) | ||||||
|   // Default number of pattern repetitions
 |   // Default number of pattern repetitions
 | ||||||
|   #define NOZZLE_CLEAN_STROKES  12 |   #define NOZZLE_CLEAN_STROKES  12 | ||||||
|    | 
 | ||||||
|   // Default number of triangles
 |   // Default number of triangles
 | ||||||
|   #define NOZZLE_CLEAN_TRIANGLES  3 |   #define NOZZLE_CLEAN_TRIANGLES  3 | ||||||
| 
 | 
 | ||||||
| @ -1105,6 +1109,13 @@ | |||||||
|   #define NOZZLE_CLEAN_START_POINT { 30, 30, (Z_MIN_POS + 1)} |   #define NOZZLE_CLEAN_START_POINT { 30, 30, (Z_MIN_POS + 1)} | ||||||
|   #define NOZZLE_CLEAN_END_POINT   {100, 60, (Z_MIN_POS + 1)} |   #define NOZZLE_CLEAN_END_POINT   {100, 60, (Z_MIN_POS + 1)} | ||||||
| 
 | 
 | ||||||
|  |   // Circular pattern radius
 | ||||||
|  |   #define NOZZLE_CLEAN_CIRCLE_RADIUS 6.5 | ||||||
|  |   // Circular pattern circle fragments number
 | ||||||
|  |   #define NOZZLE_CLEAN_CIRCLE_FN 10 | ||||||
|  |   // Middle point of circle
 | ||||||
|  |   #define NOZZLE_CLEAN_CIRCLE_MIDDLE NOZZLE_CLEAN_START_POINT | ||||||
|  | 
 | ||||||
|   // Moves the nozzle to the initial position
 |   // Moves the nozzle to the initial position
 | ||||||
|   #define NOZZLE_CLEAN_GOBACK |   #define NOZZLE_CLEAN_GOBACK | ||||||
| #endif | #endif | ||||||
|  | |||||||
| @ -96,7 +96,7 @@ | |||||||
| //
 | //
 | ||||||
| // Marlin now allow you to have a vendor boot image to be displayed on machine
 | // Marlin now allow you to have a vendor boot image to be displayed on machine
 | ||||||
| // start. When SHOW_CUSTOM_BOOTSCREEN is defined Marlin will first show your
 | // start. When SHOW_CUSTOM_BOOTSCREEN is defined Marlin will first show your
 | ||||||
| // custom boot image and them the default Marlin boot image is shown.
 | // custom boot image and then the default Marlin boot image is shown.
 | ||||||
| //
 | //
 | ||||||
| // We suggest for you to take advantage of this new feature and keep the Marlin
 | // We suggest for you to take advantage of this new feature and keep the Marlin
 | ||||||
| // boot image unmodified. For an example have a look at the bq Hephestos 2
 | // boot image unmodified. For an example have a look at the bq Hephestos 2
 | ||||||
| @ -1090,6 +1090,10 @@ | |||||||
| //                       |________|_________|_________|
 | //                       |________|_________|_________|
 | ||||||
| //                           T1        T2        T3
 | //                           T1        T2        T3
 | ||||||
| //
 | //
 | ||||||
|  | //   P2: This starts a circular pattern with circle with middle in
 | ||||||
|  | //       NOZZLE_CLEAN_CIRCLE_MIDDLE radius of R and stroke count of S.
 | ||||||
|  | //       Before starting the circle nozzle goes to NOZZLE_CLEAN_START_POINT.
 | ||||||
|  | //
 | ||||||
| // Caveats: End point Z should use the same value as Start point Z.
 | // Caveats: End point Z should use the same value as Start point Z.
 | ||||||
| //
 | //
 | ||||||
| // Attention: This is an EXPERIMENTAL feature, in the future the G-code arguments
 | // Attention: This is an EXPERIMENTAL feature, in the future the G-code arguments
 | ||||||
| @ -1100,7 +1104,7 @@ | |||||||
| #if ENABLED(NOZZLE_CLEAN_FEATURE) | #if ENABLED(NOZZLE_CLEAN_FEATURE) | ||||||
|   // Default number of pattern repetitions
 |   // Default number of pattern repetitions
 | ||||||
|   #define NOZZLE_CLEAN_STROKES  12 |   #define NOZZLE_CLEAN_STROKES  12 | ||||||
|    | 
 | ||||||
|   // Default number of triangles
 |   // Default number of triangles
 | ||||||
|   #define NOZZLE_CLEAN_TRIANGLES  3 |   #define NOZZLE_CLEAN_TRIANGLES  3 | ||||||
| 
 | 
 | ||||||
| @ -1108,6 +1112,13 @@ | |||||||
|   #define NOZZLE_CLEAN_START_POINT { 30, 30, (Z_MIN_POS + 1)} |   #define NOZZLE_CLEAN_START_POINT { 30, 30, (Z_MIN_POS + 1)} | ||||||
|   #define NOZZLE_CLEAN_END_POINT   {100, 60, (Z_MIN_POS + 1)} |   #define NOZZLE_CLEAN_END_POINT   {100, 60, (Z_MIN_POS + 1)} | ||||||
| 
 | 
 | ||||||
|  |   // Circular pattern radius
 | ||||||
|  |   #define NOZZLE_CLEAN_CIRCLE_RADIUS 6.5 | ||||||
|  |   // Circular pattern circle fragments number
 | ||||||
|  |   #define NOZZLE_CLEAN_CIRCLE_FN 10 | ||||||
|  |   // Middle point of circle
 | ||||||
|  |   #define NOZZLE_CLEAN_CIRCLE_MIDDLE NOZZLE_CLEAN_START_POINT | ||||||
|  | 
 | ||||||
|   // Moves the nozzle to the initial position
 |   // Moves the nozzle to the initial position
 | ||||||
|   #define NOZZLE_CLEAN_GOBACK |   #define NOZZLE_CLEAN_GOBACK | ||||||
| #endif | #endif | ||||||
|  | |||||||
| @ -100,7 +100,7 @@ | |||||||
| //
 | //
 | ||||||
| // Marlin now allow you to have a vendor boot image to be displayed on machine
 | // Marlin now allow you to have a vendor boot image to be displayed on machine
 | ||||||
| // start. When SHOW_CUSTOM_BOOTSCREEN is defined Marlin will first show your
 | // start. When SHOW_CUSTOM_BOOTSCREEN is defined Marlin will first show your
 | ||||||
| // custom boot image and them the default Marlin boot image is shown.
 | // custom boot image and then the default Marlin boot image is shown.
 | ||||||
| //
 | //
 | ||||||
| // We suggest for you to take advantage of this new feature and keep the Marlin
 | // We suggest for you to take advantage of this new feature and keep the Marlin
 | ||||||
| // boot image unmodified. For an example have a look at the bq Hephestos 2
 | // boot image unmodified. For an example have a look at the bq Hephestos 2
 | ||||||
| @ -1089,6 +1089,10 @@ | |||||||
| //                       |________|_________|_________|
 | //                       |________|_________|_________|
 | ||||||
| //                           T1        T2        T3
 | //                           T1        T2        T3
 | ||||||
| //
 | //
 | ||||||
|  | //   P2: This starts a circular pattern with circle with middle in
 | ||||||
|  | //       NOZZLE_CLEAN_CIRCLE_MIDDLE radius of R and stroke count of S.
 | ||||||
|  | //       Before starting the circle nozzle goes to NOZZLE_CLEAN_START_POINT.
 | ||||||
|  | //
 | ||||||
| // Caveats: End point Z should use the same value as Start point Z.
 | // Caveats: End point Z should use the same value as Start point Z.
 | ||||||
| //
 | //
 | ||||||
| // Attention: This is an EXPERIMENTAL feature, in the future the G-code arguments
 | // Attention: This is an EXPERIMENTAL feature, in the future the G-code arguments
 | ||||||
| @ -1099,7 +1103,7 @@ | |||||||
| #if ENABLED(NOZZLE_CLEAN_FEATURE) | #if ENABLED(NOZZLE_CLEAN_FEATURE) | ||||||
|   // Default number of pattern repetitions
 |   // Default number of pattern repetitions
 | ||||||
|   #define NOZZLE_CLEAN_STROKES  12 |   #define NOZZLE_CLEAN_STROKES  12 | ||||||
|    | 
 | ||||||
|   // Default number of triangles
 |   // Default number of triangles
 | ||||||
|   #define NOZZLE_CLEAN_TRIANGLES  3 |   #define NOZZLE_CLEAN_TRIANGLES  3 | ||||||
| 
 | 
 | ||||||
| @ -1107,6 +1111,13 @@ | |||||||
|   #define NOZZLE_CLEAN_START_POINT { 30, 30, (Z_MIN_POS + 1)} |   #define NOZZLE_CLEAN_START_POINT { 30, 30, (Z_MIN_POS + 1)} | ||||||
|   #define NOZZLE_CLEAN_END_POINT   {100, 60, (Z_MIN_POS + 1)} |   #define NOZZLE_CLEAN_END_POINT   {100, 60, (Z_MIN_POS + 1)} | ||||||
| 
 | 
 | ||||||
|  |   // Circular pattern radius
 | ||||||
|  |   #define NOZZLE_CLEAN_CIRCLE_RADIUS 6.5 | ||||||
|  |   // Circular pattern circle fragments number
 | ||||||
|  |   #define NOZZLE_CLEAN_CIRCLE_FN 10 | ||||||
|  |   // Middle point of circle
 | ||||||
|  |   #define NOZZLE_CLEAN_CIRCLE_MIDDLE NOZZLE_CLEAN_START_POINT | ||||||
|  | 
 | ||||||
|   // Moves the nozzle to the initial position
 |   // Moves the nozzle to the initial position
 | ||||||
|   #define NOZZLE_CLEAN_GOBACK |   #define NOZZLE_CLEAN_GOBACK | ||||||
| #endif | #endif | ||||||
|  | |||||||
| @ -89,7 +89,7 @@ | |||||||
| //
 | //
 | ||||||
| // Marlin now allow you to have a vendor boot image to be displayed on machine
 | // Marlin now allow you to have a vendor boot image to be displayed on machine
 | ||||||
| // start. When SHOW_CUSTOM_BOOTSCREEN is defined Marlin will first show your
 | // start. When SHOW_CUSTOM_BOOTSCREEN is defined Marlin will first show your
 | ||||||
| // custom boot image and them the default Marlin boot image is shown.
 | // custom boot image and then the default Marlin boot image is shown.
 | ||||||
| //
 | //
 | ||||||
| // We suggest for you to take advantage of this new feature and keep the Marlin
 | // We suggest for you to take advantage of this new feature and keep the Marlin
 | ||||||
| // boot image unmodified. For an example have a look at the bq Hephestos 2
 | // boot image unmodified. For an example have a look at the bq Hephestos 2
 | ||||||
| @ -1093,6 +1093,10 @@ | |||||||
| //                       |________|_________|_________|
 | //                       |________|_________|_________|
 | ||||||
| //                           T1        T2        T3
 | //                           T1        T2        T3
 | ||||||
| //
 | //
 | ||||||
|  | //   P2: This starts a circular pattern with circle with middle in
 | ||||||
|  | //       NOZZLE_CLEAN_CIRCLE_MIDDLE radius of R and stroke count of S.
 | ||||||
|  | //       Before starting the circle nozzle goes to NOZZLE_CLEAN_START_POINT.
 | ||||||
|  | //
 | ||||||
| // Caveats: End point Z should use the same value as Start point Z.
 | // Caveats: End point Z should use the same value as Start point Z.
 | ||||||
| //
 | //
 | ||||||
| // Attention: This is an EXPERIMENTAL feature, in the future the G-code arguments
 | // Attention: This is an EXPERIMENTAL feature, in the future the G-code arguments
 | ||||||
| @ -1103,7 +1107,7 @@ | |||||||
| #if ENABLED(NOZZLE_CLEAN_FEATURE) | #if ENABLED(NOZZLE_CLEAN_FEATURE) | ||||||
|   // Default number of pattern repetitions
 |   // Default number of pattern repetitions
 | ||||||
|   #define NOZZLE_CLEAN_STROKES  12 |   #define NOZZLE_CLEAN_STROKES  12 | ||||||
|    | 
 | ||||||
|   // Default number of triangles
 |   // Default number of triangles
 | ||||||
|   #define NOZZLE_CLEAN_TRIANGLES  3 |   #define NOZZLE_CLEAN_TRIANGLES  3 | ||||||
| 
 | 
 | ||||||
| @ -1111,6 +1115,13 @@ | |||||||
|   #define NOZZLE_CLEAN_START_POINT { 30, 30, (Z_MIN_POS + 1)} |   #define NOZZLE_CLEAN_START_POINT { 30, 30, (Z_MIN_POS + 1)} | ||||||
|   #define NOZZLE_CLEAN_END_POINT   {100, 60, (Z_MIN_POS + 1)} |   #define NOZZLE_CLEAN_END_POINT   {100, 60, (Z_MIN_POS + 1)} | ||||||
| 
 | 
 | ||||||
|  |   // Circular pattern radius
 | ||||||
|  |   #define NOZZLE_CLEAN_CIRCLE_RADIUS 6.5 | ||||||
|  |   // Circular pattern circle fragments number
 | ||||||
|  |   #define NOZZLE_CLEAN_CIRCLE_FN 10 | ||||||
|  |   // Middle point of circle
 | ||||||
|  |   #define NOZZLE_CLEAN_CIRCLE_MIDDLE NOZZLE_CLEAN_START_POINT | ||||||
|  | 
 | ||||||
|   // Moves the nozzle to the initial position
 |   // Moves the nozzle to the initial position
 | ||||||
|   #define NOZZLE_CLEAN_GOBACK |   #define NOZZLE_CLEAN_GOBACK | ||||||
| #endif | #endif | ||||||
|  | |||||||
| @ -96,7 +96,7 @@ | |||||||
| //
 | //
 | ||||||
| // Marlin now allow you to have a vendor boot image to be displayed on machine
 | // Marlin now allow you to have a vendor boot image to be displayed on machine
 | ||||||
| // start. When SHOW_CUSTOM_BOOTSCREEN is defined Marlin will first show your
 | // start. When SHOW_CUSTOM_BOOTSCREEN is defined Marlin will first show your
 | ||||||
| // custom boot image and them the default Marlin boot image is shown.
 | // custom boot image and then the default Marlin boot image is shown.
 | ||||||
| //
 | //
 | ||||||
| // We suggest for you to take advantage of this new feature and keep the Marlin
 | // We suggest for you to take advantage of this new feature and keep the Marlin
 | ||||||
| // boot image unmodified. For an example have a look at the bq Hephestos 2
 | // boot image unmodified. For an example have a look at the bq Hephestos 2
 | ||||||
| @ -1003,6 +1003,10 @@ | |||||||
| //                       |________|_________|_________|
 | //                       |________|_________|_________|
 | ||||||
| //                           T1        T2        T3
 | //                           T1        T2        T3
 | ||||||
| //
 | //
 | ||||||
|  | //   P2: This starts a circular pattern with circle with middle in
 | ||||||
|  | //       NOZZLE_CLEAN_CIRCLE_MIDDLE radius of R and stroke count of S.
 | ||||||
|  | //       Before starting the circle nozzle goes to NOZZLE_CLEAN_START_POINT.
 | ||||||
|  | //
 | ||||||
| // Caveats: End point Z should use the same value as Start point Z.
 | // Caveats: End point Z should use the same value as Start point Z.
 | ||||||
| //
 | //
 | ||||||
| // Attention: This is an EXPERIMENTAL feature, in the future the G-code arguments
 | // Attention: This is an EXPERIMENTAL feature, in the future the G-code arguments
 | ||||||
| @ -1013,7 +1017,7 @@ | |||||||
| #if ENABLED(NOZZLE_CLEAN_FEATURE) | #if ENABLED(NOZZLE_CLEAN_FEATURE) | ||||||
|   // Default number of pattern repetitions
 |   // Default number of pattern repetitions
 | ||||||
|   #define NOZZLE_CLEAN_STROKES  12 |   #define NOZZLE_CLEAN_STROKES  12 | ||||||
|    | 
 | ||||||
|   // Default number of triangles
 |   // Default number of triangles
 | ||||||
|   #define NOZZLE_CLEAN_TRIANGLES  3 |   #define NOZZLE_CLEAN_TRIANGLES  3 | ||||||
| 
 | 
 | ||||||
| @ -1021,6 +1025,13 @@ | |||||||
|   #define NOZZLE_CLEAN_START_POINT { 30, 30, (Z_MIN_POS + 1)} |   #define NOZZLE_CLEAN_START_POINT { 30, 30, (Z_MIN_POS + 1)} | ||||||
|   #define NOZZLE_CLEAN_END_POINT   {100, 60, (Z_MIN_POS + 1)} |   #define NOZZLE_CLEAN_END_POINT   {100, 60, (Z_MIN_POS + 1)} | ||||||
| 
 | 
 | ||||||
|  |   // Circular pattern radius
 | ||||||
|  |   #define NOZZLE_CLEAN_CIRCLE_RADIUS 6.5 | ||||||
|  |   // Circular pattern circle fragments number
 | ||||||
|  |   #define NOZZLE_CLEAN_CIRCLE_FN 10 | ||||||
|  |   // Middle point of circle
 | ||||||
|  |   #define NOZZLE_CLEAN_CIRCLE_MIDDLE NOZZLE_CLEAN_START_POINT | ||||||
|  | 
 | ||||||
|   // Moves the nozzle to the initial position
 |   // Moves the nozzle to the initial position
 | ||||||
|   #define NOZZLE_CLEAN_GOBACK |   #define NOZZLE_CLEAN_GOBACK | ||||||
| #endif | #endif | ||||||
|  | |||||||
| @ -96,7 +96,7 @@ | |||||||
| //
 | //
 | ||||||
| // Marlin now allow you to have a vendor boot image to be displayed on machine
 | // Marlin now allow you to have a vendor boot image to be displayed on machine
 | ||||||
| // start. When SHOW_CUSTOM_BOOTSCREEN is defined Marlin will first show your
 | // start. When SHOW_CUSTOM_BOOTSCREEN is defined Marlin will first show your
 | ||||||
| // custom boot image and them the default Marlin boot image is shown.
 | // custom boot image and then the default Marlin boot image is shown.
 | ||||||
| //
 | //
 | ||||||
| // We suggest for you to take advantage of this new feature and keep the Marlin
 | // We suggest for you to take advantage of this new feature and keep the Marlin
 | ||||||
| // boot image unmodified. For an example have a look at the bq Hephestos 2
 | // boot image unmodified. For an example have a look at the bq Hephestos 2
 | ||||||
| @ -996,6 +996,10 @@ | |||||||
| //                       |________|_________|_________|
 | //                       |________|_________|_________|
 | ||||||
| //                           T1        T2        T3
 | //                           T1        T2        T3
 | ||||||
| //
 | //
 | ||||||
|  | //   P2: This starts a circular pattern with circle with middle in
 | ||||||
|  | //       NOZZLE_CLEAN_CIRCLE_MIDDLE radius of R and stroke count of S.
 | ||||||
|  | //       Before starting the circle nozzle goes to NOZZLE_CLEAN_START_POINT.
 | ||||||
|  | //
 | ||||||
| // Caveats: End point Z should use the same value as Start point Z.
 | // Caveats: End point Z should use the same value as Start point Z.
 | ||||||
| //
 | //
 | ||||||
| // Attention: This is an EXPERIMENTAL feature, in the future the G-code arguments
 | // Attention: This is an EXPERIMENTAL feature, in the future the G-code arguments
 | ||||||
| @ -1006,7 +1010,7 @@ | |||||||
| #if ENABLED(NOZZLE_CLEAN_FEATURE) | #if ENABLED(NOZZLE_CLEAN_FEATURE) | ||||||
|   // Default number of pattern repetitions
 |   // Default number of pattern repetitions
 | ||||||
|   #define NOZZLE_CLEAN_STROKES  12 |   #define NOZZLE_CLEAN_STROKES  12 | ||||||
|    | 
 | ||||||
|   // Default number of triangles
 |   // Default number of triangles
 | ||||||
|   #define NOZZLE_CLEAN_TRIANGLES  3 |   #define NOZZLE_CLEAN_TRIANGLES  3 | ||||||
| 
 | 
 | ||||||
| @ -1014,6 +1018,13 @@ | |||||||
|   #define NOZZLE_CLEAN_START_POINT { 30, 30, (Z_MIN_POS + 1)} |   #define NOZZLE_CLEAN_START_POINT { 30, 30, (Z_MIN_POS + 1)} | ||||||
|   #define NOZZLE_CLEAN_END_POINT   {100, 60, (Z_MIN_POS + 1)} |   #define NOZZLE_CLEAN_END_POINT   {100, 60, (Z_MIN_POS + 1)} | ||||||
| 
 | 
 | ||||||
|  |   // Circular pattern radius
 | ||||||
|  |   #define NOZZLE_CLEAN_CIRCLE_RADIUS 6.5 | ||||||
|  |   // Circular pattern circle fragments number
 | ||||||
|  |   #define NOZZLE_CLEAN_CIRCLE_FN 10 | ||||||
|  |   // Middle point of circle
 | ||||||
|  |   #define NOZZLE_CLEAN_CIRCLE_MIDDLE NOZZLE_CLEAN_START_POINT | ||||||
|  | 
 | ||||||
|   // Moves the nozzle to the initial position
 |   // Moves the nozzle to the initial position
 | ||||||
|   #define NOZZLE_CLEAN_GOBACK |   #define NOZZLE_CLEAN_GOBACK | ||||||
| #endif | #endif | ||||||
|  | |||||||
							
								
								
									
										236
									
								
								Marlin/nozzle.cpp
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										236
									
								
								Marlin/nozzle.cpp
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,236 @@ | |||||||
|  | #include "nozzle.h" | ||||||
|  | 
 | ||||||
|  | #include "Marlin.h" | ||||||
|  | #include "point_t.h" | ||||||
|  | 
 | ||||||
|  | /**
 | ||||||
|  |   * @brief Stroke clean pattern | ||||||
|  |   * @details Wipes the nozzle back and forth in a linear movement | ||||||
|  |   * | ||||||
|  |   * @param start point_t defining the starting point | ||||||
|  |   * @param end point_t defining the ending point | ||||||
|  |   * @param strokes number of strokes to execute | ||||||
|  |   */ | ||||||
|  | void Nozzle::stroke( | ||||||
|  |   __attribute__((unused)) point_t const &start, | ||||||
|  |   __attribute__((unused)) point_t const &end, | ||||||
|  |   __attribute__((unused)) uint8_t const &strokes | ||||||
|  | ) { | ||||||
|  |   #if ENABLED(NOZZLE_CLEAN_FEATURE) | ||||||
|  | 
 | ||||||
|  |     #if ENABLED(NOZZLE_CLEAN_GOBACK) | ||||||
|  |       // Store the current coords
 | ||||||
|  |       point_t const initial = { | ||||||
|  |         current_position[X_AXIS], | ||||||
|  |         current_position[Y_AXIS], | ||||||
|  |         current_position[Z_AXIS], | ||||||
|  |         current_position[E_AXIS] | ||||||
|  |       }; | ||||||
|  |     #endif // NOZZLE_CLEAN_GOBACK
 | ||||||
|  | 
 | ||||||
|  |     // Move to the starting point
 | ||||||
|  |     do_blocking_move_to_xy(start.x, start.y); | ||||||
|  |     do_blocking_move_to_z(start.z); | ||||||
|  | 
 | ||||||
|  |     // Start the stroke pattern
 | ||||||
|  |     for (uint8_t i = 0; i < (strokes >>1); i++) { | ||||||
|  |       do_blocking_move_to_xy(end.x, end.y); | ||||||
|  |       do_blocking_move_to_xy(start.x, start.y); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     #if ENABLED(NOZZLE_CLEAN_GOBACK) | ||||||
|  |       // Move the nozzle to the initial point
 | ||||||
|  |       do_blocking_move_to(initial.x, initial.y, initial.z); | ||||||
|  |     #endif // NOZZLE_CLEAN_GOBACK
 | ||||||
|  | 
 | ||||||
|  |   #endif // NOZZLE_CLEAN_FEATURE
 | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | /**
 | ||||||
|  |   * @brief Zig-zag clean pattern | ||||||
|  |   * @details Apply a zig-zag cleanning pattern | ||||||
|  |   * | ||||||
|  |   * @param start point_t defining the starting point | ||||||
|  |   * @param end point_t defining the ending point | ||||||
|  |   * @param strokes number of strokes to execute | ||||||
|  |   * @param objects number of objects to create | ||||||
|  |   */ | ||||||
|  | void Nozzle::zigzag( | ||||||
|  |   __attribute__((unused)) point_t const &start, | ||||||
|  |   __attribute__((unused)) point_t const &end, | ||||||
|  |   __attribute__((unused)) uint8_t const &strokes, | ||||||
|  |   __attribute__((unused)) uint8_t const &objects | ||||||
|  | ) { | ||||||
|  |   #if ENABLED(NOZZLE_CLEAN_FEATURE) | ||||||
|  |     const float A = nozzle_clean_horizontal ? nozzle_clean_height : nozzle_clean_length, // [twice the] Amplitude
 | ||||||
|  |                 P = (nozzle_clean_horizontal ? nozzle_clean_length : nozzle_clean_height) / (objects << 1); // Period
 | ||||||
|  | 
 | ||||||
|  |     // Don't allow impossible triangles
 | ||||||
|  |     if (A <= 0.0f || P <= 0.0f ) return; | ||||||
|  | 
 | ||||||
|  |     #if ENABLED(NOZZLE_CLEAN_GOBACK) | ||||||
|  |       // Store the current coords
 | ||||||
|  |       point_t const initial = { | ||||||
|  |         current_position[X_AXIS], | ||||||
|  |         current_position[Y_AXIS], | ||||||
|  |         current_position[Z_AXIS], | ||||||
|  |         current_position[E_AXIS] | ||||||
|  |       }; | ||||||
|  |     #endif // NOZZLE_CLEAN_GOBACK
 | ||||||
|  | 
 | ||||||
|  |     for (uint8_t j = 0; j < strokes; j++) { | ||||||
|  |       for (uint8_t i = 0; i < (objects << 1); i++) { | ||||||
|  |         float const x = start.x + ( nozzle_clean_horizontal ? i * P : (A/P) * (P - fabs(fmod((i*P), (2*P)) - P)) ); | ||||||
|  |         float const y = start.y + (!nozzle_clean_horizontal ? i * P : (A/P) * (P - fabs(fmod((i*P), (2*P)) - P)) ); | ||||||
|  | 
 | ||||||
|  |         do_blocking_move_to_xy(x, y); | ||||||
|  |         if (i == 0) do_blocking_move_to_z(start.z); | ||||||
|  |       } | ||||||
|  | 
 | ||||||
|  |       for (int i = (objects << 1); i > -1; i--) { | ||||||
|  |         float const x = start.x + ( nozzle_clean_horizontal ? i * P : (A/P) * (P - fabs(fmod((i*P), (2*P)) - P)) ); | ||||||
|  |         float const y = start.y + (!nozzle_clean_horizontal ? i * P : (A/P) * (P - fabs(fmod((i*P), (2*P)) - P)) ); | ||||||
|  | 
 | ||||||
|  |         do_blocking_move_to_xy(x, y); | ||||||
|  |       } | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     #if ENABLED(NOZZLE_CLEAN_GOBACK) | ||||||
|  |       // Move the nozzle to the initial point
 | ||||||
|  |       do_blocking_move_to_z(initial.z); | ||||||
|  |       do_blocking_move_to_xy(initial.x, initial.y); | ||||||
|  |     #endif // NOZZLE_CLEAN_GOBACK
 | ||||||
|  | 
 | ||||||
|  |   #endif // NOZZLE_CLEAN_FEATURE
 | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | /**
 | ||||||
|  |   * @brief Circular clean pattern | ||||||
|  |   * @details Apply a circular cleaning pattern | ||||||
|  |   * | ||||||
|  |   * @param start point_t defining the middle of circle | ||||||
|  |   * @param strokes number of strokes to execute | ||||||
|  |   * @param radius radius of circle | ||||||
|  |   */ | ||||||
|  | void Nozzle::circle( | ||||||
|  |   __attribute__((unused)) point_t const &start, | ||||||
|  |   __attribute__((unused)) point_t const &middle, | ||||||
|  |   __attribute__((unused)) uint8_t const &strokes, | ||||||
|  |   __attribute__((unused)) float const &radius | ||||||
|  | ) { | ||||||
|  |   #if ENABLED(NOZZLE_CLEAN_FEATURE) | ||||||
|  |     if (strokes == 0) return; | ||||||
|  | 
 | ||||||
|  |     #if ENABLED(NOZZLE_CLEAN_GOBACK) | ||||||
|  |       // Store the current coords
 | ||||||
|  |       point_t const initial = { | ||||||
|  |         current_position[X_AXIS], | ||||||
|  |         current_position[Y_AXIS], | ||||||
|  |         current_position[Z_AXIS], | ||||||
|  |         current_position[E_AXIS] | ||||||
|  |       }; | ||||||
|  |     #endif // NOZZLE_CLEAN_GOBACK
 | ||||||
|  | 
 | ||||||
|  |     if (start.z <= current_position[Z_AXIS]) { | ||||||
|  |       // Order of movement is pretty darn important here
 | ||||||
|  |       do_blocking_move_to_xy(start.x, start.y); | ||||||
|  |       do_blocking_move_to_z(start.z); | ||||||
|  |     } else { | ||||||
|  |       do_blocking_move_to_z(start.z); | ||||||
|  |       do_blocking_move_to_xy(start.x, start.y); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     float x, y; | ||||||
|  |     for (uint8_t s = 0; s < strokes; s++) { | ||||||
|  |       for (uint8_t i = 0; i < NOZZLE_CLEAN_CIRCLE_FN; i++) { | ||||||
|  |         x = middle.x + sin((M_2_PI / NOZZLE_CLEAN_CIRCLE_FN) * i) * radius; | ||||||
|  |         y = middle.y + cos((M_2_PI / NOZZLE_CLEAN_CIRCLE_FN) * i) * radius; | ||||||
|  | 
 | ||||||
|  |         do_blocking_move_to_xy(x, y); | ||||||
|  |       } | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     // Let's be safe
 | ||||||
|  |     do_blocking_move_to_xy(start.x, start.y); | ||||||
|  | 
 | ||||||
|  |     #if ENABLED(NOZZLE_CLEAN_GOBACK) | ||||||
|  |       // Move the nozzle to the initial point
 | ||||||
|  |       if (start.z <= initial.z) { | ||||||
|  |         // As above order is important
 | ||||||
|  |         do_blocking_move_to_z(initial.z); | ||||||
|  |         do_blocking_move_to_xy(initial.x, initial.y); | ||||||
|  |       } else { | ||||||
|  |         do_blocking_move_to_xy(initial.x, initial.y); | ||||||
|  |         do_blocking_move_to_z(initial.z); | ||||||
|  |       } | ||||||
|  |     #endif // NOZZLE_CLEAN_GOBACK
 | ||||||
|  | 
 | ||||||
|  |   #endif // NOZZLE_CLEAN_FEATURE
 | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | /**
 | ||||||
|  |   * @brief Clean the nozzle | ||||||
|  |   * @details Starts the selected clean procedure pattern | ||||||
|  |   * | ||||||
|  |   * @param pattern one of the available patterns | ||||||
|  |   * @param argument depends on the cleaning pattern | ||||||
|  |   */ | ||||||
|  | void Nozzle::clean( | ||||||
|  |   __attribute__((unused)) uint8_t const &pattern, | ||||||
|  |   __attribute__((unused)) uint8_t const &strokes, | ||||||
|  |   __attribute__((unused)) float const &radius, | ||||||
|  |   __attribute__((unused)) uint8_t const &objects | ||||||
|  | ) { | ||||||
|  |   #if ENABLED(NOZZLE_CLEAN_FEATURE) | ||||||
|  |     #if ENABLED(DELTA) | ||||||
|  |       if (current_position[Z_AXIS] > delta_clip_start_height) | ||||||
|  |         do_blocking_move_to_z(delta_clip_start_height); | ||||||
|  |     #endif | ||||||
|  |     switch (pattern) { | ||||||
|  |       case 1: | ||||||
|  |         Nozzle::zigzag( | ||||||
|  |           NOZZLE_CLEAN_START_POINT, | ||||||
|  |           NOZZLE_CLEAN_END_POINT, strokes, objects); | ||||||
|  |         break; | ||||||
|  | 
 | ||||||
|  |       case 2: | ||||||
|  |         Nozzle::circle( | ||||||
|  |           NOZZLE_CLEAN_START_POINT, | ||||||
|  |           NOZZLE_CLEAN_CIRCLE_MIDDLE, strokes, radius); | ||||||
|  |         break; | ||||||
|  | 
 | ||||||
|  |       default: | ||||||
|  |         Nozzle::stroke( | ||||||
|  |           NOZZLE_CLEAN_START_POINT, | ||||||
|  |           NOZZLE_CLEAN_END_POINT, strokes); | ||||||
|  |     } | ||||||
|  |   #endif // NOZZLE_CLEAN_FEATURE
 | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | void Nozzle::park( | ||||||
|  |   __attribute__((unused)) uint8_t const &z_action | ||||||
|  | ) { | ||||||
|  |   #if ENABLED(NOZZLE_PARK_FEATURE) | ||||||
|  |     float const z = current_position[Z_AXIS]; | ||||||
|  |     point_t const park = NOZZLE_PARK_POINT; | ||||||
|  | 
 | ||||||
|  |     switch(z_action) { | ||||||
|  |       case 1: // force Z-park height
 | ||||||
|  |         do_blocking_move_to_z(park.z); | ||||||
|  |         break; | ||||||
|  | 
 | ||||||
|  |       case 2: // Raise by Z-park height
 | ||||||
|  |         do_blocking_move_to_z( | ||||||
|  |           (z + park.z > Z_MAX_POS) ? Z_MAX_POS : z + park.z); | ||||||
|  |         break; | ||||||
|  | 
 | ||||||
|  |       default: // Raise to Z-park height if lower
 | ||||||
|  |         if (current_position[Z_AXIS] < park.z) | ||||||
|  |           do_blocking_move_to_z(park.z); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     do_blocking_move_to_xy(park.x, park.y); | ||||||
|  | 
 | ||||||
|  |   #endif // NOZZLE_PARK_FEATURE
 | ||||||
|  | } | ||||||
							
								
								
									
										137
									
								
								Marlin/nozzle.h
									
									
									
									
									
								
							
							
						
						
									
										137
									
								
								Marlin/nozzle.h
									
									
									
									
									
								
							| @ -53,40 +53,11 @@ class Nozzle { | |||||||
|       __attribute__((unused)) point_t const &start, |       __attribute__((unused)) point_t const &start, | ||||||
|       __attribute__((unused)) point_t const &end, |       __attribute__((unused)) point_t const &end, | ||||||
|       __attribute__((unused)) uint8_t const &strokes |       __attribute__((unused)) uint8_t const &strokes | ||||||
|     ) __attribute__((optimize ("Os"))) { |     ) __attribute__((optimize ("Os"))); | ||||||
|       #if ENABLED(NOZZLE_CLEAN_FEATURE) |  | ||||||
| 
 |  | ||||||
|         #if ENABLED(NOZZLE_CLEAN_GOBACK) |  | ||||||
|           // Store the current coords
 |  | ||||||
|           point_t const initial = { |  | ||||||
|             current_position[X_AXIS], |  | ||||||
|             current_position[Y_AXIS], |  | ||||||
|             current_position[Z_AXIS], |  | ||||||
|             current_position[E_AXIS] |  | ||||||
|           }; |  | ||||||
|         #endif // NOZZLE_CLEAN_GOBACK
 |  | ||||||
| 
 |  | ||||||
|         // Move to the starting point
 |  | ||||||
|         do_blocking_move_to_xy(start.x, start.y); |  | ||||||
|         do_blocking_move_to_z(start.z); |  | ||||||
| 
 |  | ||||||
|         // Start the stroke pattern
 |  | ||||||
|         for (uint8_t i = 0; i < (strokes >>1); i++) { |  | ||||||
|           do_blocking_move_to_xy(end.x, end.y); |  | ||||||
|           do_blocking_move_to_xy(start.x, start.y); |  | ||||||
|         } |  | ||||||
| 
 |  | ||||||
|         #if ENABLED(NOZZLE_CLEAN_GOBACK) |  | ||||||
|           // Move the nozzle to the initial point
 |  | ||||||
|           do_blocking_move_to(initial.x, initial.y, initial.z); |  | ||||||
|         #endif // NOZZLE_CLEAN_GOBACK
 |  | ||||||
| 
 |  | ||||||
|       #endif // NOZZLE_CLEAN_FEATURE
 |  | ||||||
|     } |  | ||||||
| 
 | 
 | ||||||
|     /**
 |     /**
 | ||||||
|      * @brief Zig-zag clean pattern |      * @brief Zig-zag clean pattern | ||||||
|      * @details Apply a zig-zag cleanning pattern |      * @details Apply a zig-zag cleaning pattern | ||||||
|      * |      * | ||||||
|      * @param start point_t defining the starting point |      * @param start point_t defining the starting point | ||||||
|      * @param end point_t defining the ending point |      * @param end point_t defining the ending point | ||||||
| @ -98,49 +69,22 @@ class Nozzle { | |||||||
|       __attribute__((unused)) point_t const &end, |       __attribute__((unused)) point_t const &end, | ||||||
|       __attribute__((unused)) uint8_t const &strokes, |       __attribute__((unused)) uint8_t const &strokes, | ||||||
|       __attribute__((unused)) uint8_t const &objects |       __attribute__((unused)) uint8_t const &objects | ||||||
|     ) __attribute__((optimize ("Os"))) { |     ) __attribute__((optimize ("Os"))); | ||||||
|       #if ENABLED(NOZZLE_CLEAN_FEATURE) |  | ||||||
|         float A = nozzle_clean_horizontal ? nozzle_clean_height : nozzle_clean_length; // [twice the] Amplitude
 |  | ||||||
|         float P = ( nozzle_clean_horizontal ? nozzle_clean_length : nozzle_clean_height ) / (objects << 1); // Period
 |  | ||||||
| 
 | 
 | ||||||
|         // Don't allow impossible triangles
 |     /**
 | ||||||
|         if (A <= 0.0f || P <= 0.0f ) return; |      * @brief Circular clean pattern | ||||||
| 
 |      * @details Apply a circular cleaning pattern | ||||||
|         #if ENABLED(NOZZLE_CLEAN_GOBACK) |      * | ||||||
|           // Store the current coords
 |      * @param start point_t defining the middle of circle | ||||||
|           point_t const initial = { |      * @param strokes number of strokes to execute | ||||||
|             current_position[X_AXIS], |      * @param radius radius of circle | ||||||
|             current_position[Y_AXIS], |      */ | ||||||
|             current_position[Z_AXIS], |     static void circle( | ||||||
|             current_position[E_AXIS] |       __attribute__((unused)) point_t const &start, | ||||||
|           }; |       __attribute__((unused)) point_t const &middle, | ||||||
|         #endif // NOZZLE_CLEAN_GOBACK
 |       __attribute__((unused)) uint8_t const &strokes, | ||||||
| 
 |       __attribute__((unused)) float const &radius | ||||||
|         for (uint8_t j = 0; j < strokes; j++) { |     ) __attribute__((optimize ("Os"))); | ||||||
|           for (uint8_t i = 0; i < (objects << 1); i++) { |  | ||||||
|             float const x = start.x + ( nozzle_clean_horizontal ? i * P : (A/P) * (P - fabs(fmod((i*P), (2*P)) - P)) ); |  | ||||||
|             float const y = start.y + (!nozzle_clean_horizontal ? i * P : (A/P) * (P - fabs(fmod((i*P), (2*P)) - P)) ); |  | ||||||
| 
 |  | ||||||
|             do_blocking_move_to_xy(x, y); |  | ||||||
|             if (i == 0) do_blocking_move_to_z(start.z); |  | ||||||
|           } |  | ||||||
| 
 |  | ||||||
|           for (int i = (objects << 1); i > -1; i--) { |  | ||||||
|             float const x = start.x + ( nozzle_clean_horizontal ? i * P : (A/P) * (P - fabs(fmod((i*P), (2*P)) - P)) ); |  | ||||||
|             float const y = start.y + (!nozzle_clean_horizontal ? i * P : (A/P) * (P - fabs(fmod((i*P), (2*P)) - P)) ); |  | ||||||
| 
 |  | ||||||
|             do_blocking_move_to_xy(x, y); |  | ||||||
|           } |  | ||||||
|         } |  | ||||||
| 
 |  | ||||||
|         #if ENABLED(NOZZLE_CLEAN_GOBACK) |  | ||||||
|           // Move the nozzle to the initial point
 |  | ||||||
|           do_blocking_move_to_z(initial.z); |  | ||||||
|           do_blocking_move_to_xy(initial.x, initial.y); |  | ||||||
|         #endif // NOZZLE_CLEAN_GOBACK
 |  | ||||||
| 
 |  | ||||||
|       #endif // NOZZLE_CLEAN_FEATURE
 |  | ||||||
|     } |  | ||||||
| 
 | 
 | ||||||
|   public: |   public: | ||||||
|     /**
 |     /**
 | ||||||
| @ -153,54 +97,13 @@ class Nozzle { | |||||||
|     static void clean( |     static void clean( | ||||||
|       __attribute__((unused)) uint8_t const &pattern, |       __attribute__((unused)) uint8_t const &pattern, | ||||||
|       __attribute__((unused)) uint8_t const &strokes, |       __attribute__((unused)) uint8_t const &strokes, | ||||||
|  |       __attribute__((unused)) float const &radius, | ||||||
|       __attribute__((unused)) uint8_t const &objects = 0 |       __attribute__((unused)) uint8_t const &objects = 0 | ||||||
|     ) __attribute__((optimize ("Os"))) { |     ) __attribute__((optimize ("Os"))); | ||||||
|       #if ENABLED(NOZZLE_CLEAN_FEATURE) |  | ||||||
|         #if ENABLED(DELTA) |  | ||||||
|           if (current_position[Z_AXIS] > delta_clip_start_height) |  | ||||||
|             do_blocking_move_to_z(delta_clip_start_height); |  | ||||||
|         #endif |  | ||||||
|         switch (pattern) { |  | ||||||
|           case 1: |  | ||||||
|             Nozzle::zigzag( |  | ||||||
|               NOZZLE_CLEAN_START_POINT, |  | ||||||
|               NOZZLE_CLEAN_END_POINT, strokes, objects); |  | ||||||
|             break; |  | ||||||
| 
 |  | ||||||
|           default: |  | ||||||
|             Nozzle::stroke( |  | ||||||
|               NOZZLE_CLEAN_START_POINT, |  | ||||||
|               NOZZLE_CLEAN_END_POINT, strokes); |  | ||||||
|         } |  | ||||||
|       #endif // NOZZLE_CLEAN_FEATURE
 |  | ||||||
|     } |  | ||||||
| 
 | 
 | ||||||
|     static void park( |     static void park( | ||||||
|       __attribute__((unused)) uint8_t const &z_action |       __attribute__((unused)) uint8_t const &z_action | ||||||
|     ) __attribute__((optimize ("Os"))) { |     ) __attribute__((optimize ("Os"))); | ||||||
|       #if ENABLED(NOZZLE_PARK_FEATURE) |  | ||||||
|         float const z = current_position[Z_AXIS]; |  | ||||||
|         point_t const park = NOZZLE_PARK_POINT; |  | ||||||
| 
 |  | ||||||
|         switch(z_action) { |  | ||||||
|           case 1: // force Z-park height
 |  | ||||||
|             do_blocking_move_to_z(park.z); |  | ||||||
|             break; |  | ||||||
| 
 |  | ||||||
|           case 2: // Raise by Z-park height
 |  | ||||||
|             do_blocking_move_to_z( |  | ||||||
|               (z + park.z > Z_MAX_POS) ? Z_MAX_POS : z + park.z); |  | ||||||
|             break; |  | ||||||
| 
 |  | ||||||
|           default: // Raise to Z-park height if lower
 |  | ||||||
|             if (current_position[Z_AXIS] < park.z) |  | ||||||
|               do_blocking_move_to_z(park.z); |  | ||||||
|         } |  | ||||||
| 
 |  | ||||||
|         do_blocking_move_to_xy(park.x, park.y); |  | ||||||
| 
 |  | ||||||
|       #endif // NOZZLE_PARK_FEATURE
 |  | ||||||
|     } |  | ||||||
| }; | }; | ||||||
| 
 | 
 | ||||||
| #endif | #endif | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user