2017-09-08 05:33:16 +02:00
|
|
|
/**
|
|
|
|
* 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/>.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* motion.h
|
|
|
|
*
|
|
|
|
* High-level motion commands to feed the planner
|
|
|
|
* Some of these methods may migrate to the planner class.
|
|
|
|
*/
|
2018-10-31 23:07:52 +01:00
|
|
|
#pragma once
|
2017-09-08 05:33:16 +02:00
|
|
|
|
|
|
|
#include "../inc/MarlinConfig.h"
|
|
|
|
|
2017-09-08 22:35:25 +02:00
|
|
|
#if IS_SCARA
|
|
|
|
#include "../module/scara.h"
|
|
|
|
#endif
|
2017-09-08 05:33:16 +02:00
|
|
|
|
2018-10-31 23:07:52 +01:00
|
|
|
// Axis homed and known-position states
|
|
|
|
extern uint8_t axis_homed, axis_known_position;
|
|
|
|
constexpr uint8_t xyz_bits = _BV(X_AXIS) | _BV(Y_AXIS) | _BV(Z_AXIS);
|
|
|
|
FORCE_INLINE bool all_axes_homed() { return (axis_homed & xyz_bits) == xyz_bits; }
|
|
|
|
FORCE_INLINE bool all_axes_known() { return (axis_known_position & xyz_bits) == xyz_bits; }
|
|
|
|
FORCE_INLINE void set_all_unhomed() { axis_homed = 0; }
|
|
|
|
FORCE_INLINE void set_all_unknown() { axis_known_position = 0; }
|
|
|
|
|
2018-08-22 06:33:55 +02:00
|
|
|
// Error margin to work around float imprecision
|
|
|
|
constexpr float slop = 0.0001;
|
|
|
|
|
2017-09-08 05:33:16 +02:00
|
|
|
extern bool relative_mode;
|
|
|
|
|
2017-09-08 22:35:25 +02:00
|
|
|
extern float current_position[XYZE], // High-level current tool position
|
|
|
|
destination[XYZE]; // Destination for a move
|
|
|
|
|
|
|
|
// Scratch space for a cartesian result
|
|
|
|
extern float cartes[XYZ];
|
|
|
|
|
|
|
|
// Until kinematics.cpp is created, declare this here
|
|
|
|
#if IS_KINEMATIC
|
|
|
|
extern float delta[ABC];
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if OLDSCHOOL_ABL
|
|
|
|
extern float xy_probe_feedrate_mm_s;
|
|
|
|
#define XY_PROBE_FEEDRATE_MM_S xy_probe_feedrate_mm_s
|
|
|
|
#elif defined(XY_PROBE_SPEED)
|
|
|
|
#define XY_PROBE_FEEDRATE_MM_S MMM_TO_MMS(XY_PROBE_SPEED)
|
|
|
|
#else
|
|
|
|
#define XY_PROBE_FEEDRATE_MM_S PLANNER_XY_FEEDRATE()
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Feed rates are often configured with mm/m
|
|
|
|
* but the planner and stepper like mm/s units.
|
|
|
|
*/
|
2019-01-24 02:25:57 +01:00
|
|
|
extern const float homing_feedrate_mm_s[XYZ];
|
2017-09-08 22:35:25 +02:00
|
|
|
FORCE_INLINE float homing_feedrate(const AxisEnum a) { return pgm_read_float(&homing_feedrate_mm_s[a]); }
|
2017-09-08 05:33:16 +02:00
|
|
|
|
|
|
|
extern float feedrate_mm_s;
|
|
|
|
|
2017-09-08 22:35:25 +02:00
|
|
|
/**
|
|
|
|
* Feedrate scaling and conversion
|
|
|
|
*/
|
|
|
|
extern int16_t feedrate_percentage;
|
2018-07-01 22:20:28 +02:00
|
|
|
#define MMS_SCALED(MM_S) ((MM_S)*feedrate_percentage*0.01f)
|
2017-09-08 22:35:25 +02:00
|
|
|
|
2018-09-11 06:09:26 +02:00
|
|
|
// The active extruder (tool). Set with T<extruder> command.
|
|
|
|
#if EXTRUDERS > 1
|
|
|
|
extern uint8_t active_extruder;
|
|
|
|
#else
|
|
|
|
constexpr uint8_t active_extruder = 0;
|
|
|
|
#endif
|
2017-09-08 05:33:16 +02:00
|
|
|
|
2018-08-25 04:26:29 +02:00
|
|
|
#if HAS_HOTEND_OFFSET
|
2017-09-08 22:35:25 +02:00
|
|
|
extern float hotend_offset[XYZ][HOTENDS];
|
|
|
|
#endif
|
|
|
|
|
2018-11-02 06:42:16 +01:00
|
|
|
FORCE_INLINE float pgm_read_any(const float *p) { return pgm_read_float(p); }
|
|
|
|
FORCE_INLINE signed char pgm_read_any(const signed char *p) { return pgm_read_byte(p); }
|
2017-09-08 05:33:16 +02:00
|
|
|
|
|
|
|
#define XYZ_DEFS(type, array, CONFIG) \
|
|
|
|
extern const type array##_P[XYZ]; \
|
|
|
|
FORCE_INLINE type array(AxisEnum axis) { return pgm_read_any(&array##_P[axis]); } \
|
|
|
|
typedef void __void_##CONFIG##__
|
|
|
|
|
|
|
|
XYZ_DEFS(float, base_min_pos, MIN_POS);
|
|
|
|
XYZ_DEFS(float, base_max_pos, MAX_POS);
|
|
|
|
XYZ_DEFS(float, base_home_pos, HOME_POS);
|
|
|
|
XYZ_DEFS(float, max_length, MAX_LENGTH);
|
|
|
|
XYZ_DEFS(float, home_bump_mm, HOME_BUMP_MM);
|
|
|
|
XYZ_DEFS(signed char, home_dir, HOME_DIR);
|
|
|
|
|
2018-11-03 09:56:33 +01:00
|
|
|
#if HAS_WORKSPACE_OFFSET
|
|
|
|
void update_workspace_offset(const AxisEnum axis);
|
|
|
|
#else
|
|
|
|
#define update_workspace_offset(x) NOOP
|
|
|
|
#endif
|
|
|
|
|
2017-09-08 05:33:16 +02:00
|
|
|
#if HAS_SOFTWARE_ENDSTOPS
|
|
|
|
extern bool soft_endstops_enabled;
|
2018-11-03 09:56:33 +01:00
|
|
|
extern float soft_endstop_min[XYZ], soft_endstop_max[XYZ];
|
2017-09-08 05:33:16 +02:00
|
|
|
void clamp_to_software_endstops(float target[XYZ]);
|
2018-11-03 09:56:33 +01:00
|
|
|
void update_software_endstops(const AxisEnum axis);
|
2017-09-08 05:33:16 +02:00
|
|
|
#else
|
2018-10-23 23:00:34 +02:00
|
|
|
constexpr bool soft_endstops_enabled = false;
|
2018-11-03 09:56:33 +01:00
|
|
|
constexpr float soft_endstop_min[XYZ] = { X_MIN_BED, Y_MIN_BED, Z_MIN_POS },
|
|
|
|
soft_endstop_max[XYZ] = { X_MAX_BED, Y_MAX_BED, Z_MAX_POS };
|
2017-09-08 05:33:16 +02:00
|
|
|
#define clamp_to_software_endstops(x) NOOP
|
2018-11-03 09:56:33 +01:00
|
|
|
#define update_software_endstops(x) NOOP
|
2017-09-08 05:33:16 +02:00
|
|
|
#endif
|
|
|
|
|
2017-09-08 22:35:25 +02:00
|
|
|
void report_current_position();
|
|
|
|
|
2017-10-21 18:42:26 +02:00
|
|
|
inline void set_current_from_destination() { COPY(current_position, destination); }
|
|
|
|
inline void set_destination_from_current() { COPY(destination, current_position); }
|
2017-09-08 05:33:16 +02:00
|
|
|
|
2017-09-08 22:35:25 +02:00
|
|
|
void get_cartesian_from_steppers();
|
|
|
|
void set_current_from_steppers_for_axis(const AxisEnum axis);
|
|
|
|
|
2017-09-08 05:33:16 +02:00
|
|
|
/**
|
|
|
|
* sync_plan_position
|
|
|
|
*
|
|
|
|
* Set the planner/stepper positions directly from current_position with
|
|
|
|
* no kinematic translation. Used for homing axes and cartesian/core syncing.
|
|
|
|
*/
|
|
|
|
void sync_plan_position();
|
|
|
|
void sync_plan_position_e();
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Move the planner to the current position from wherever it last moved
|
|
|
|
* (or from wherever it has been told it is located).
|
|
|
|
*/
|
|
|
|
void line_to_current_position();
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Move the planner to the position stored in the destination array, which is
|
|
|
|
* used by G0/G1/G2/G3/G5 and many other functions to set a destination.
|
|
|
|
*/
|
2017-11-09 05:13:33 +01:00
|
|
|
void buffer_line_to_destination(const float fr_mm_s);
|
2017-09-08 05:33:16 +02:00
|
|
|
|
|
|
|
#if IS_KINEMATIC
|
2018-07-01 22:20:28 +02:00
|
|
|
void prepare_uninterpolated_move_to_destination(const float fr_mm_s=0);
|
2017-09-08 05:33:16 +02:00
|
|
|
#endif
|
|
|
|
|
|
|
|
void prepare_move_to_destination();
|
|
|
|
|
2017-09-08 22:35:25 +02:00
|
|
|
/**
|
|
|
|
* Blocking movement and shorthand functions
|
|
|
|
*/
|
2018-07-01 22:20:28 +02:00
|
|
|
void do_blocking_move_to(const float rx, const float ry, const float rz, const float &fr_mm_s=0);
|
|
|
|
void do_blocking_move_to_x(const float &rx, const float &fr_mm_s=0);
|
|
|
|
void do_blocking_move_to_z(const float &rz, const float &fr_mm_s=0);
|
|
|
|
void do_blocking_move_to_xy(const float &rx, const float &ry, const float &fr_mm_s=0);
|
2017-09-08 22:35:25 +02:00
|
|
|
|
2018-10-14 06:08:20 +02:00
|
|
|
FORCE_INLINE void do_blocking_move_to(const float (&raw)[XYZ], const float &fr_mm_s) {
|
|
|
|
do_blocking_move_to(raw[X_AXIS], raw[Y_AXIS], raw[Z_AXIS], fr_mm_s);
|
|
|
|
}
|
|
|
|
|
|
|
|
FORCE_INLINE void do_blocking_move_to(const float (&raw)[XYZE], const float &fr_mm_s) {
|
|
|
|
do_blocking_move_to(raw[X_AXIS], raw[Y_AXIS], raw[Z_AXIS], fr_mm_s);
|
|
|
|
}
|
|
|
|
|
2017-09-08 22:35:25 +02:00
|
|
|
void setup_for_endstop_or_probe_move();
|
|
|
|
void clean_up_after_endstop_or_probe_move();
|
|
|
|
|
|
|
|
void bracket_probe_move(const bool before);
|
|
|
|
void setup_for_endstop_or_probe_move();
|
|
|
|
void clean_up_after_endstop_or_probe_move();
|
|
|
|
|
|
|
|
//
|
|
|
|
// Homing
|
|
|
|
//
|
|
|
|
|
2017-10-02 04:34:58 +02:00
|
|
|
#define HAS_AXIS_UNHOMED_ERR ( \
|
|
|
|
ENABLED(Z_PROBE_ALLEN_KEY) \
|
|
|
|
|| ENABLED(Z_PROBE_SLED) \
|
|
|
|
|| HAS_PROBING_PROCEDURE \
|
|
|
|
|| HOTENDS > 1 \
|
|
|
|
|| ENABLED(NOZZLE_CLEAN_FEATURE) \
|
|
|
|
|| ENABLED(NOZZLE_PARK_FEATURE) \
|
|
|
|
|| (ENABLED(ADVANCED_PAUSE_FEATURE) && ENABLED(HOME_BEFORE_FILAMENT_CHANGE)) \
|
2017-11-13 08:34:19 +01:00
|
|
|
|| HAS_M206_COMMAND \
|
2017-10-02 04:34:58 +02:00
|
|
|
) || ENABLED(NO_MOTION_BEFORE_HOMING)
|
|
|
|
|
|
|
|
#if HAS_AXIS_UNHOMED_ERR
|
2017-09-08 22:35:25 +02:00
|
|
|
bool axis_unhomed_error(const bool x=true, const bool y=true, const bool z=true);
|
|
|
|
#endif
|
|
|
|
|
2017-10-02 04:34:58 +02:00
|
|
|
#if ENABLED(NO_MOTION_BEFORE_HOMING)
|
|
|
|
#define MOTION_CONDITIONS (IsRunning() && !axis_unhomed_error())
|
|
|
|
#else
|
|
|
|
#define MOTION_CONDITIONS IsRunning()
|
|
|
|
#endif
|
|
|
|
|
2017-09-08 22:35:25 +02:00
|
|
|
void set_axis_is_at_home(const AxisEnum axis);
|
|
|
|
|
2018-10-29 20:01:36 +01:00
|
|
|
void set_axis_is_not_at_home(const AxisEnum axis);
|
|
|
|
|
2017-09-08 22:35:25 +02:00
|
|
|
void homeaxis(const AxisEnum axis);
|
2018-03-01 08:37:31 +01:00
|
|
|
|
2018-02-23 07:42:42 +01:00
|
|
|
/**
|
|
|
|
* Workspace offsets
|
|
|
|
*/
|
2018-11-03 09:39:15 +01:00
|
|
|
#if HAS_HOME_OFFSET || HAS_POSITION_SHIFT
|
2017-09-08 05:33:16 +02:00
|
|
|
#if HAS_HOME_OFFSET
|
|
|
|
extern float home_offset[XYZ];
|
|
|
|
#endif
|
|
|
|
#if HAS_POSITION_SHIFT
|
|
|
|
extern float position_shift[XYZ];
|
|
|
|
#endif
|
2018-02-23 07:42:42 +01:00
|
|
|
#if HAS_HOME_OFFSET && HAS_POSITION_SHIFT
|
|
|
|
extern float workspace_offset[XYZ];
|
|
|
|
#define WORKSPACE_OFFSET(AXIS) workspace_offset[AXIS]
|
|
|
|
#elif HAS_HOME_OFFSET
|
|
|
|
#define WORKSPACE_OFFSET(AXIS) home_offset[AXIS]
|
2018-11-03 09:39:15 +01:00
|
|
|
#else
|
2018-02-23 07:42:42 +01:00
|
|
|
#define WORKSPACE_OFFSET(AXIS) position_shift[AXIS]
|
|
|
|
#endif
|
|
|
|
#define NATIVE_TO_LOGICAL(POS, AXIS) ((POS) + WORKSPACE_OFFSET(AXIS))
|
|
|
|
#define LOGICAL_TO_NATIVE(POS, AXIS) ((POS) - WORKSPACE_OFFSET(AXIS))
|
2017-09-08 05:33:16 +02:00
|
|
|
#else
|
2018-02-23 07:42:42 +01:00
|
|
|
#define NATIVE_TO_LOGICAL(POS, AXIS) (POS)
|
|
|
|
#define LOGICAL_TO_NATIVE(POS, AXIS) (POS)
|
2017-09-08 05:33:16 +02:00
|
|
|
#endif
|
2018-02-23 07:42:42 +01:00
|
|
|
#define LOGICAL_X_POSITION(POS) NATIVE_TO_LOGICAL(POS, X_AXIS)
|
|
|
|
#define LOGICAL_Y_POSITION(POS) NATIVE_TO_LOGICAL(POS, Y_AXIS)
|
|
|
|
#define LOGICAL_Z_POSITION(POS) NATIVE_TO_LOGICAL(POS, Z_AXIS)
|
|
|
|
#define RAW_X_POSITION(POS) LOGICAL_TO_NATIVE(POS, X_AXIS)
|
|
|
|
#define RAW_Y_POSITION(POS) LOGICAL_TO_NATIVE(POS, Y_AXIS)
|
|
|
|
#define RAW_Z_POSITION(POS) LOGICAL_TO_NATIVE(POS, Z_AXIS)
|
2017-09-08 05:33:16 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* position_is_reachable family of functions
|
|
|
|
*/
|
|
|
|
|
|
|
|
#if IS_KINEMATIC // (DELTA or SCARA)
|
|
|
|
|
2018-03-13 07:15:22 +01:00
|
|
|
#if IS_SCARA
|
|
|
|
extern const float L1, L2;
|
|
|
|
#endif
|
|
|
|
|
2018-11-03 09:56:33 +01:00
|
|
|
#if HAS_SCARA_OFFSET
|
|
|
|
extern float scara_home_offset[ABC]; // A and B angular offsets, Z mm offset
|
|
|
|
#endif
|
|
|
|
|
2018-03-10 04:12:05 +01:00
|
|
|
// Return true if the given point is within the printable area
|
2018-03-13 07:15:22 +01:00
|
|
|
inline bool position_is_reachable(const float &rx, const float &ry, const float inset=0) {
|
2017-09-08 05:33:16 +02:00
|
|
|
#if ENABLED(DELTA)
|
2018-03-13 07:15:22 +01:00
|
|
|
return HYPOT2(rx, ry) <= sq(DELTA_PRINTABLE_RADIUS - inset);
|
2017-09-08 05:33:16 +02:00
|
|
|
#elif IS_SCARA
|
2018-03-13 07:15:22 +01:00
|
|
|
const float R2 = HYPOT2(rx - SCARA_OFFSET_X, ry - SCARA_OFFSET_Y);
|
|
|
|
return (
|
|
|
|
R2 <= sq(L1 + L2) - inset
|
|
|
|
#if MIDDLE_DEAD_ZONE_R > 0
|
|
|
|
&& R2 >= sq(float(MIDDLE_DEAD_ZONE_R))
|
|
|
|
#endif
|
|
|
|
);
|
2017-09-08 05:33:16 +02:00
|
|
|
#endif
|
|
|
|
}
|
|
|
|
|
2018-03-13 07:15:22 +01:00
|
|
|
#if HAS_BED_PROBE
|
|
|
|
// Return true if the both nozzle and the probe can reach the given point.
|
|
|
|
// Note: This won't work on SCARA since the probe offset rotates with the arm.
|
|
|
|
inline bool position_is_reachable_by_probe(const float &rx, const float &ry) {
|
|
|
|
return position_is_reachable(rx - (X_PROBE_OFFSET_FROM_EXTRUDER), ry - (Y_PROBE_OFFSET_FROM_EXTRUDER))
|
2018-05-13 08:10:34 +02:00
|
|
|
&& position_is_reachable(rx, ry, ABS(MIN_PROBE_EDGE));
|
2018-03-13 07:15:22 +01:00
|
|
|
}
|
|
|
|
#endif
|
2017-09-08 05:33:16 +02:00
|
|
|
|
|
|
|
#else // CARTESIAN
|
|
|
|
|
2018-08-22 06:33:55 +02:00
|
|
|
// Return true if the given position is within the machine bounds.
|
2017-11-03 05:59:42 +01:00
|
|
|
inline bool position_is_reachable(const float &rx, const float &ry) {
|
2018-08-22 06:33:55 +02:00
|
|
|
if (!WITHIN(ry, Y_MIN_POS - slop, Y_MAX_POS + slop)) return false;
|
2018-08-22 02:12:26 +02:00
|
|
|
#if ENABLED(DUAL_X_CARRIAGE)
|
2018-08-22 06:33:55 +02:00
|
|
|
if (active_extruder)
|
|
|
|
return WITHIN(rx, X2_MIN_POS - slop, X2_MAX_POS + slop);
|
|
|
|
else
|
|
|
|
return WITHIN(rx, X1_MIN_POS - slop, X1_MAX_POS + slop);
|
2018-08-22 02:12:26 +02:00
|
|
|
#else
|
2018-08-22 06:33:55 +02:00
|
|
|
return WITHIN(rx, X_MIN_POS - slop, X_MAX_POS + slop);
|
2018-08-22 02:12:26 +02:00
|
|
|
#endif
|
2017-09-08 05:33:16 +02:00
|
|
|
}
|
|
|
|
|
2018-03-13 07:15:22 +01:00
|
|
|
#if HAS_BED_PROBE
|
|
|
|
/**
|
|
|
|
* Return whether the given position is within the bed, and whether the nozzle
|
|
|
|
* can reach the position required to put the probe at the given position.
|
|
|
|
*
|
|
|
|
* Example: For a probe offset of -10,+10, then for the probe to reach 0,0 the
|
|
|
|
* nozzle must be be able to reach +10,-10.
|
|
|
|
*/
|
|
|
|
inline bool position_is_reachable_by_probe(const float &rx, const float &ry) {
|
|
|
|
return position_is_reachable(rx - (X_PROBE_OFFSET_FROM_EXTRUDER), ry - (Y_PROBE_OFFSET_FROM_EXTRUDER))
|
2018-08-22 06:33:55 +02:00
|
|
|
&& WITHIN(rx, MIN_PROBE_X - slop, MAX_PROBE_X + slop)
|
|
|
|
&& WITHIN(ry, MIN_PROBE_Y - slop, MAX_PROBE_Y + slop);
|
2018-03-13 07:15:22 +01:00
|
|
|
}
|
|
|
|
#endif
|
2017-09-08 05:33:16 +02:00
|
|
|
|
|
|
|
#endif // CARTESIAN
|
|
|
|
|
2018-03-13 07:15:22 +01:00
|
|
|
#if !HAS_BED_PROBE
|
|
|
|
FORCE_INLINE bool position_is_reachable_by_probe(const float &rx, const float &ry) { return position_is_reachable(rx, ry); }
|
|
|
|
#endif
|
|
|
|
|
2017-09-08 22:35:25 +02:00
|
|
|
/**
|
|
|
|
* Dual X Carriage / Dual Nozzle
|
|
|
|
*/
|
2017-09-08 05:33:16 +02:00
|
|
|
#if ENABLED(DUAL_X_CARRIAGE) || ENABLED(DUAL_NOZZLE_DUPLICATION_MODE)
|
2018-09-04 06:15:31 +02:00
|
|
|
extern bool extruder_duplication_enabled, // Used in Dual X mode 2
|
2018-09-17 08:06:22 +02:00
|
|
|
scaled_duplication_mode; // Used in Dual X mode 3
|
2017-09-08 05:33:16 +02:00
|
|
|
#endif
|
|
|
|
|
2017-09-08 22:35:25 +02:00
|
|
|
/**
|
|
|
|
* Dual X Carriage
|
|
|
|
*/
|
2017-09-08 05:33:16 +02:00
|
|
|
#if ENABLED(DUAL_X_CARRIAGE)
|
|
|
|
|
2018-03-07 05:35:22 +01:00
|
|
|
enum DualXMode : char {
|
2018-09-17 08:06:22 +02:00
|
|
|
DXC_FULL_CONTROL_MODE,
|
|
|
|
DXC_AUTO_PARK_MODE,
|
|
|
|
DXC_DUPLICATION_MODE,
|
|
|
|
DXC_SCALED_DUPLICATION_MODE
|
2017-11-19 22:11:11 +01:00
|
|
|
};
|
|
|
|
|
2017-09-08 05:33:16 +02:00
|
|
|
extern DualXMode dual_x_carriage_mode;
|
|
|
|
extern float inactive_extruder_x_pos, // used in mode 0 & 1
|
|
|
|
raised_parked_position[XYZE], // used in mode 1
|
2018-09-02 17:18:59 +02:00
|
|
|
duplicate_extruder_x_offset; // used in mode 2 & 3
|
|
|
|
extern bool active_extruder_parked; // used in mode 1, 2 & 3
|
2017-09-08 05:33:16 +02:00
|
|
|
extern millis_t delayed_move_time; // used in mode 1
|
2018-09-02 17:18:59 +02:00
|
|
|
extern int16_t duplicate_extruder_temp_offset; // used in mode 2 & 3
|
2017-09-08 05:33:16 +02:00
|
|
|
|
2018-09-17 08:06:22 +02:00
|
|
|
FORCE_INLINE bool dxc_is_duplicating() { return dual_x_carriage_mode >= DXC_DUPLICATION_MODE; }
|
|
|
|
|
2017-09-08 05:33:16 +02:00
|
|
|
float x_home_pos(const int extruder);
|
|
|
|
|
|
|
|
FORCE_INLINE int x_home_dir(const uint8_t extruder) { return extruder ? X2_HOME_DIR : X_HOME_DIR; }
|
|
|
|
|
2017-11-19 22:11:11 +01:00
|
|
|
#elif ENABLED(DUAL_NOZZLE_DUPLICATION_MODE)
|
|
|
|
|
2018-03-07 05:35:22 +01:00
|
|
|
enum DualXMode : char {
|
2017-11-19 22:11:11 +01:00
|
|
|
DXC_DUPLICATION_MODE = 2
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|
2017-09-08 05:33:16 +02:00
|
|
|
|
2017-09-08 22:35:25 +02:00
|
|
|
#if HAS_M206_COMMAND
|
|
|
|
void set_home_offset(const AxisEnum axis, const float v);
|
|
|
|
#endif
|