|
|
@ -46,7 +46,11 @@
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
// Move to the starting point
|
|
|
|
// Move to the starting point
|
|
|
|
|
|
|
|
#if ENABLED(NOZZLE_CLEAN_NO_Z)
|
|
|
|
|
|
|
|
do_blocking_move_to_xy(start.x, start.y);
|
|
|
|
|
|
|
|
#else
|
|
|
|
do_blocking_move_to(start.x, start.y, start.z);
|
|
|
|
do_blocking_move_to(start.x, start.y, start.z);
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
// Start the stroke pattern
|
|
|
|
// Start the stroke pattern
|
|
|
|
for (uint8_t i = 0; i < (strokes >> 1); i++) {
|
|
|
|
for (uint8_t i = 0; i < (strokes >> 1); i++) {
|
|
|
@ -76,7 +80,11 @@
|
|
|
|
const float ix = current_position[X_AXIS], iy = current_position[Y_AXIS], iz = current_position[Z_AXIS];
|
|
|
|
const float ix = current_position[X_AXIS], iy = current_position[Y_AXIS], iz = current_position[Z_AXIS];
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#if ENABLED(NOZZLE_CLEAN_NO_Z)
|
|
|
|
|
|
|
|
do_blocking_move_to_xy(start.x, start.y);
|
|
|
|
|
|
|
|
#else
|
|
|
|
do_blocking_move_to(start.x, start.y, start.z);
|
|
|
|
do_blocking_move_to(start.x, start.y, start.z);
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
const uint8_t zigs = objects << 1;
|
|
|
|
const uint8_t zigs = objects << 1;
|
|
|
|
const bool horiz = ABS(diffx) >= ABS(diffy); // Do a horizontal wipe?
|
|
|
|
const bool horiz = ABS(diffx) >= ABS(diffy); // Do a horizontal wipe?
|
|
|
@ -119,7 +127,11 @@
|
|
|
|
const float ix = current_position[X_AXIS], iy = current_position[Y_AXIS], iz = current_position[Z_AXIS];
|
|
|
|
const float ix = current_position[X_AXIS], iy = current_position[Y_AXIS], iz = current_position[Z_AXIS];
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#if ENABLED(NOZZLE_CLEAN_NO_Z)
|
|
|
|
|
|
|
|
do_blocking_move_to_xy(start.x, start.y);
|
|
|
|
|
|
|
|
#else
|
|
|
|
do_blocking_move_to(start.x, start.y, start.z);
|
|
|
|
do_blocking_move_to(start.x, start.y, start.z);
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
for (uint8_t s = 0; s < strokes; s++)
|
|
|
|
for (uint8_t s = 0; s < strokes; s++)
|
|
|
|
for (uint8_t i = 0; i < NOZZLE_CLEAN_CIRCLE_FN; i++)
|
|
|
|
for (uint8_t i = 0; i < NOZZLE_CLEAN_CIRCLE_FN; i++)
|
|
|
@ -143,7 +155,13 @@
|
|
|
|
* @param pattern one of the available patterns
|
|
|
|
* @param pattern one of the available patterns
|
|
|
|
* @param argument depends on the cleaning pattern
|
|
|
|
* @param argument depends on the cleaning pattern
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
void Nozzle::clean(const uint8_t &pattern, const uint8_t &strokes, const float &radius, const uint8_t &objects/*=0*/) {
|
|
|
|
void Nozzle::clean(const uint8_t &pattern, const uint8_t &strokes, const float &radius, const uint8_t &objects, const bool clean_x, const bool clean_y, const bool clean_z) {
|
|
|
|
|
|
|
|
point_t start = NOZZLE_CLEAN_START_POINT;
|
|
|
|
|
|
|
|
point_t end = NOZZLE_CLEAN_END_POINT;
|
|
|
|
|
|
|
|
if (!clean_x) start.x = end.x = current_position[X_AXIS];
|
|
|
|
|
|
|
|
if (!clean_y) start.y = end.y = current_position[Y_AXIS];
|
|
|
|
|
|
|
|
if (!clean_z) start.z = end.z = current_position[Z_AXIS];
|
|
|
|
|
|
|
|
|
|
|
|
switch (pattern) {
|
|
|
|
switch (pattern) {
|
|
|
|
case 1:
|
|
|
|
case 1:
|
|
|
|
zigzag(NOZZLE_CLEAN_START_POINT, NOZZLE_CLEAN_END_POINT, strokes, objects);
|
|
|
|
zigzag(NOZZLE_CLEAN_START_POINT, NOZZLE_CLEAN_END_POINT, strokes, objects);
|
|
|
@ -163,8 +181,8 @@
|
|
|
|
#if ENABLED(NOZZLE_PARK_FEATURE)
|
|
|
|
#if ENABLED(NOZZLE_PARK_FEATURE)
|
|
|
|
|
|
|
|
|
|
|
|
void Nozzle::park(const uint8_t z_action, const point_t &park/*=NOZZLE_PARK_POINT*/) {
|
|
|
|
void Nozzle::park(const uint8_t z_action, const point_t &park/*=NOZZLE_PARK_POINT*/) {
|
|
|
|
const float fr_xy = NOZZLE_PARK_XY_FEEDRATE;
|
|
|
|
const float fr_xy = NOZZLE_PARK_XY_FEEDRATE,
|
|
|
|
const float fr_z = NOZZLE_PARK_Z_FEEDRATE;
|
|
|
|
fr_z = NOZZLE_PARK_Z_FEEDRATE;
|
|
|
|
|
|
|
|
|
|
|
|
switch (z_action) {
|
|
|
|
switch (z_action) {
|
|
|
|
case 1: // Go to Z-park height
|
|
|
|
case 1: // Go to Z-park height
|
|
|
|