Merge pull request #5973 from thinkyhead/rc_circle_pattern

Add circle pattern to nozzle clean
2.0.x
Scott Lahteine 8 years ago committed by GitHub
commit 33f8a8a344

@ -96,7 +96,7 @@
//
// 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
// 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
// boot image unmodified. For an example have a look at the bq Hephestos 2
@ -1000,6 +1000,9 @@
// |________|_________|_________|
// 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.
//
@ -1019,6 +1022,13 @@
#define NOZZLE_CLEAN_START_POINT { 30, 30, (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
#define NOZZLE_CLEAN_GOBACK
#endif

@ -3164,8 +3164,9 @@ inline void gcode_G4() {
const uint8_t pattern = code_seen('P') ? code_value_ushort() : 0,
strokes = code_seen('S') ? code_value_ushort() : NOZZLE_CLEAN_STROKES,
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

@ -96,7 +96,7 @@
//
// 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
// 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
// boot image unmodified. For an example have a look at the bq Hephestos 2
@ -1000,6 +1000,10 @@
// |________|_________|_________|
// 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.
//
// Attention: This is an EXPERIMENTAL feature, in the future the G-code arguments
@ -1018,6 +1022,13 @@
#define NOZZLE_CLEAN_START_POINT { 30, 30, (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
#define NOZZLE_CLEAN_GOBACK
#endif

@ -96,7 +96,7 @@
//
// 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
// 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
// boot image unmodified. For an example have a look at the bq Hephestos 2
@ -983,6 +983,10 @@
// |________|_________|_________|
// 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.
//
// Attention: This is an EXPERIMENTAL feature, in the future the G-code arguments
@ -1001,6 +1005,13 @@
#define NOZZLE_CLEAN_START_POINT { 30, 30, (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
#define NOZZLE_CLEAN_GOBACK
#endif

@ -96,7 +96,7 @@
//
// 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
// 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
// boot image unmodified. For an example have a look at the bq Hephestos 2
@ -983,6 +983,10 @@
// |________|_________|_________|
// 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.
//
// Attention: This is an EXPERIMENTAL feature, in the future the G-code arguments
@ -1001,6 +1005,13 @@
#define NOZZLE_CLEAN_START_POINT { 30, 30, (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
#define NOZZLE_CLEAN_GOBACK
#endif

@ -96,7 +96,7 @@
//
// 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
// 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
// boot image unmodified. For an example have a look at the bq Hephestos 2
@ -992,6 +992,10 @@
// |________|_________|_________|
// 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.
//
// Attention: This is an EXPERIMENTAL feature, in the future the G-code arguments
@ -1010,6 +1014,13 @@
#define NOZZLE_CLEAN_START_POINT { 30, 30, (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
#define NOZZLE_CLEAN_GOBACK
#endif

@ -96,7 +96,7 @@
//
// 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
// 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
// boot image unmodified. For an example have a look at the bq Hephestos 2
@ -994,6 +994,10 @@
// |________|_________|_________|
// 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.
//
// Attention: This is an EXPERIMENTAL feature, in the future the G-code arguments
@ -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_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
//#define NOZZLE_CLEAN_GOBACK
#endif

@ -112,7 +112,7 @@
//
// 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
// 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
// boot image unmodified. For an example have a look at the bq Hephestos 2
@ -1029,6 +1029,10 @@
// |________|_________|_________|
// 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.
//
// Attention: This is an EXPERIMENTAL feature, in the future the G-code arguments
@ -1047,6 +1051,13 @@
#define NOZZLE_CLEAN_START_POINT { 30, 30, (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
#define NOZZLE_CLEAN_GOBACK
#endif

@ -96,7 +96,7 @@
//
// 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
// 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
// boot image unmodified. For an example have a look at the bq Hephestos 2
@ -1000,6 +1000,10 @@
// |________|_________|_________|
// 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.
//
// Attention: This is an EXPERIMENTAL feature, in the future the G-code arguments
@ -1018,6 +1022,13 @@
#define NOZZLE_CLEAN_START_POINT { 30, 30, (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
#define NOZZLE_CLEAN_GOBACK
#endif

@ -96,7 +96,7 @@
//
// 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
// 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
// boot image unmodified. For an example have a look at the bq Hephestos 2
@ -1000,6 +1000,10 @@
// |________|_________|_________|
// 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.
//
// Attention: This is an EXPERIMENTAL feature, in the future the G-code arguments
@ -1018,6 +1022,13 @@
#define NOZZLE_CLEAN_START_POINT { 30, 30, (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
#define NOZZLE_CLEAN_GOBACK
#endif

@ -96,7 +96,7 @@
//
// 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
// 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
// boot image unmodified. For an example have a look at the bq Hephestos 2
@ -1000,6 +1000,10 @@
// |________|_________|_________|
// 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.
//
// Attention: This is an EXPERIMENTAL feature, in the future the G-code arguments
@ -1018,6 +1022,13 @@
#define NOZZLE_CLEAN_START_POINT { 30, 30, (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
#define NOZZLE_CLEAN_GOBACK
#endif

@ -96,7 +96,7 @@
//
// 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
// 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
// boot image unmodified. For an example have a look at the bq Hephestos 2
@ -999,6 +999,10 @@
// |________|_________|_________|
// 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.
//
// Attention: This is an EXPERIMENTAL feature, in the future the G-code arguments
@ -1017,6 +1021,13 @@
#define NOZZLE_CLEAN_START_POINT { 30, 30, (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
#define NOZZLE_CLEAN_GOBACK
#endif

@ -128,7 +128,7 @@
//
// 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
// 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
// boot image unmodified. For an example have a look at the bq Hephestos 2
@ -1015,6 +1015,10 @@
// |________|_________|_________|
// 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.
//
// Attention: This is an EXPERIMENTAL feature, in the future the G-code arguments
@ -1033,6 +1037,13 @@
#define NOZZLE_CLEAN_START_POINT { 30, 30, (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
#define NOZZLE_CLEAN_GOBACK
#endif

@ -96,7 +96,7 @@
//
// 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
// 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
// boot image unmodified. For an example have a look at the bq Hephestos 2
@ -1021,6 +1021,10 @@
// |________|_________|_________|
// 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.
//
// Attention: This is an EXPERIMENTAL feature, in the future the G-code arguments
@ -1039,6 +1043,13 @@
#define NOZZLE_CLEAN_START_POINT { 30, 30, (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
#define NOZZLE_CLEAN_GOBACK
#endif

@ -96,7 +96,7 @@
//
// 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
// 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
// boot image unmodified. For an example have a look at the bq Hephestos 2
@ -992,6 +992,10 @@
// |________|_________|_________|
// 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.
//
// Attention: This is an EXPERIMENTAL feature, in the future the G-code arguments
@ -1010,6 +1014,13 @@
#define NOZZLE_CLEAN_START_POINT { 30, 30, (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
#define NOZZLE_CLEAN_GOBACK
#endif

@ -96,7 +96,7 @@
//
// 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
// 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
// boot image unmodified. For an example have a look at the bq Hephestos 2
@ -1000,6 +1000,10 @@
// |________|_________|_________|
// 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.
//
// Attention: This is an EXPERIMENTAL feature, in the future the G-code arguments
@ -1018,6 +1022,13 @@
#define NOZZLE_CLEAN_START_POINT { 30, 30, (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
#define NOZZLE_CLEAN_GOBACK
#endif

@ -1,53 +1,53 @@
/**
Marlin 3D Printer Firmware
Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
Based on Sprinter and grbl.
Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
* Marlin 3D Printer Firmware
* Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
/**
Configuration.h
Basic settings such as:
- Type of electronics
- Type of temperature sensor
- Printer geometry
- Endstop configuration
- LCD controller
- Extra features
Advanced settings can be found in Configuration_adv.h
* Configuration.h
*
* Basic settings such as:
*
* - Type of electronics
* - Type of temperature sensor
* - Printer geometry
* - Endstop configuration
* - LCD controller
* - Extra features
*
* Advanced settings can be found in Configuration_adv.h
*
*/
#ifndef CONFIGURATION_H
#define CONFIGURATION_H
/**
*
* ***********************************
* ** ATTENTION TO ALL DEVELOPERS **
* ***********************************
You must increment this version number for every significant change such as,
but not limited to: ADD, DELETE RENAME OR REPURPOSE any directive/option.
Note: Update also Version.h !
*
* You must increment this version number for every significant change such as,
* but not limited to: ADD, DELETE RENAME OR REPURPOSE any directive/option.
*
* Note: Update also Version.h !
*/
#define CONFIGURATION_H_VERSION 010100
@ -56,15 +56,15 @@
//===========================================================================
/**
Here are some standard links for getting your machine calibrated:
http://reprap.org/wiki/Calibration
http://youtu.be/wAL9d7FgInk
http://calculator.josefprusa.cz
http://reprap.org/wiki/Triffid_Hunter%27s_Calibration_Guide
http://www.thingiverse.com/thing:5573
https://sites.google.com/site/repraplogphase/calibration-of-your-reprap
http://www.thingiverse.com/thing:298812
* Here are some standard links for getting your machine calibrated:
*
* http://reprap.org/wiki/Calibration
* http://youtu.be/wAL9d7FgInk
* http://calculator.josefprusa.cz
* http://reprap.org/wiki/Triffid_Hunter%27s_Calibration_Guide
* http://www.thingiverse.com/thing:5573
* https://sites.google.com/site/repraplogphase/calibration-of-your-reprap
* http://www.thingiverse.com/thing:298812
*/
//===========================================================================
@ -106,21 +106,21 @@
// @section machine
/**
Select which serial port on the board will be used for communication with the host.
This allows the connection of wireless adapters (for instance) to non-default port pins.
Serial port 0 is always used by the Arduino bootloader regardless of this setting.
:[0, 1, 2, 3, 4, 5, 6, 7]
* Select which serial port on the board will be used for communication with the host.
* This allows the connection of wireless adapters (for instance) to non-default port pins.
* Serial port 0 is always used by the Arduino bootloader regardless of this setting.
*
* :[0, 1, 2, 3, 4, 5, 6, 7]
*/
#define SERIAL_PORT 0
/**
This setting determines the communication speed of the printer.
250000 works in most cases, but you might try a lower speed if
you commonly experience drop-outs during host printing.
:[2400, 9600, 19200, 38400, 57600, 115200, 250000]
* This setting determines the communication speed of the printer.
*
* 250000 works in most cases, but you might try a lower speed if
* you commonly experience drop-outs during host printing.
*
* :[2400, 9600, 19200, 38400, 57600, 115200, 250000]
*/
#define BAUDRATE 250000
@ -161,12 +161,12 @@
#endif
/**
"Mixing Extruder"
- Adds a new code, M165, to set the current mix factors.
- Extends the stepping routines to move multiple steppers in proportion to the mix.
- Optional support for Repetier Host M163, M164, and virtual extruder.
- This implementation supports only a single extruder.
- Enable DIRECT_MIXING_IN_G1 for Pia Taubert's reference implementation
* "Mixing Extruder"
* - Adds a new code, M165, to set the current mix factors.
* - Extends the stepping routines to move multiple steppers in proportion to the mix.
* - Optional support for Repetier Host M163, M164, and virtual extruder.
* - This implementation supports only a single extruder.
* - Enable DIRECT_MIXING_IN_G1 for Pia Taubert's reference implementation
*/
//#define MIXING_EXTRUDER
#if ENABLED(MIXING_EXTRUDER)
@ -182,13 +182,13 @@
//#define HOTEND_OFFSET_Y {0.0, 5.00} // (in mm) for each extruder, offset of the hotend on the Y axis
/**
Select your power supply here. Use 0 if you haven't connected the PS_ON_PIN
0 = No Power Switch
1 = ATX
2 = X-Box 360 203Watts (the blue wire connected to PS_ON and the red wire to VCC)
:{ 0:'No power switch', 1:'ATX', 2:'X-Box 360' }
* Select your power supply here. Use 0 if you haven't connected the PS_ON_PIN
*
* 0 = No Power Switch
* 1 = ATX
* 2 = X-Box 360 203Watts (the blue wire connected to PS_ON and the red wire to VCC)
*
* :{ 0:'No power switch', 1:'ATX', 2:'X-Box 360' }
*/
#define POWER_SUPPLY 0
@ -205,49 +205,49 @@
//===========================================================================
/**
--NORMAL IS 4.7kohm PULLUP!-- 1kohm pullup can be used on hotend sensor, using correct resistor and table
Temperature sensors available:
-3 : thermocouple with MAX31855 (only for sensor 0)
-2 : thermocouple with MAX6675 (only for sensor 0)
-1 : thermocouple with AD595
0 : not used
1 : 100k thermistor - best choice for EPCOS 100k (4.7k pullup)
2 : 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup)
3 : Mendel-parts thermistor (4.7k pullup)
4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !!
5 : 100K thermistor - ATC Semitec 104GT-2 (Used in ParCan & J-Head) (4.7k pullup)
6 : 100k EPCOS - Not as accurate as table 1 (created using a fluke thermocouple) (4.7k pullup)
7 : 100k Honeywell thermistor 135-104LAG-J01 (4.7k pullup)
71 : 100k Honeywell thermistor 135-104LAF-J01 (4.7k pullup)
8 : 100k 0603 SMD Vishay NTCS0603E3104FXT (4.7k pullup)
9 : 100k GE Sensing AL03006-58.2K-97-G1 (4.7k pullup)
10 : 100k RS thermistor 198-961 (4.7k pullup)
11 : 100k beta 3950 1% thermistor (4.7k pullup)
12 : 100k 0603 SMD Vishay NTCS0603E3104FXT (4.7k pullup) (calibrated for Makibox hot bed)
13 : 100k Hisens 3950 1% up to 300°C for hotend "Simple ONE " & "Hotend "All In ONE"
20 : the PT100 circuit found in the Ultimainboard V2.x
60 : 100k Maker's Tool Works Kapton Bed Thermistor beta=3950
66 : 4.7M High Temperature thermistor from Dyze Design
70 : the 100K thermistor found in the bq Hephestos 2
1k ohm pullup tables - This is atypical, and requires changing out the 4.7k pullup for 1k.
(but gives greater accuracy and more stable PID)
51 : 100k thermistor - EPCOS (1k pullup)
52 : 200k thermistor - ATC Semitec 204GT-2 (1k pullup)
55 : 100k thermistor - ATC Semitec 104GT-2 (Used in ParCan & J-Head) (1k pullup)
1047 : Pt1000 with 4k7 pullup
1010 : Pt1000 with 1k pullup (non standard)
147 : Pt100 with 4k7 pullup
110 : Pt100 with 1k pullup (non standard)
Use these for Testing or Development purposes. NEVER for production machine.
998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below.
999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below.
:{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '66':"Dyze Design 4.7M High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" }
* --NORMAL IS 4.7kohm PULLUP!-- 1kohm pullup can be used on hotend sensor, using correct resistor and table
*
* Temperature sensors available:
*
* -3 : thermocouple with MAX31855 (only for sensor 0)
* -2 : thermocouple with MAX6675 (only for sensor 0)
* -1 : thermocouple with AD595
* 0 : not used
* 1 : 100k thermistor - best choice for EPCOS 100k (4.7k pullup)
* 2 : 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup)
* 3 : Mendel-parts thermistor (4.7k pullup)
* 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !!
* 5 : 100K thermistor - ATC Semitec 104GT-2 (Used in ParCan & J-Head) (4.7k pullup)
* 6 : 100k EPCOS - Not as accurate as table 1 (created using a fluke thermocouple) (4.7k pullup)
* 7 : 100k Honeywell thermistor 135-104LAG-J01 (4.7k pullup)
* 71 : 100k Honeywell thermistor 135-104LAF-J01 (4.7k pullup)
* 8 : 100k 0603 SMD Vishay NTCS0603E3104FXT (4.7k pullup)
* 9 : 100k GE Sensing AL03006-58.2K-97-G1 (4.7k pullup)
* 10 : 100k RS thermistor 198-961 (4.7k pullup)
* 11 : 100k beta 3950 1% thermistor (4.7k pullup)
* 12 : 100k 0603 SMD Vishay NTCS0603E3104FXT (4.7k pullup) (calibrated for Makibox hot bed)
* 13 : 100k Hisens 3950 1% up to 300°C for hotend "Simple ONE " & "Hotend "All In ONE"
* 20 : the PT100 circuit found in the Ultimainboard V2.x
* 60 : 100k Maker's Tool Works Kapton Bed Thermistor beta=3950
* 66 : 4.7M High Temperature thermistor from Dyze Design
* 70 : the 100K thermistor found in the bq Hephestos 2
*
* 1k ohm pullup tables - This is atypical, and requires changing out the 4.7k pullup for 1k.
* (but gives greater accuracy and more stable PID)
* 51 : 100k thermistor - EPCOS (1k pullup)
* 52 : 200k thermistor - ATC Semitec 204GT-2 (1k pullup)
* 55 : 100k thermistor - ATC Semitec 104GT-2 (Used in ParCan & J-Head) (1k pullup)
*
* 1047 : Pt1000 with 4k7 pullup
* 1010 : Pt1000 with 1k pullup (non standard)
* 147 : Pt100 with 4k7 pullup
* 110 : Pt100 with 1k pullup (non standard)
*
* Use these for Testing or Development purposes. NEVER for production machine.
* 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below.
* 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below.
*
* :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '66':"Dyze Design 4.7M High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" }
*/
#define TEMP_SENSOR_0 1
#define TEMP_SENSOR_1 0
@ -400,15 +400,15 @@
//===========================================================================
/**
Thermal Protection protects your printer from damage and fire if a
thermistor falls out or temperature sensors fail in any way.
The issue: If a thermistor falls out or a temperature sensor fails,
Marlin can no longer sense the actual temperature. Since a disconnected
thermistor reads as a low temperature, the firmware will keep the heater on.
If you get "Thermal Runaway" or "Heating failed" errors the
details can be tuned in Configuration_adv.h
* Thermal Protection protects your printer from damage and fire if a
* thermistor falls out or temperature sensors fail in any way.
*
* The issue: If a thermistor falls out or a temperature sensor fails,
* Marlin can no longer sense the actual temperature. Since a disconnected
* thermistor reads as a low temperature, the firmware will keep the heater on.
*
* If you get "Thermal Runaway" or "Heating failed" errors the
* details can be tuned in Configuration_adv.h
*/
#define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders
@ -516,7 +516,7 @@
#define X_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
#define Y_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
#define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
#define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
#define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe.
// Enable this feature if all enabled endstop pins are interrupt-capable.
// This will remove the need to poll the interrupt pins, saving many CPU cycles.
@ -529,56 +529,57 @@
// delta speeds must be the same on xyz
/**
Default Settings
These settings can be reset by M502
You can set distinct factors for each E stepper, if needed.
If fewer factors are given, the last will apply to the rest.
Note that if EEPROM is enabled, saved values will override these.
* Default Settings
*
* These settings can be reset by M502
*
* You can set distinct factors for each E stepper, if needed.
* If fewer factors are given, the last will apply to the rest.
*
* Note that if EEPROM is enabled, saved values will override these.
*/
/**
Default Axis Steps Per Unit (steps/mm)
Override with M92
X, Y, Z, E0 [, E1[, E2[, E3]]]
* Default Axis Steps Per Unit (steps/mm)
* Override with M92
* X, Y, Z, E0 [, E1[, E2[, E3]]]
*/
#define DEFAULT_AXIS_STEPS_PER_UNIT { 100, 100, 100, 90 } // default steps per unit for Kossel (GT2, 20 tooth)
/**
Default Max Feed Rate (mm/s)
Override with M203
X, Y, Z, E0 [, E1[, E2[, E3]]]
* Default Max Feed Rate (mm/s)
* Override with M203
* X, Y, Z, E0 [, E1[, E2[, E3]]]
*/
#define DEFAULT_MAX_FEEDRATE { 200, 200, 200, 200 }
/**
Default Max Acceleration (change/s) change = mm/s
(Maximum start speed for accelerated moves)
Override with M201
X, Y, Z, E0 [, E1[, E2[, E3]]]
* Default Max Acceleration (change/s) change = mm/s
* (Maximum start speed for accelerated moves)
* Override with M201
* X, Y, Z, E0 [, E1[, E2[, E3]]]
*/
#define DEFAULT_MAX_ACCELERATION { 4000, 4000, 4000, 4000 }
/**
Default Acceleration (change/s) change = mm/s
Override with M204
M204 P Acceleration
M204 R Retract Acceleration
M204 T Travel Acceleration
* Default Acceleration (change/s) change = mm/s
* Override with M204
*
* M204 P Acceleration
* M204 R Retract Acceleration
* M204 T Travel Acceleration
*/
#define DEFAULT_ACCELERATION 2500 // X, Y, Z and E acceleration for printing moves
#define DEFAULT_RETRACT_ACCELERATION 3000 // E acceleration for retracts
#define DEFAULT_TRAVEL_ACCELERATION 3000 // X, Y, Z acceleration for travel (non printing) moves
/**
Default Jerk (mm/s)
"Jerk" specifies the minimum speed change that requires acceleration.
When changing speed and direction, if the difference is less than the
value set here, it may happen instantaneously.
* Default Jerk (mm/s)
* Override with M205 X Y Z E
*
* "Jerk" specifies the minimum speed change that requires acceleration.
* When changing speed and direction, if the difference is less than the
* value set here, it may happen instantaneously.
*/
#define DEFAULT_XJERK 20.0
#define DEFAULT_YJERK DEFAULT_XJERK
@ -744,18 +745,18 @@
#define Z_MIN_PROBE_REPEATABILITY_TEST
/**
Z probes require clearance when deploying, stowing, and moving between
probe points to avoid hitting the bed and other hardware.
Servo-mounted probes require extra space for the arm to rotate.
Inductive probes need space to keep from triggering early.
Use these settings to specify the distance (mm) to raise the probe (or
lower the bed). The values set here apply over and above any (negative)
probe Z Offset set with Z_PROBE_OFFSET_FROM_EXTRUDER, M851, or the LCD.
Only integer values >= 1 are valid here.
Example: `M851 Z-5` with a CLEARANCE of 4 => 9mm from bed to nozzle.
But: `M851 Z+1` with a CLEARANCE of 2 => 2mm from bed to nozzle.
* Z probes require clearance when deploying, stowing, and moving between
* probe points to avoid hitting the bed and other hardware.
* Servo-mounted probes require extra space for the arm to rotate.
* Inductive probes need space to keep from triggering early.
*
* Use these settings to specify the distance (mm) to raise the probe (or
* lower the bed). The values set here apply over and above any (negative)
* probe Z Offset set with Z_PROBE_OFFSET_FROM_EXTRUDER, M851, or the LCD.
* Only integer values >= 1 are valid here.
*
* Example: `M851 Z-5` with a CLEARANCE of 4 => 9mm from bed to nozzle.
* But: `M851 Z+1` with a CLEARANCE of 2 => 2mm from bed to nozzle.
*/
#define Z_CLEARANCE_DEPLOY_PROBE 50 // Z Clearance for Deploy/Stow
#define Z_CLEARANCE_BETWEEN_PROBES 5 // Z Clearance between probe points
@ -826,13 +827,15 @@
#define Y_MAX_POS DELTA_PRINTABLE_RADIUS
#define Z_MAX_POS MANUAL_Z_HOME_POS
//===========================================================================
//========================= Filament Runout Sensor ==========================
//===========================================================================
//#define FILAMENT_RUNOUT_SENSOR // Uncomment for defining a filament runout sensor such as a mechanical or opto endstop to check the existence of filament
// RAMPS-based boards use SERVO3_PIN. For other boards you may need to define FIL_RUNOUT_PIN.
// It is assumed that when logic high = filament available
// when logic low = filament ran out
/**
* Filament Runout Sensor
* A mechanical or opto endstop is used to check for the presence of filament.
*
* RAMPS-based boards use SERVO3_PIN.
* For other boards you may need to define FIL_RUNOUT_PIN.
* By default the firmware assumes HIGH = has filament, LOW = ran out
*/
//#define FILAMENT_RUNOUT_SENSOR
#if ENABLED(FILAMENT_RUNOUT_SENSOR)
#define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor.
#define ENDSTOPPULLUP_FIL_RUNOUT // Uncomment to use internal pullup for filament runout pins if the sensor is defined.
@ -852,9 +855,9 @@
#define MESH_NUM_Y_POINTS 3
#define MESH_HOME_SEARCH_Z 4 // Z after Home, bed somewhere below but above 0.0.
#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest at origin [0,0,0]
//#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest at origin [0,0,0]
#define MANUAL_BED_LEVELING // Add display menu option for bed leveling.
//#define MANUAL_BED_LEVELING // Add display menu option for bed leveling.
#if ENABLED(MANUAL_BED_LEVELING)
#define MBL_Z_STEP 0.025 // Step size while manually probing Z axis.
@ -873,41 +876,40 @@
// @section bedlevel
/**
Select one form of Auto Bed Leveling below.
If you're also using the Probe for Z Homing, it's
highly recommended to enable Z_SAFE_HOMING also!
- 3POINT
Probe 3 arbitrary points on the bed (that aren't collinear)
You specify the XY coordinates of all 3 points.
The result is a single tilted plane. Best for a flat bed.
- LINEAR
Probe several points in a grid.
You specify the rectangle and the density of sample points.
The result is a single tilted plane. Best for a flat bed.
- BILINEAR
Probe several points in a grid.
You specify the rectangle and the density of sample points.
The result is a mesh, best for large or uneven beds.
* Select one form of Auto Bed Leveling below.
*
* If you're also using the Probe for Z Homing, it's
* highly recommended to enable Z_SAFE_HOMING also!
*
* - 3POINT
* Probe 3 arbitrary points on the bed (that aren't collinear)
* You specify the XY coordinates of all 3 points.
* The result is a single tilted plane. Best for a flat bed.
*
* - LINEAR
* Probe several points in a grid.
* You specify the rectangle and the density of sample points.
* The result is a single tilted plane. Best for a flat bed.
*
* - BILINEAR
* Probe several points in a grid.
* You specify the rectangle and the density of sample points.
* The result is a mesh, best for large or uneven beds.
*/
//#define AUTO_BED_LEVELING_3POINT // Only AUTO_BED_LEVELING_BILINEAR is supported for DELTA bed leveling.
//#define AUTO_BED_LEVELING_LINEAR // Only AUTO_BED_LEVELING_BILINEAR is supported for DELTA bed leveling.
#define AUTO_BED_LEVELING_BILINEAR // Only AUTO_BED_LEVELING_BILINEAR is supported for DELTA bed leveling.
/**
Enable detailed logging of G28, G29, M48, etc.
Turn on with the command 'M111 S32'.
NOTE: Requires a lot of PROGMEM!
* Enable detailed logging of G28, G29, M48, etc.
* Turn on with the command 'M111 S32'.
* NOTE: Requires a lot of PROGMEM!
*/
//#define DEBUG_LEVELING_FEATURE
#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR)
// Set the number of grid points per dimension.
// Works best with 5 or more points in each dimension.
#define ABL_GRID_MAX_POINTS_X 9
#define ABL_GRID_MAX_POINTS_Y ABL_GRID_MAX_POINTS_X
@ -957,8 +959,8 @@
#endif
/**
Commands to execute at the end of G29 probing.
Useful to retract or move the Z probe out of the way.
* Commands to execute at the end of G29 probing.
* Useful to retract or move the Z probe out of the way.
*/
//#define Z_PROBE_END_SCRIPT "G1 Z10 F12000\nG1 X15 Y330\nG1 Z0.5\nG1 Z10"
@ -982,7 +984,7 @@
// - If stepper drivers time out, it will need X and Y homing again before Z homing.
// - Move the Z probe (or nozzle) to a defined XY point before Z Homing when homing all axes (G28).
// - Prevent Z homing when the Z probe is outside bed area.
//#define Z_SAFE_HOMING // To continue using the Z-min-endstop for homing, be sure to disable Z_SAFE_HOMING.
//#define Z_SAFE_HOMING
#if ENABLED(Z_SAFE_HOMING)
#define Z_SAFE_HOMING_X_POINT ((X_MIN_POS + X_MAX_POS) / 2) // X point for Z homing when homing all axis (G28).
@ -1082,13 +1084,13 @@
//
// Available list of patterns:
// P0: This is the default pattern, this process requires a sponge type
// material at a fixed bed location, the cleaning process is based on
// "strokes" i.e. back-and-forth movements between the starting and end
// points.
// material at a fixed bed location. S defines "strokes" i.e.
// back-and-forth movements between the starting and end points.
//
// P1: This starts a zig-zag pattern between (X0, Y0) and (X1, Y1), "T"
// defines the number of zig-zag triangles to be done. "S" defines the
// number of strokes aka one back-and-forth movement. As an example
// number of strokes aka one back-and-forth movement. Zig-zags will
// be performed in whichever dimension is smallest. As an example,
// sending "G12 P1 S1 T3" will execute:
//
// --
@ -1101,6 +1103,10 @@
// |________|_________|_________|
// 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.
//
// Attention: This is an EXPERIMENTAL feature, in the future the G-code arguments
@ -1109,13 +1115,23 @@
//#define NOZZLE_CLEAN_FEATURE
#if ENABLED(NOZZLE_CLEAN_FEATURE)
// Number of pattern repetitions
// Default number of pattern repetitions
#define NOZZLE_CLEAN_STROKES 12
// Default number of triangles
#define NOZZLE_CLEAN_TRIANGLES 3
// Specify positions as { X, Y, Z }
#define NOZZLE_CLEAN_START_POINT { 30, 30, (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
#define NOZZLE_CLEAN_GOBACK
#endif
@ -1201,7 +1217,7 @@
// IMPORTANT NOTE: The U8glib library is required for Full Graphic Display!
// https://github.com/olikraus/U8glib_Arduino
//
#define ULTRA_LCD // Character based
//#define ULTRA_LCD // Character based
//#define DOGLCD // Full graphics display
//
@ -1244,13 +1260,13 @@
//#define ENCODER_STEPS_PER_MENU_ITEM 5
/**
Encoder Direction Options
Test your encoder's behavior first with both options disabled.
Reversed Value Edit and Menu Nav? Enable REVERSE_ENCODER_DIRECTION.
Reversed Menu Navigation only? Enable REVERSE_MENU_DIRECTION.
Reversed Value Editing only? Enable BOTH options.
* Encoder Direction Options
*
* Test your encoder's behavior first with both options disabled.
*
* Reversed Value Edit and Menu Nav? Enable REVERSE_ENCODER_DIRECTION.
* Reversed Menu Navigation only? Enable REVERSE_MENU_DIRECTION.
* Reversed Value Editing only? Enable BOTH options.
*/
//
@ -1509,8 +1525,8 @@
#endif
/*********************************************************************\
R/C SERVO support
Sponsored by TrinityLabs, Reworked by codexmas
* R/C SERVO support
* Sponsored by TrinityLabs, Reworked by codexmas
**********************************************************************/
// Number of servos
@ -1522,7 +1538,7 @@
//
//#define NUM_SERVOS 3 // Servo index starts with 0 for M280 command
// Delay (in microseconds) before the next move will start, to give the servo time to reach its target angle.
// Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle.
// 300ms is a good value but you can try less delay.
// If the servo can't reach the requested position, increase it.
#define SERVO_DELAY 300
@ -1533,15 +1549,15 @@
//#define DEACTIVATE_SERVOS_AFTER_MOVE
/**********************************************************************\
Support for a filament diameter sensor
Also allows adjustment of diameter at print time (vs at slicing)
Single extruder only at this point (extruder 0)
Motherboards
34 - RAMPS1.4 - uses Analog input 5 on the AUX2 connector
81 - Printrboard - Uses Analog input 2 on the Exp1 connector (version B,C,D,E)
301 - Rambo - uses Analog input 3
Note may require analog pins to be defined for different motherboards
* Support for a filament diameter sensor
* Also allows adjustment of diameter at print time (vs at slicing)
* Single extruder only at this point (extruder 0)
*
* Motherboards
* 34 - RAMPS1.4 - uses Analog input 5 on the AUX2 connector
* 81 - Printrboard - Uses Analog input 2 on the Exp1 connector (version B,C,D,E)
* 301 - Rambo - uses Analog input 3
* Note may require analog pins to be defined for different motherboards
**********************************************************************/
// Uncomment below to enable
//#define FILAMENT_WIDTH_SENSOR

@ -217,13 +217,12 @@
* 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.
*/
#define E0_AUTO_FAN_PIN -1
#define E1_AUTO_FAN_PIN -1
#define E2_AUTO_FAN_PIN -1
#define E3_AUTO_FAN_PIN -1
#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 CASE_LIGHT_PIN 4
@ -309,11 +308,11 @@
// 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>
// 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)
// 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)
// 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
// once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
@ -428,6 +427,9 @@
// On the Info Screen, display XY with one decimal place when possible
//#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)
// Some RAMPS and other boards don't detect when an SD card is inserted. You can work
@ -445,6 +447,42 @@
// using:
//#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
//#define LCD_PROGRESS_BAR
@ -457,6 +495,8 @@
#define PROGRESS_MSG_EXPIRE 0
// Enable this to show messages for MSG_TIME then hide them
//#define PROGRESS_MSG_ONCE
// Add a menu item to test the progress bar:
//#define LCD_PROGRESS_BAR_TEST
#endif
// This allows hosts to request long names for files and folders with M33
@ -469,8 +509,25 @@
#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)
// 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.
// Western only. Not available for Cyrillic, Kana, Turkish, Greek, or Chinese.
//#define USE_BIG_EDIT_FONT
@ -510,36 +567,6 @@
#define BABYSTEP_MULTIPLICATOR 1 //faster movements
#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
// extruder advance constant (s2/mm3)
@ -561,19 +588,37 @@
*
* Assumption: advance = k * (delta velocity)
* K=0 means advance disabled.
* To get a rough start value for calibration, measure your "free filament length"
* 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 |
* See Marlin documentation for calibration instructions.
*/
//#define LIN_ADVANCE
#if ENABLED(LIN_ADVANCE)
#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
// @section leveling
@ -680,33 +725,42 @@
#define RETRACT_RECOVER_FEEDRATE 8 //default feedrate for recovering from retraction (mm/s)
#endif
// Add support for experimental filament exchange support M600; requires display
#if ENABLED(ULTIPANEL)
// #define FILAMENT_CHANGE_FEATURE // Enable filament exchange menu and M600 g-code (used for runout sensor too)
/**
* Filament Change
* Experimental filament change support.
* Adds the GCode M600 for initiating filament change.
*
* Requires an LCD display.
* This feature is required for the default FILAMENT_RUNOUT_SCRIPT.
*/
//#define FILAMENT_CHANGE_FEATURE
#if ENABLED(FILAMENT_CHANGE_FEATURE)
#define FILAMENT_CHANGE_X_POS 3 // X position of hotend
#define FILAMENT_CHANGE_Y_POS 3 // Y position of hotend
#define FILAMENT_CHANGE_Z_ADD 10 // Z addition of hotend (lift)
#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_RETRACT_FEEDRATE 60 // Initial retract feedrate in mm/s
#define FILAMENT_CHANGE_RETRACT_LENGTH 2 // Initial retract in mm
// It is a short retract used immediately after print interrupt before move to filament exchange position
#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_UNLOAD_LENGTH 100 // Unload filament length from hotend in mm
// Longer length for bowden printers to unload filament from whole bowden tube,
// shorter lenght for printers without bowden to unload filament from extruder only,
// shorter length for printers without bowden to unload filament from extruder only,
// 0 to disable unloading for manual unloading
#define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // Unload filament feedrate in mm/s - filament unloading can be fast
#define FILAMENT_CHANGE_LOAD_FEEDRATE 6 // Load filament feedrate in mm/s - filament loading into the bowden tube can be fast
#define FILAMENT_CHANGE_LOAD_LENGTH 0 // Load filament length over hotend in mm
// Longer length for bowden printers to fast load filament into whole bowden tube over the hotend,
// Short or zero length for printers without bowden where loading is not used
#define FILAMENT_CHANGE_LOAD_FEEDRATE 10 // Load filament feedrate in mm/s - filament loading into the bowden tube can be fast
#define FILAMENT_CHANGE_EXTRUDE_LENGTH 50 // Extrude filament length in mm after filament is load over the hotend,
#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_EXTRUDE_FEEDRATE 3 // Extrude filament feedrate in mm/s - must be slower than load feedrate
#endif
#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
/******************************************************************************\
@ -1101,4 +1155,29 @@
*/
//#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

@ -96,7 +96,7 @@
//
// 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
// 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
// boot image unmodified. For an example have a look at the bq Hephestos 2
@ -1087,6 +1087,10 @@
// |________|_________|_________|
// 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.
//
// Attention: This is an EXPERIMENTAL feature, in the future the G-code arguments
@ -1105,6 +1109,13 @@
#define NOZZLE_CLEAN_START_POINT { 30, 30, (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
#define NOZZLE_CLEAN_GOBACK
#endif

@ -96,7 +96,7 @@
//
// 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
// 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
// boot image unmodified. For an example have a look at the bq Hephestos 2
@ -1090,6 +1090,10 @@
// |________|_________|_________|
// 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.
//
// Attention: This is an EXPERIMENTAL feature, in the future the G-code arguments
@ -1108,6 +1112,13 @@
#define NOZZLE_CLEAN_START_POINT { 30, 30, (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
#define NOZZLE_CLEAN_GOBACK
#endif

@ -100,7 +100,7 @@
//
// 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
// 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
// boot image unmodified. For an example have a look at the bq Hephestos 2
@ -1089,6 +1089,10 @@
// |________|_________|_________|
// 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.
//
// Attention: This is an EXPERIMENTAL feature, in the future the G-code arguments
@ -1107,6 +1111,13 @@
#define NOZZLE_CLEAN_START_POINT { 30, 30, (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
#define NOZZLE_CLEAN_GOBACK
#endif

@ -89,7 +89,7 @@
//
// 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
// 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
// boot image unmodified. For an example have a look at the bq Hephestos 2
@ -1093,6 +1093,10 @@
// |________|_________|_________|
// 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.
//
// Attention: This is an EXPERIMENTAL feature, in the future the G-code arguments
@ -1111,6 +1115,13 @@
#define NOZZLE_CLEAN_START_POINT { 30, 30, (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
#define NOZZLE_CLEAN_GOBACK
#endif

@ -96,7 +96,7 @@
//
// 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
// 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
// boot image unmodified. For an example have a look at the bq Hephestos 2
@ -1003,6 +1003,10 @@
// |________|_________|_________|
// 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.
//
// Attention: This is an EXPERIMENTAL feature, in the future the G-code arguments
@ -1021,6 +1025,13 @@
#define NOZZLE_CLEAN_START_POINT { 30, 30, (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
#define NOZZLE_CLEAN_GOBACK
#endif

@ -96,7 +96,7 @@
//
// 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
// 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
// boot image unmodified. For an example have a look at the bq Hephestos 2
@ -996,6 +996,10 @@
// |________|_________|_________|
// 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.
//
// Attention: This is an EXPERIMENTAL feature, in the future the G-code arguments
@ -1014,6 +1018,13 @@
#define NOZZLE_CLEAN_START_POINT { 30, 30, (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
#define NOZZLE_CLEAN_GOBACK
#endif

@ -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
}

@ -53,40 +53,11 @@ class Nozzle {
__attribute__((unused)) point_t const &start,
__attribute__((unused)) point_t const &end,
__attribute__((unused)) uint8_t const &strokes
) __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
}
) __attribute__((optimize ("Os")));
/**
* @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 end point_t defining the ending point
@ -98,49 +69,22 @@ class Nozzle {
__attribute__((unused)) point_t const &end,
__attribute__((unused)) uint8_t const &strokes,
__attribute__((unused)) uint8_t const &objects
) __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;
#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
) __attribute__((optimize ("Os")));
#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
*/
static void circle(
__attribute__((unused)) point_t const &start,
__attribute__((unused)) point_t const &middle,
__attribute__((unused)) uint8_t const &strokes,
__attribute__((unused)) float const &radius
) __attribute__((optimize ("Os")));
public:
/**
@ -153,54 +97,13 @@ class Nozzle {
static void clean(
__attribute__((unused)) uint8_t const &pattern,
__attribute__((unused)) uint8_t const &strokes,
__attribute__((unused)) float const &radius,
__attribute__((unused)) uint8_t const &objects = 0
) __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
}
) __attribute__((optimize ("Os")));
static void park(
__attribute__((unused)) uint8_t const &z_action
) __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
}
) __attribute__((optimize ("Os")));
};
#endif

Loading…
Cancel
Save