Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NOZZLE_CLEAN_FEATURE is no longer dependent of HAS_BED_PROBE #4348

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
---
language: c
#
notifications:
email: false
#
before_install:
#
# Fetch the tag information for the current branch
Expand Down Expand Up @@ -237,7 +240,7 @@ script:
# Test NOZZLE_CLEAN_FEATURE
#
- restore_configs
- opt_enable AUTO_BED_LEVELING_FEATURE NOZZLE_CLEAN_FEATURE FIX_MOUNTED_PROBE
- opt_enable NOZZLE_CLEAN_FEATURE
- build_marlin
#
#
Expand Down
10 changes: 5 additions & 5 deletions Marlin/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -894,12 +894,12 @@
// Number of pattern repetitions
#define NOZZLE_CLEAN_STROKES 12

// { X, Y, Z}
#define NOZZLE_CLEAN_START_PT { 30, 30, (Z_MIN_POS + 5)}
#define NOZZLE_CLEAN_END_PT {100, 60, (Z_MIN_POS + 5)}
// 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)}

// Moves the nozzle to the parked position
#define NOZZLE_CLEAN_PARK
// Moves the nozzle to the intial position
#define NOZZLE_CLEAN_GOBACK
#endif

//
Expand Down
5 changes: 5 additions & 0 deletions Marlin/Marlin.h
Original file line number Diff line number Diff line change
Expand Up @@ -432,4 +432,9 @@ void calculate_volumetric_multipliers();

void safe_delay(uint16_t del);

inline void do_blocking_move_to_x(float x, float fr_mm_m = 0.0);
inline void do_blocking_move_to_y(float y);
inline void do_blocking_move_to_z(float z, float fr_mm_m = 0.0);
inline void do_blocking_move_to_xy(float x, float y, float fr_mm_m = 0.0);

#endif //MARLIN_H
31 changes: 14 additions & 17 deletions Marlin/Marlin_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
#include "language.h"
#include "pins_arduino.h"
#include "math.h"
#include "nozzle.h"

#if ENABLED(USE_WATCHDOG)
#include "watchdog.h"
Expand Down Expand Up @@ -1708,24 +1709,24 @@ static void do_blocking_move_to(float x, float y, float z, float fr_mm_m = 0.0)
feedrate_mm_m = old_feedrate_mm_m;
}

inline void do_blocking_move_to_axis_pos(AxisEnum axis, float where, float fr_mm_m = 0.0) {
inline void do_blocking_move_to_axis_pos(AxisEnum axis, float where, float fr_mm_m /* = 0.0 */) {
current_position[axis] = where;
do_blocking_move_to(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], fr_mm_m);
}

inline void do_blocking_move_to_x(float x, float fr_mm_m = 0.0) {
inline void do_blocking_move_to_x(float x, float fr_mm_m /* = 0.0 */) {
do_blocking_move_to(x, current_position[Y_AXIS], current_position[Z_AXIS], fr_mm_m);
}

inline void do_blocking_move_to_y(float y) {
do_blocking_move_to(current_position[X_AXIS], y, current_position[Z_AXIS]);
}

inline void do_blocking_move_to_xy(float x, float y, float fr_mm_m = 0.0) {
inline void do_blocking_move_to_xy(float x, float y, float fr_mm_m /* = 0.0 */) {
do_blocking_move_to(x, y, current_position[Z_AXIS], fr_mm_m);
}

inline void do_blocking_move_to_z(float z, float fr_mm_m = 0.0) {
inline void do_blocking_move_to_z(float z, float fr_mm_m /* = 0.0 */) {
do_blocking_move_to(current_position[X_AXIS], current_position[Y_AXIS], z, fr_mm_m);
}

Expand Down Expand Up @@ -2791,9 +2792,7 @@ inline void gcode_G4() {

#endif //FWRETRACT

#if ENABLED(NOZZLE_CLEAN_FEATURE) && HAS_BED_PROBE
#include "nozzle.h"

#if ENABLED(NOZZLE_CLEAN_FEATURE)
/**
* G12: Clean the nozzle
*/
Expand Down Expand Up @@ -2850,8 +2849,6 @@ inline void gcode_G4() {
#endif // QUICK_HOME

#if ENABLED(NOZZLE_PARK_FEATURE)
#include "nozzle.h"

/**
* G27: Park the nozzle
*/
Expand Down Expand Up @@ -6825,7 +6822,7 @@ inline void gcode_T(uint8_t tmp_extruder) {
// <0 if the new nozzle is higher, >0 if lower. A bigger raise when lower.
float z_diff = hotend_offset[Z_AXIS][active_extruder] - hotend_offset[Z_AXIS][tmp_extruder],
z_raise = 0.3 + (z_diff > 0.0 ? z_diff : 0.0);

// Always raise by some amount
planner.buffer_line(
current_position[X_AXIS],
Expand All @@ -6836,10 +6833,10 @@ inline void gcode_T(uint8_t tmp_extruder) {
active_extruder
);
stepper.synchronize();

move_extruder_servo(active_extruder);
delay(500);

// Move back down, if needed
if (z_raise != z_diff) {
planner.buffer_line(
Expand All @@ -6853,7 +6850,7 @@ inline void gcode_T(uint8_t tmp_extruder) {
stepper.synchronize();
}
#endif

/**
* Set current_position to the position of the new nozzle.
* Offsets are based on linear distance, so we need to get
Expand Down Expand Up @@ -6906,7 +6903,7 @@ inline void gcode_T(uint8_t tmp_extruder) {
current_position[Z_AXIS] += offset_vec.z;

#else // !AUTO_BED_LEVELING_FEATURE

float xydiff[2] = {
hotend_offset[X_AXIS][tmp_extruder] - hotend_offset[X_AXIS][active_extruder],
hotend_offset[Y_AXIS][tmp_extruder] - hotend_offset[Y_AXIS][active_extruder]
Expand All @@ -6930,7 +6927,7 @@ inline void gcode_T(uint8_t tmp_extruder) {
}

#endif // MESH_BED_LEVELING

#endif // !AUTO_BED_LEVELING_FEATURE

#if ENABLED(DEBUG_LEVELING_FEATURE)
Expand Down Expand Up @@ -6993,7 +6990,7 @@ inline void gcode_T(uint8_t tmp_extruder) {
SERIAL_ECHOLNPGM("<<< gcode_T");
}
#endif

SERIAL_ECHO_START;
SERIAL_ECHOPGM(MSG_ACTIVE_EXTRUDER);
SERIAL_PROTOCOLLN((int)active_extruder);
Expand Down Expand Up @@ -7091,7 +7088,7 @@ void process_next_command() {
break;
#endif // FWRETRACT

#if ENABLED(NOZZLE_CLEAN_FEATURE) && HAS_BED_PROBE
#if ENABLED(NOZZLE_CLEAN_FEATURE)
case 12:
gcode_G12(); // G12: Nozzle Clean
break;
Expand Down
7 changes: 0 additions & 7 deletions Marlin/SanityCheck.h
Original file line number Diff line number Diff line change
Expand Up @@ -684,11 +684,4 @@
#error "ENDSTOPS_ONLY_FOR_HOMING is deprecated. Use (disable) ENDSTOPS_ALWAYS_ON_DEFAULT instead."
#endif

/**
* Nozzle cleaning
*/
#if ENABLED(NOZZLE_CLEAN_FEATURE) && !HAS_BED_PROBE
#error Due to internal dependencies you must have a bed probe for NOZZLE_CLEAN_FEATURE to work
#endif

#endif //SANITYCHECK_H
10 changes: 5 additions & 5 deletions Marlin/example_configurations/Cartesio/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -894,12 +894,12 @@
// Number of pattern repetitions
#define NOZZLE_CLEAN_STROKES 12

// { X, Y, Z}
#define NOZZLE_CLEAN_START_PT { 30, 30, (Z_MIN_POS + 5)}
#define NOZZLE_CLEAN_END_PT {100, 60, (Z_MIN_POS + 5)}
// 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)}

// Moves the nozzle to the parked position
#define NOZZLE_CLEAN_PARK
// Moves the nozzle to the intial position
#define NOZZLE_CLEAN_GOBACK
#endif

//
Expand Down
10 changes: 5 additions & 5 deletions Marlin/example_configurations/Felix/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -877,12 +877,12 @@
// Number of pattern repetitions
#define NOZZLE_CLEAN_STROKES 12

// { X, Y, Z}
#define NOZZLE_CLEAN_START_PT { 30, 30, (Z_MIN_POS + 5)}
#define NOZZLE_CLEAN_END_PT {100, 60, (Z_MIN_POS + 5)}
// 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)}

// Moves the nozzle to the parked position
#define NOZZLE_CLEAN_PARK
// Moves the nozzle to the intial position
#define NOZZLE_CLEAN_GOBACK
#endif

//
Expand Down
10 changes: 5 additions & 5 deletions Marlin/example_configurations/Felix/DUAL/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -875,12 +875,12 @@
// Number of pattern repetitions
#define NOZZLE_CLEAN_STROKES 12

// { X, Y, Z}
#define NOZZLE_CLEAN_START_PT { 30, 30, (Z_MIN_POS + 5)}
#define NOZZLE_CLEAN_END_PT {100, 60, (Z_MIN_POS + 5)}
// 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)}

// Moves the nozzle to the parked position
#define NOZZLE_CLEAN_PARK
// Moves the nozzle to the intial position
#define NOZZLE_CLEAN_GOBACK
#endif

//
Expand Down
10 changes: 5 additions & 5 deletions Marlin/example_configurations/Hephestos/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -886,12 +886,12 @@
// Number of pattern repetitions
#define NOZZLE_CLEAN_STROKES 12

// { X, Y, Z}
#define NOZZLE_CLEAN_START_PT { 30, 30, (Z_MIN_POS + 5)}
#define NOZZLE_CLEAN_END_PT {100, 60, (Z_MIN_POS + 5)}
// 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)}

// Moves the nozzle to the parked position
#define NOZZLE_CLEAN_PARK
// Moves the nozzle to the intial position
#define NOZZLE_CLEAN_GOBACK
#endif

//
Expand Down
10 changes: 5 additions & 5 deletions Marlin/example_configurations/Hephestos_2/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -888,12 +888,12 @@
// Number of pattern repetitions
#define NOZZLE_CLEAN_STROKES 12

// { X, Y, Z}
#define NOZZLE_CLEAN_START_PT { 30, 30, (Z_MIN_POS + 5)}
#define NOZZLE_CLEAN_END_PT {100, 60, (Z_MIN_POS + 5)}
// 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)}

// Moves the nozzle to the parked position
#define NOZZLE_CLEAN_PARK
// Moves the nozzle to the intial position
#define NOZZLE_CLEAN_GOBACK
#endif

//
Expand Down
10 changes: 5 additions & 5 deletions Marlin/example_configurations/K8200/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -911,12 +911,12 @@
// Number of pattern repetitions
#define NOZZLE_CLEAN_STROKES 12

// { X, Y, Z}
#define NOZZLE_CLEAN_START_PT { 30, 30, (Z_MIN_POS + 5)}
#define NOZZLE_CLEAN_END_PT {100, 60, (Z_MIN_POS + 5)}
// 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)}

// Moves the nozzle to the parked position
#define NOZZLE_CLEAN_PARK
// Moves the nozzle to the intial position
#define NOZZLE_CLEAN_GOBACK
#endif

//
Expand Down
10 changes: 5 additions & 5 deletions Marlin/example_configurations/K8400/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -894,12 +894,12 @@
// Number of pattern repetitions
#define NOZZLE_CLEAN_STROKES 12

// { X, Y, Z}
#define NOZZLE_CLEAN_START_PT { 30, 30, (Z_MIN_POS + 5)}
#define NOZZLE_CLEAN_END_PT {100, 60, (Z_MIN_POS + 5)}
// 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)}

// Moves the nozzle to the parked position
#define NOZZLE_CLEAN_PARK
// Moves the nozzle to the intial position
#define NOZZLE_CLEAN_GOBACK
#endif

//
Expand Down
10 changes: 5 additions & 5 deletions Marlin/example_configurations/K8400/Dual-head/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -894,12 +894,12 @@
// Number of pattern repetitions
#define NOZZLE_CLEAN_STROKES 12

// { X, Y, Z}
#define NOZZLE_CLEAN_START_PT { 30, 30, (Z_MIN_POS + 5)}
#define NOZZLE_CLEAN_END_PT {100, 60, (Z_MIN_POS + 5)}
// 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)}

// Moves the nozzle to the parked position
#define NOZZLE_CLEAN_PARK
// Moves the nozzle to the intial position
#define NOZZLE_CLEAN_GOBACK
#endif

//
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -894,12 +894,12 @@
// Number of pattern repetitions
#define NOZZLE_CLEAN_STROKES 12

// { X, Y, Z}
#define NOZZLE_CLEAN_START_PT { 30, 30, (Z_MIN_POS + 5)}
#define NOZZLE_CLEAN_END_PT {100, 60, (Z_MIN_POS + 5)}
// 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)}

// Moves the nozzle to the parked position
#define NOZZLE_CLEAN_PARK
// Moves the nozzle to the intial position
#define NOZZLE_CLEAN_GOBACK
#endif

//
Expand Down
10 changes: 5 additions & 5 deletions Marlin/example_configurations/RigidBot/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -892,12 +892,12 @@
// Number of pattern repetitions
#define NOZZLE_CLEAN_STROKES 12

// { X, Y, Z}
#define NOZZLE_CLEAN_START_PT { 30, 30, (Z_MIN_POS + 5)}
#define NOZZLE_CLEAN_END_PT {100, 60, (Z_MIN_POS + 5)}
// 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)}

// Moves the nozzle to the parked position
#define NOZZLE_CLEAN_PARK
// Moves the nozzle to the intial position
#define NOZZLE_CLEAN_GOBACK
#endif

//
Expand Down
10 changes: 5 additions & 5 deletions Marlin/example_configurations/SCARA/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -902,12 +902,12 @@
// Number of pattern repetitions
#define NOZZLE_CLEAN_STROKES 12

// { X, Y, Z}
#define NOZZLE_CLEAN_START_PT { 30, 30, (Z_MIN_POS + 5)}
#define NOZZLE_CLEAN_END_PT {100, 60, (Z_MIN_POS + 5)}
// 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)}

// Moves the nozzle to the parked position
#define NOZZLE_CLEAN_PARK
// Moves the nozzle to the intial position
#define NOZZLE_CLEAN_GOBACK
#endif

//
Expand Down
10 changes: 5 additions & 5 deletions Marlin/example_configurations/TAZ4/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -915,12 +915,12 @@
// Number of pattern repetitions
#define NOZZLE_CLEAN_STROKES 12

// { X, Y, Z}
#define NOZZLE_CLEAN_START_PT { 30, 30, (Z_MIN_POS + 5)}
#define NOZZLE_CLEAN_END_PT {100, 60, (Z_MIN_POS + 5)}
// 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)}

// Moves the nozzle to the parked position
#define NOZZLE_CLEAN_PARK
// Moves the nozzle to the intial position
#define NOZZLE_CLEAN_GOBACK
#endif

//
Expand Down
Loading