Add HAS_HOTEND, etc.

This commit is contained in:
Scott Lahteine
2020-04-19 23:56:55 -05:00
parent 5d0deba938
commit 15f6f53638
38 changed files with 554 additions and 256 deletions

View File

@ -27,7 +27,7 @@
#include "../../module/stepper.h"
#include "../../module/endstops.h"
#if HOTENDS > 1
#if HAS_MULTI_HOTEND
#include "../../module/tool_change.h"
#endif
@ -285,7 +285,7 @@ void GcodeSuite::G28() {
#endif
// Always home with tool 0 active
#if HOTENDS > 1
#if HAS_MULTI_HOTEND
#if DISABLED(DELTA) || ENABLED(DELTA_HOME_TO_SAFE_ZONE)
const uint8_t old_tool_index = active_extruder;
#endif
@ -474,7 +474,7 @@ void GcodeSuite::G28() {
restore_feedrate_and_scaling();
// Restore the active tool after homing
#if HOTENDS > 1 && (DISABLED(DELTA) || ENABLED(DELTA_HOME_TO_SAFE_ZONE))
#if HAS_MULTI_HOTEND && (DISABLED(DELTA) || ENABLED(DELTA_HOME_TO_SAFE_ZONE))
tool_change(old_tool_index, NONE(PARKING_EXTRUDER, DUAL_X_CARRIAGE)); // Do move if one of these
#endif

View File

@ -35,7 +35,7 @@
#include "../../module/probe.h"
#endif
#if HOTENDS > 1
#if HAS_MULTI_HOTEND
#include "../../module/tool_change.h"
#endif

View File

@ -32,7 +32,7 @@
#include "../../module/motion.h"
#include "../../module/probe.h"
#if HOTENDS > 1
#if HAS_MULTI_HOTEND
#include "../../module/tool_change.h"
#endif
@ -124,7 +124,7 @@ void GcodeSuite::G34() {
#endif
// Always home with tool 0 active
#if HOTENDS > 1
#if HAS_MULTI_HOTEND
const uint8_t old_tool_index = active_extruder;
tool_change(0, true);
#endif
@ -386,7 +386,7 @@ void GcodeSuite::G34() {
#endif
// Restore the active tool after homing
#if HOTENDS > 1
#if HAS_MULTI_HOTEND
tool_change(old_tool_index, DISABLED(PARKING_EXTRUDER)); // Fetch previous tool for parking extruder
#endif

View File

@ -126,7 +126,7 @@ inline void park_above_object(measurements_t &m, const float uncertainty) {
calibration_move();
}
#if HOTENDS > 1
#if HAS_MULTI_HOTEND
inline void set_nozzle(measurements_t &m, const uint8_t extruder) {
if (extruder != active_extruder) {
park_above_object(m, CALIBRATION_MEASUREMENT_UNKNOWN);
@ -505,7 +505,7 @@ inline void calibrate_toolhead(measurements_t &m, const float uncertainty, const
TEMPORARY_BACKLASH_CORRECTION(all_on);
TEMPORARY_BACKLASH_SMOOTHING(0.0f);
#if HOTENDS > 1
#if HAS_MULTI_HOTEND
set_nozzle(m, extruder);
#else
UNUSED(extruder);
@ -548,7 +548,7 @@ inline void calibrate_all_toolheads(measurements_t &m, const float uncertainty)
normalize_hotend_offsets();
#endif
#if HOTENDS > 1
#if HAS_MULTI_HOTEND
set_nozzle(m, 0);
#endif
}
@ -582,7 +582,7 @@ inline void calibrate_all() {
#endif
// Cycle the toolheads so the servos settle into their "natural" positions
#if HOTENDS > 1
#if HAS_MULTI_HOTEND
HOTEND_LOOP() set_nozzle(m, e);
#endif