|
|
@ -389,7 +389,7 @@ static const char *injected_commands_P = NULL; |
|
|
|
* Feed rates are often configured with mm/m |
|
|
|
* but the planner and stepper like mm/s units. |
|
|
|
*/ |
|
|
|
float constexpr homing_feedrate_mm_s[] = { |
|
|
|
static const float homing_feedrate_mm_s[] PROGMEM = { |
|
|
|
#if ENABLED(DELTA) |
|
|
|
MMM_TO_MMS(HOMING_FEEDRATE_Z), MMM_TO_MMS(HOMING_FEEDRATE_Z), |
|
|
|
#else |
|
|
@ -397,6 +397,8 @@ float constexpr homing_feedrate_mm_s[] = { |
|
|
|
#endif |
|
|
|
MMM_TO_MMS(HOMING_FEEDRATE_Z), 0 |
|
|
|
}; |
|
|
|
FORCE_INLINE float homing_feedrate(const AxisEnum a) { return pgm_read_float(&homing_feedrate_mm_s[a]); } |
|
|
|
|
|
|
|
float feedrate_mm_s = MMM_TO_MMS(1500.0); |
|
|
|
static float saved_feedrate_mm_s; |
|
|
|
int feedrate_percentage = 100, saved_feedrate_percentage, |
|
|
@ -458,7 +460,7 @@ volatile bool wait_for_heatup = true; |
|
|
|
volatile bool wait_for_user = false; |
|
|
|
#endif |
|
|
|
|
|
|
|
const char axis_codes[XYZE] = {'X', 'Y', 'Z', 'E'}; |
|
|
|
const char axis_codes[XYZE] = { 'X', 'Y', 'Z', 'E' }; |
|
|
|
|
|
|
|
// Number of characters read in the current line of serial input
|
|
|
|
static int serial_count = 0; |
|
|
@ -660,8 +662,8 @@ static bool send_ok[BUFSIZE]; |
|
|
|
#define host_keepalive() NOOP |
|
|
|
#endif |
|
|
|
|
|
|
|
static inline float pgm_read_any(const float *p) { return pgm_read_float_near(p); } |
|
|
|
static inline signed char pgm_read_any(const signed char *p) { return pgm_read_byte_near(p); } |
|
|
|
FORCE_INLINE float pgm_read_any(const float *p) { return pgm_read_float_near(p); } |
|
|
|
FORCE_INLINE signed char pgm_read_any(const signed char *p) { return pgm_read_byte_near(p); } |
|
|
|
|
|
|
|
#define XYZ_CONSTS_FROM_CONFIG(type, array, CONFIG) \ |
|
|
|
static const PROGMEM type array##_P[XYZ] = { X_##CONFIG, Y_##CONFIG, Z_##CONFIG }; \ |
|
|
@ -780,7 +782,7 @@ extern "C" { |
|
|
|
#endif // !SDSUPPORT
|
|
|
|
|
|
|
|
#if ENABLED(DIGIPOT_I2C) |
|
|
|
extern void digipot_i2c_set_current(int channel, float current); |
|
|
|
extern void digipot_i2c_set_current(uint8_t channel, float current); |
|
|
|
extern void digipot_i2c_init(); |
|
|
|
#endif |
|
|
|
|
|
|
@ -1394,7 +1396,7 @@ bool get_target_extruder_from_command(int code) { |
|
|
|
* |
|
|
|
* Callers must sync the planner position after calling this! |
|
|
|
*/ |
|
|
|
static void set_axis_is_at_home(AxisEnum axis) { |
|
|
|
static void set_axis_is_at_home(const AxisEnum axis) { |
|
|
|
#if ENABLED(DEBUG_LEVELING_FEATURE) |
|
|
|
if (DEBUGGING(LEVELING)) { |
|
|
|
SERIAL_ECHOPAIR(">>> set_axis_is_at_home(", axis_codes[axis]); |
|
|
@ -1496,31 +1498,30 @@ static void set_axis_is_at_home(AxisEnum axis) { |
|
|
|
/**
|
|
|
|
* Some planner shorthand inline functions |
|
|
|
*/ |
|
|
|
inline float get_homing_bump_feedrate(AxisEnum axis) { |
|
|
|
int constexpr homing_bump_divisor[] = HOMING_BUMP_DIVISOR; |
|
|
|
int hbd = homing_bump_divisor[axis]; |
|
|
|
inline float get_homing_bump_feedrate(const AxisEnum axis) { |
|
|
|
const uint8_t homing_bump_divisor[] PROGMEM = HOMING_BUMP_DIVISOR; |
|
|
|
uint8_t hbd = pgm_read_byte(&homing_bump_divisor[axis]); |
|
|
|
if (hbd < 1) { |
|
|
|
hbd = 10; |
|
|
|
SERIAL_ECHO_START; |
|
|
|
SERIAL_ECHOLNPGM("Warning: Homing Bump Divisor < 1"); |
|
|
|
} |
|
|
|
return homing_feedrate_mm_s[axis] / hbd; |
|
|
|
return homing_feedrate(axis) / hbd; |
|
|
|
} |
|
|
|
|
|
|
|
//
|
|
|
|
// line_to_current_position
|
|
|
|
// Move the planner to the current position from wherever it last moved
|
|
|
|
// (or from wherever it has been told it is located).
|
|
|
|
//
|
|
|
|
/**
|
|
|
|
* Move the planner to the current position from wherever it last moved |
|
|
|
* (or from wherever it has been told it is located). |
|
|
|
*/ |
|
|
|
inline void line_to_current_position() { |
|
|
|
planner.buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS], feedrate_mm_s, active_extruder); |
|
|
|
} |
|
|
|
|
|
|
|
//
|
|
|
|
// line_to_destination
|
|
|
|
// Move the planner, not necessarily synced with current_position
|
|
|
|
//
|
|
|
|
inline void line_to_destination(float fr_mm_s) { |
|
|
|
/**
|
|
|
|
* 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. |
|
|
|
*/ |
|
|
|
inline void line_to_destination(const float fr_mm_s) { |
|
|
|
planner.buffer_line(destination[X_AXIS], destination[Y_AXIS], destination[Z_AXIS], destination[E_AXIS], fr_mm_s, active_extruder); |
|
|
|
} |
|
|
|
inline void line_to_destination() { line_to_destination(feedrate_mm_s); } |
|
|
@ -1560,16 +1561,16 @@ inline void set_destination_to_current() { COPY(destination, current_position); |
|
|
|
* Plan a move to (X, Y, Z) and set the current_position |
|
|
|
* The final current_position may not be the one that was requested |
|
|
|
*/ |
|
|
|
void do_blocking_move_to(const float &x, const float &y, const float &z, const float &fr_mm_s /*=0.0*/) { |
|
|
|
void do_blocking_move_to(const float &lx, const float &ly, const float &lz, const float &fr_mm_s/*=0.0*/) { |
|
|
|
const float old_feedrate_mm_s = feedrate_mm_s; |
|
|
|
|
|
|
|
#if ENABLED(DEBUG_LEVELING_FEATURE) |
|
|
|
if (DEBUGGING(LEVELING)) print_xyz(PSTR(">>> do_blocking_move_to"), NULL, x, y, z); |
|
|
|
if (DEBUGGING(LEVELING)) print_xyz(PSTR(">>> do_blocking_move_to"), NULL, lx, ly, lz); |
|
|
|
#endif |
|
|
|
|
|
|
|
#if ENABLED(DELTA) |
|
|
|
|
|
|
|
if (!position_is_reachable_xy(x, y)) return; |
|
|
|
if (!position_is_reachable_xy(lx, ly)) return; |
|
|
|
|
|
|
|
feedrate_mm_s = fr_mm_s ? fr_mm_s : XY_PROBE_FEEDRATE_MM_S; |
|
|
|
|
|
|
@ -1581,10 +1582,10 @@ void do_blocking_move_to(const float &x, const float &y, const float &z, const f |
|
|
|
|
|
|
|
// when in the danger zone
|
|
|
|
if (current_position[Z_AXIS] > delta_clip_start_height) { |
|
|
|
if (z > delta_clip_start_height) { // staying in the danger zone
|
|
|
|
destination[X_AXIS] = x; // move directly (uninterpolated)
|
|
|
|
destination[Y_AXIS] = y; |
|
|
|
destination[Z_AXIS] = z; |
|
|
|
if (lz > delta_clip_start_height) { // staying in the danger zone
|
|
|
|
destination[X_AXIS] = lx; // move directly (uninterpolated)
|
|
|
|
destination[Y_AXIS] = ly; |
|
|
|
destination[Z_AXIS] = lz; |
|
|
|
prepare_uninterpolated_move_to_destination(); // set_current_to_destination
|
|
|
|
#if ENABLED(DEBUG_LEVELING_FEATURE) |
|
|
|
if (DEBUGGING(LEVELING)) DEBUG_POS("danger zone move", current_position); |
|
|
@ -1600,23 +1601,23 @@ void do_blocking_move_to(const float &x, const float &y, const float &z, const f |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
if (z > current_position[Z_AXIS]) { // raising?
|
|
|
|
destination[Z_AXIS] = z; |
|
|
|
if (lz > current_position[Z_AXIS]) { // raising?
|
|
|
|
destination[Z_AXIS] = lz; |
|
|
|
prepare_uninterpolated_move_to_destination(); // set_current_to_destination
|
|
|
|
#if ENABLED(DEBUG_LEVELING_FEATURE) |
|
|
|
if (DEBUGGING(LEVELING)) DEBUG_POS("z raise move", current_position); |
|
|
|
#endif |
|
|
|
} |
|
|
|
|
|
|
|
destination[X_AXIS] = x; |
|
|
|
destination[Y_AXIS] = y; |
|
|
|
destination[X_AXIS] = lx; |
|
|
|
destination[Y_AXIS] = ly; |
|
|
|
prepare_move_to_destination(); // set_current_to_destination
|
|
|
|
#if ENABLED(DEBUG_LEVELING_FEATURE) |
|
|
|
if (DEBUGGING(LEVELING)) DEBUG_POS("xy move", current_position); |
|
|
|
#endif |
|
|
|
|
|
|
|
if (z < current_position[Z_AXIS]) { // lowering?
|
|
|
|
destination[Z_AXIS] = z; |
|
|
|
if (lz < current_position[Z_AXIS]) { // lowering?
|
|
|
|
destination[Z_AXIS] = lz; |
|
|
|
prepare_uninterpolated_move_to_destination(); // set_current_to_destination
|
|
|
|
#if ENABLED(DEBUG_LEVELING_FEATURE) |
|
|
|
if (DEBUGGING(LEVELING)) DEBUG_POS("z lower move", current_position); |
|
|
@ -1625,44 +1626,44 @@ void do_blocking_move_to(const float &x, const float &y, const float &z, const f |
|
|
|
|
|
|
|
#elif IS_SCARA |
|
|
|
|
|
|
|
if (!position_is_reachable_xy(x, y)) return; |
|
|
|
if (!position_is_reachable_xy(lx, ly)) return; |
|
|
|
|
|
|
|
set_destination_to_current(); |
|
|
|
|
|
|
|
// If Z needs to raise, do it before moving XY
|
|
|
|
if (destination[Z_AXIS] < z) { |
|
|
|
destination[Z_AXIS] = z; |
|
|
|
prepare_uninterpolated_move_to_destination(fr_mm_s ? fr_mm_s : homing_feedrate_mm_s[Z_AXIS]); |
|
|
|
if (destination[Z_AXIS] < lz) { |
|
|
|
destination[Z_AXIS] = lz; |
|
|
|
prepare_uninterpolated_move_to_destination(fr_mm_s ? fr_mm_s : homing_feedrate(Z_AXIS)); |
|
|
|
} |
|
|
|
|
|
|
|
destination[X_AXIS] = x; |
|
|
|
destination[Y_AXIS] = y; |
|
|
|
destination[X_AXIS] = lx; |
|
|
|
destination[Y_AXIS] = ly; |
|
|
|
prepare_uninterpolated_move_to_destination(fr_mm_s ? fr_mm_s : XY_PROBE_FEEDRATE_MM_S); |
|
|
|
|
|
|
|
// If Z needs to lower, do it after moving XY
|
|
|
|
if (destination[Z_AXIS] > z) { |
|
|
|
destination[Z_AXIS] = z; |
|
|
|
prepare_uninterpolated_move_to_destination(fr_mm_s ? fr_mm_s : homing_feedrate_mm_s[Z_AXIS]); |
|
|
|
if (destination[Z_AXIS] > lz) { |
|
|
|
destination[Z_AXIS] = lz; |
|
|
|
prepare_uninterpolated_move_to_destination(fr_mm_s ? fr_mm_s : homing_feedrate(Z_AXIS)); |
|
|
|
} |
|
|
|
|
|
|
|
#else |
|
|
|
|
|
|
|
// If Z needs to raise, do it before moving XY
|
|
|
|
if (current_position[Z_AXIS] < z) { |
|
|
|
feedrate_mm_s = fr_mm_s ? fr_mm_s : homing_feedrate_mm_s[Z_AXIS]; |
|
|
|
current_position[Z_AXIS] = z; |
|
|
|
if (current_position[Z_AXIS] < lz) { |
|
|
|
feedrate_mm_s = fr_mm_s ? fr_mm_s : homing_feedrate(Z_AXIS); |
|
|
|
current_position[Z_AXIS] = lz; |
|
|
|
line_to_current_position(); |
|
|
|
} |
|
|
|
|
|
|
|
feedrate_mm_s = fr_mm_s ? fr_mm_s : XY_PROBE_FEEDRATE_MM_S; |
|
|
|
current_position[X_AXIS] = x; |
|
|
|
current_position[Y_AXIS] = y; |
|
|
|
current_position[X_AXIS] = lx; |
|
|
|
current_position[Y_AXIS] = ly; |
|
|
|
line_to_current_position(); |
|
|
|
|
|
|
|
// If Z needs to lower, do it after moving XY
|
|
|
|
if (current_position[Z_AXIS] > z) { |
|
|
|
feedrate_mm_s = fr_mm_s ? fr_mm_s : homing_feedrate_mm_s[Z_AXIS]; |
|
|
|
current_position[Z_AXIS] = z; |
|
|
|
if (current_position[Z_AXIS] > lz) { |
|
|
|
feedrate_mm_s = fr_mm_s ? fr_mm_s : homing_feedrate(Z_AXIS); |
|
|
|
current_position[Z_AXIS] = lz; |
|
|
|
line_to_current_position(); |
|
|
|
} |
|
|
|
|
|
|
@ -1676,14 +1677,14 @@ void do_blocking_move_to(const float &x, const float &y, const float &z, const f |
|
|
|
if (DEBUGGING(LEVELING)) SERIAL_ECHOLNPGM("<<< do_blocking_move_to"); |
|
|
|
#endif |
|
|
|
} |
|
|
|
void do_blocking_move_to_x(const float &x, const float &fr_mm_s/*=0.0*/) { |
|
|
|
do_blocking_move_to(x, current_position[Y_AXIS], current_position[Z_AXIS], fr_mm_s); |
|
|
|
void do_blocking_move_to_x(const float &lx, const float &fr_mm_s/*=0.0*/) { |
|
|
|
do_blocking_move_to(lx, current_position[Y_AXIS], current_position[Z_AXIS], fr_mm_s); |
|
|
|
} |
|
|
|
void do_blocking_move_to_z(const float &z, const float &fr_mm_s/*=0.0*/) { |
|
|
|
do_blocking_move_to(current_position[X_AXIS], current_position[Y_AXIS], z, fr_mm_s); |
|
|
|
void do_blocking_move_to_z(const float &lz, const float &fr_mm_s/*=0.0*/) { |
|
|
|
do_blocking_move_to(current_position[X_AXIS], current_position[Y_AXIS], lz, fr_mm_s); |
|
|
|
} |
|
|
|
void do_blocking_move_to_xy(const float &x, const float &y, const float &fr_mm_s/*=0.0*/) { |
|
|
|
do_blocking_move_to(x, y, current_position[Z_AXIS], fr_mm_s); |
|
|
|
void do_blocking_move_to_xy(const float &lx, const float &ly, const float &fr_mm_s/*=0.0*/) { |
|
|
|
do_blocking_move_to(lx, ly, current_position[Z_AXIS], fr_mm_s); |
|
|
|
} |
|
|
|
|
|
|
|
//
|
|
|
@ -1718,7 +1719,7 @@ static void clean_up_after_endstop_or_probe_move() { |
|
|
|
/**
|
|
|
|
* Raise Z to a minimum height to make room for a probe to move |
|
|
|
*/ |
|
|
|
inline void do_probe_raise(float z_raise) { |
|
|
|
inline void do_probe_raise(const float z_raise) { |
|
|
|
#if ENABLED(DEBUG_LEVELING_FEATURE) |
|
|
|
if (DEBUGGING(LEVELING)) { |
|
|
|
SERIAL_ECHOPAIR("do_probe_raise(", z_raise); |
|
|
@ -1800,6 +1801,10 @@ static void clean_up_after_endstop_or_probe_move() { |
|
|
|
|
|
|
|
#elif ENABLED(Z_PROBE_ALLEN_KEY) |
|
|
|
|
|
|
|
FORCE_INLINE void do_blocking_move_to(const float logical[XYZ], const float &fr_mm_s) { |
|
|
|
do_blocking_move_to(logical[X_AXIS], logical[Y_AXIS], logical[Z_AXIS], fr_mm_s); |
|
|
|
} |
|
|
|
|
|
|
|
void run_deploy_moves_script() { |
|
|
|
#if defined(Z_PROBE_ALLEN_KEY_DEPLOY_1_X) || defined(Z_PROBE_ALLEN_KEY_DEPLOY_1_Y) || defined(Z_PROBE_ALLEN_KEY_DEPLOY_1_Z) |
|
|
|
#ifndef Z_PROBE_ALLEN_KEY_DEPLOY_1_X |
|
|
@ -1814,7 +1819,8 @@ static void clean_up_after_endstop_or_probe_move() { |
|
|
|
#ifndef Z_PROBE_ALLEN_KEY_DEPLOY_1_FEEDRATE |
|
|
|
#define Z_PROBE_ALLEN_KEY_DEPLOY_1_FEEDRATE 0.0 |
|
|
|
#endif |
|
|
|
do_blocking_move_to(Z_PROBE_ALLEN_KEY_DEPLOY_1_X, Z_PROBE_ALLEN_KEY_DEPLOY_1_Y, Z_PROBE_ALLEN_KEY_DEPLOY_1_Z, MMM_TO_MMS(Z_PROBE_ALLEN_KEY_DEPLOY_1_FEEDRATE)); |
|
|
|
const float deploy_1[] = { Z_PROBE_ALLEN_KEY_DEPLOY_1_X, Z_PROBE_ALLEN_KEY_DEPLOY_1_Y, Z_PROBE_ALLEN_KEY_DEPLOY_1_Z }; |
|
|
|
do_blocking_move_to(deploy_1, MMM_TO_MMS(Z_PROBE_ALLEN_KEY_DEPLOY_1_FEEDRATE)); |
|
|
|
#endif |
|
|
|
#if defined(Z_PROBE_ALLEN_KEY_DEPLOY_2_X) || defined(Z_PROBE_ALLEN_KEY_DEPLOY_2_Y) || defined(Z_PROBE_ALLEN_KEY_DEPLOY_2_Z) |
|
|
|
#ifndef Z_PROBE_ALLEN_KEY_DEPLOY_2_X |
|
|
@ -1829,7 +1835,8 @@ static void clean_up_after_endstop_or_probe_move() { |
|
|
|
#ifndef Z_PROBE_ALLEN_KEY_DEPLOY_2_FEEDRATE |
|
|
|
#define Z_PROBE_ALLEN_KEY_DEPLOY_2_FEEDRATE 0.0 |
|
|
|
#endif |
|
|
|
do_blocking_move_to(Z_PROBE_ALLEN_KEY_DEPLOY_2_X, Z_PROBE_ALLEN_KEY_DEPLOY_2_Y, Z_PROBE_ALLEN_KEY_DEPLOY_2_Z, MMM_TO_MMS(Z_PROBE_ALLEN_KEY_DEPLOY_2_FEEDRATE)); |
|
|
|
const float deploy_2[] = { Z_PROBE_ALLEN_KEY_DEPLOY_2_X, Z_PROBE_ALLEN_KEY_DEPLOY_2_Y, Z_PROBE_ALLEN_KEY_DEPLOY_2_Z }; |
|
|
|
do_blocking_move_to(deploy_2, MMM_TO_MMS(Z_PROBE_ALLEN_KEY_DEPLOY_2_FEEDRATE)); |
|
|
|
#endif |
|
|
|
#if defined(Z_PROBE_ALLEN_KEY_DEPLOY_3_X) || defined(Z_PROBE_ALLEN_KEY_DEPLOY_3_Y) || defined(Z_PROBE_ALLEN_KEY_DEPLOY_3_Z) |
|
|
|
#ifndef Z_PROBE_ALLEN_KEY_DEPLOY_3_X |
|
|
@ -1844,7 +1851,8 @@ static void clean_up_after_endstop_or_probe_move() { |
|
|
|
#ifndef Z_PROBE_ALLEN_KEY_DEPLOY_3_FEEDRATE |
|
|
|
#define Z_PROBE_ALLEN_KEY_DEPLOY_3_FEEDRATE 0.0 |
|
|
|
#endif |
|
|
|
do_blocking_move_to(Z_PROBE_ALLEN_KEY_DEPLOY_3_X, Z_PROBE_ALLEN_KEY_DEPLOY_3_Y, Z_PROBE_ALLEN_KEY_DEPLOY_3_Z, MMM_TO_MMS(Z_PROBE_ALLEN_KEY_DEPLOY_3_FEEDRATE)); |
|
|
|
const float deploy_3[] = { Z_PROBE_ALLEN_KEY_DEPLOY_3_X, Z_PROBE_ALLEN_KEY_DEPLOY_3_Y, Z_PROBE_ALLEN_KEY_DEPLOY_3_Z }; |
|
|
|
do_blocking_move_to(deploy_3, MMM_TO_MMS(Z_PROBE_ALLEN_KEY_DEPLOY_3_FEEDRATE)); |
|
|
|
#endif |
|
|
|
#if defined(Z_PROBE_ALLEN_KEY_DEPLOY_4_X) || defined(Z_PROBE_ALLEN_KEY_DEPLOY_4_Y) || defined(Z_PROBE_ALLEN_KEY_DEPLOY_4_Z) |
|
|
|
#ifndef Z_PROBE_ALLEN_KEY_DEPLOY_4_X |
|
|
@ -1859,7 +1867,8 @@ static void clean_up_after_endstop_or_probe_move() { |
|
|
|
#ifndef Z_PROBE_ALLEN_KEY_DEPLOY_4_FEEDRATE |
|
|
|
#define Z_PROBE_ALLEN_KEY_DEPLOY_4_FEEDRATE 0.0 |
|
|
|
#endif |
|
|
|
do_blocking_move_to(Z_PROBE_ALLEN_KEY_DEPLOY_4_X, Z_PROBE_ALLEN_KEY_DEPLOY_4_Y, Z_PROBE_ALLEN_KEY_DEPLOY_4_Z, MMM_TO_MMS(Z_PROBE_ALLEN_KEY_DEPLOY_4_FEEDRATE)); |
|
|
|
const float deploy_4[] = { Z_PROBE_ALLEN_KEY_DEPLOY_4_X, Z_PROBE_ALLEN_KEY_DEPLOY_4_Y, Z_PROBE_ALLEN_KEY_DEPLOY_4_Z }; |
|
|
|
do_blocking_move_to(deploy_4, MMM_TO_MMS(Z_PROBE_ALLEN_KEY_DEPLOY_4_FEEDRATE)); |
|
|
|
#endif |
|
|
|
#if defined(Z_PROBE_ALLEN_KEY_DEPLOY_5_X) || defined(Z_PROBE_ALLEN_KEY_DEPLOY_5_Y) || defined(Z_PROBE_ALLEN_KEY_DEPLOY_5_Z) |
|
|
|
#ifndef Z_PROBE_ALLEN_KEY_DEPLOY_5_X |
|
|
@ -1874,7 +1883,8 @@ static void clean_up_after_endstop_or_probe_move() { |
|
|
|
#ifndef Z_PROBE_ALLEN_KEY_DEPLOY_5_FEEDRATE |
|
|
|
#define Z_PROBE_ALLEN_KEY_DEPLOY_5_FEEDRATE 0.0 |
|
|
|
#endif |
|
|
|
do_blocking_move_to(Z_PROBE_ALLEN_KEY_DEPLOY_5_X, Z_PROBE_ALLEN_KEY_DEPLOY_5_Y, Z_PROBE_ALLEN_KEY_DEPLOY_5_Z, MMM_TO_MMS(Z_PROBE_ALLEN_KEY_DEPLOY_5_FEEDRATE)); |
|
|
|
const float deploy_5[] = { Z_PROBE_ALLEN_KEY_DEPLOY_5_X, Z_PROBE_ALLEN_KEY_DEPLOY_5_Y, Z_PROBE_ALLEN_KEY_DEPLOY_5_Z }; |
|
|
|
do_blocking_move_to(deploy_5, MMM_TO_MMS(Z_PROBE_ALLEN_KEY_DEPLOY_5_FEEDRATE)); |
|
|
|
#endif |
|
|
|
} |
|
|
|
|
|
|
@ -1892,7 +1902,8 @@ static void clean_up_after_endstop_or_probe_move() { |
|
|
|
#ifndef Z_PROBE_ALLEN_KEY_STOW_1_FEEDRATE |
|
|
|
#define Z_PROBE_ALLEN_KEY_STOW_1_FEEDRATE 0.0 |
|
|
|
#endif |
|
|
|
do_blocking_move_to(Z_PROBE_ALLEN_KEY_STOW_1_X, Z_PROBE_ALLEN_KEY_STOW_1_Y, Z_PROBE_ALLEN_KEY_STOW_1_Z, MMM_TO_MMS(Z_PROBE_ALLEN_KEY_STOW_1_FEEDRATE)); |
|
|
|
const float stow_1[] = { Z_PROBE_ALLEN_KEY_STOW_1_X, Z_PROBE_ALLEN_KEY_STOW_1_Y, Z_PROBE_ALLEN_KEY_STOW_1_Z }; |
|
|
|
do_blocking_move_to(stow_1, MMM_TO_MMS(Z_PROBE_ALLEN_KEY_STOW_1_FEEDRATE)); |
|
|
|
#endif |
|
|
|
#if defined(Z_PROBE_ALLEN_KEY_STOW_2_X) || defined(Z_PROBE_ALLEN_KEY_STOW_2_Y) || defined(Z_PROBE_ALLEN_KEY_STOW_2_Z) |
|
|
|
#ifndef Z_PROBE_ALLEN_KEY_STOW_2_X |
|
|
@ -1907,7 +1918,8 @@ static void clean_up_after_endstop_or_probe_move() { |
|
|
|
#ifndef Z_PROBE_ALLEN_KEY_STOW_2_FEEDRATE |
|
|
|
#define Z_PROBE_ALLEN_KEY_STOW_2_FEEDRATE 0.0 |
|
|
|
#endif |
|
|
|
do_blocking_move_to(Z_PROBE_ALLEN_KEY_STOW_2_X, Z_PROBE_ALLEN_KEY_STOW_2_Y, Z_PROBE_ALLEN_KEY_STOW_2_Z, MMM_TO_MMS(Z_PROBE_ALLEN_KEY_STOW_2_FEEDRATE)); |
|
|
|
const float stow_2[] = { Z_PROBE_ALLEN_KEY_STOW_2_X, Z_PROBE_ALLEN_KEY_STOW_2_Y, Z_PROBE_ALLEN_KEY_STOW_2_Z }; |
|
|
|
do_blocking_move_to(stow_2, MMM_TO_MMS(Z_PROBE_ALLEN_KEY_STOW_2_FEEDRATE)); |
|
|
|
#endif |
|
|
|
#if defined(Z_PROBE_ALLEN_KEY_STOW_3_X) || defined(Z_PROBE_ALLEN_KEY_STOW_3_Y) || defined(Z_PROBE_ALLEN_KEY_STOW_3_Z) |
|
|
|
#ifndef Z_PROBE_ALLEN_KEY_STOW_3_X |
|
|
@ -1922,7 +1934,8 @@ static void clean_up_after_endstop_or_probe_move() { |
|
|
|
#ifndef Z_PROBE_ALLEN_KEY_STOW_3_FEEDRATE |
|
|
|
#define Z_PROBE_ALLEN_KEY_STOW_3_FEEDRATE 0.0 |
|
|
|
#endif |
|
|
|
do_blocking_move_to(Z_PROBE_ALLEN_KEY_STOW_3_X, Z_PROBE_ALLEN_KEY_STOW_3_Y, Z_PROBE_ALLEN_KEY_STOW_3_Z, MMM_TO_MMS(Z_PROBE_ALLEN_KEY_STOW_3_FEEDRATE)); |
|
|
|
const float stow_3[] = { Z_PROBE_ALLEN_KEY_STOW_3_X, Z_PROBE_ALLEN_KEY_STOW_3_Y, Z_PROBE_ALLEN_KEY_STOW_3_Z }; |
|
|
|
do_blocking_move_to(stow_3, MMM_TO_MMS(Z_PROBE_ALLEN_KEY_STOW_3_FEEDRATE)); |
|
|
|
#endif |
|
|
|
#if defined(Z_PROBE_ALLEN_KEY_STOW_4_X) || defined(Z_PROBE_ALLEN_KEY_STOW_4_Y) || defined(Z_PROBE_ALLEN_KEY_STOW_4_Z) |
|
|
|
#ifndef Z_PROBE_ALLEN_KEY_STOW_4_X |
|
|
@ -1937,7 +1950,8 @@ static void clean_up_after_endstop_or_probe_move() { |
|
|
|
#ifndef Z_PROBE_ALLEN_KEY_STOW_4_FEEDRATE |
|
|
|
#define Z_PROBE_ALLEN_KEY_STOW_4_FEEDRATE 0.0 |
|
|
|
#endif |
|
|
|
do_blocking_move_to(Z_PROBE_ALLEN_KEY_STOW_4_X, Z_PROBE_ALLEN_KEY_STOW_4_Y, Z_PROBE_ALLEN_KEY_STOW_4_Z, MMM_TO_MMS(Z_PROBE_ALLEN_KEY_STOW_4_FEEDRATE)); |
|
|
|
const float stow_4[] = { Z_PROBE_ALLEN_KEY_STOW_4_X, Z_PROBE_ALLEN_KEY_STOW_4_Y, Z_PROBE_ALLEN_KEY_STOW_4_Z }; |
|
|
|
do_blocking_move_to(stow_4, MMM_TO_MMS(Z_PROBE_ALLEN_KEY_STOW_4_FEEDRATE)); |
|
|
|
#endif |
|
|
|
#if defined(Z_PROBE_ALLEN_KEY_STOW_5_X) || defined(Z_PROBE_ALLEN_KEY_STOW_5_Y) || defined(Z_PROBE_ALLEN_KEY_STOW_5_Z) |
|
|
|
#ifndef Z_PROBE_ALLEN_KEY_STOW_5_X |
|
|
@ -1952,7 +1966,8 @@ static void clean_up_after_endstop_or_probe_move() { |
|
|
|
#ifndef Z_PROBE_ALLEN_KEY_STOW_5_FEEDRATE |
|
|
|
#define Z_PROBE_ALLEN_KEY_STOW_5_FEEDRATE 0.0 |
|
|
|
#endif |
|
|
|
do_blocking_move_to(Z_PROBE_ALLEN_KEY_STOW_5_X, Z_PROBE_ALLEN_KEY_STOW_5_Y, Z_PROBE_ALLEN_KEY_STOW_5_Z, MMM_TO_MMS(Z_PROBE_ALLEN_KEY_STOW_5_FEEDRATE)); |
|
|
|
const float stow_5[] = { Z_PROBE_ALLEN_KEY_STOW_5_X, Z_PROBE_ALLEN_KEY_STOW_5_Y, Z_PROBE_ALLEN_KEY_STOW_5_Z }; |
|
|
|
do_blocking_move_to(stow_5, MMM_TO_MMS(Z_PROBE_ALLEN_KEY_STOW_5_FEEDRATE)); |
|
|
|
#endif |
|
|
|
} |
|
|
|
|
|
|
@ -2751,7 +2766,7 @@ static void clean_up_after_endstop_or_probe_move() { |
|
|
|
/**
|
|
|
|
* Home an individual linear axis |
|
|
|
*/ |
|
|
|
static void do_homing_move(const AxisEnum axis, float distance, float fr_mm_s=0.0) { |
|
|
|
static void do_homing_move(const AxisEnum axis, const float distance, const float fr_mm_s=0.0) { |
|
|
|
|
|
|
|
#if ENABLED(DEBUG_LEVELING_FEATURE) |
|
|
|
if (DEBUGGING(LEVELING)) { |
|
|
@ -2779,11 +2794,11 @@ static void do_homing_move(const AxisEnum axis, float distance, float fr_mm_s=0. |
|
|
|
SYNC_PLAN_POSITION_KINEMATIC(); |
|
|
|
current_position[axis] = distance; |
|
|
|
inverse_kinematics(current_position); |
|
|
|
planner.buffer_line(delta[A_AXIS], delta[B_AXIS], delta[C_AXIS], current_position[E_AXIS], fr_mm_s ? fr_mm_s : homing_feedrate_mm_s[axis], active_extruder); |
|
|
|
planner.buffer_line(delta[A_AXIS], delta[B_AXIS], delta[C_AXIS], current_position[E_AXIS], fr_mm_s ? fr_mm_s : homing_feedrate(axis), active_extruder); |
|
|
|
#else |
|
|
|
sync_plan_position(); |
|
|
|
current_position[axis] = distance; |
|
|
|
planner.buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS], fr_mm_s ? fr_mm_s : homing_feedrate_mm_s[axis], active_extruder); |
|
|
|
planner.buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS], fr_mm_s ? fr_mm_s : homing_feedrate(axis), active_extruder); |
|
|
|
#endif |
|
|
|
|
|
|
|
stepper.synchronize(); |
|
|
@ -3398,7 +3413,7 @@ inline void gcode_G4() { |
|
|
|
const float mlx = max_length(X_AXIS), |
|
|
|
mly = max_length(Y_AXIS), |
|
|
|
mlratio = mlx > mly ? mly / mlx : mlx / mly, |
|
|
|
fr_mm_s = min(homing_feedrate_mm_s[X_AXIS], homing_feedrate_mm_s[Y_AXIS]) * sqrt(sq(mlratio) + 1.0); |
|
|
|
fr_mm_s = min(homing_feedrate(X_AXIS), homing_feedrate(Y_AXIS)) * sqrt(sq(mlratio) + 1.0); |
|
|
|
|
|
|
|
do_blocking_move_to_xy(1.5 * mlx * x_axis_home_dir, 1.5 * mly * home_dir(Y_AXIS), fr_mm_s); |
|
|
|
endstops.hit_on_purpose(); // clear endstop hit flags
|
|
|
@ -3541,7 +3556,7 @@ inline void gcode_G4() { |
|
|
|
|
|
|
|
// Move all carriages together linearly until an endstop is hit.
|
|
|
|
current_position[X_AXIS] = current_position[Y_AXIS] = current_position[Z_AXIS] = (Z_MAX_LENGTH + 10); |
|
|
|
feedrate_mm_s = homing_feedrate_mm_s[X_AXIS]; |
|
|
|
feedrate_mm_s = homing_feedrate(X_AXIS); |
|
|
|
line_to_current_position(); |
|
|
|
stepper.synchronize(); |
|
|
|
endstops.hit_on_purpose(); // clear endstop hit flags
|
|
|
@ -3854,7 +3869,7 @@ void home_all_axes() { gcode_G28(true); } |
|
|
|
const float old_feedrate_mm_s = feedrate_mm_s; |
|
|
|
|
|
|
|
#if MANUAL_PROBE_HEIGHT > 0 |
|
|
|
feedrate_mm_s = homing_feedrate_mm_s[Z_AXIS]; |
|
|
|
feedrate_mm_s = homing_feedrate(Z_AXIS); |
|
|
|
current_position[Z_AXIS] = LOGICAL_Z_POSITION(Z_MIN_POS) + MANUAL_PROBE_HEIGHT; |
|
|
|
line_to_current_position(); |
|
|
|
#endif |
|
|
@ -3865,7 +3880,7 @@ void home_all_axes() { gcode_G28(true); } |
|
|
|
line_to_current_position(); |
|
|
|
|
|
|
|
#if MANUAL_PROBE_HEIGHT > 0 |
|
|
|
feedrate_mm_s = homing_feedrate_mm_s[Z_AXIS]; |
|
|
|
feedrate_mm_s = homing_feedrate(Z_AXIS); |
|
|
|
current_position[Z_AXIS] = LOGICAL_Z_POSITION(Z_MIN_POS); // just slightly over the bed
|
|
|
|
line_to_current_position(); |
|
|
|
#endif |
|
|
@ -3901,7 +3916,7 @@ void home_all_axes() { gcode_G28(true); } |
|
|
|
#if ENABLED(MESH_G28_REST_ORIGIN) |
|
|
|
current_position[Z_AXIS] = LOGICAL_Z_POSITION(Z_MIN_POS); |
|
|
|
set_destination_to_current(); |
|
|
|
line_to_destination(homing_feedrate_mm_s[Z_AXIS]); |
|
|
|
line_to_destination(homing_feedrate(Z_AXIS)); |
|
|
|
stepper.synchronize(); |
|
|
|
#endif |
|
|
|
} |
|
|
@ -4907,7 +4922,7 @@ void home_all_axes() { gcode_G28(true); } |
|
|
|
if ( NEAR(current_position[X_AXIS], xProbe - (X_PROBE_OFFSET_FROM_EXTRUDER)) |
|
|
|
&& NEAR(current_position[Y_AXIS], yProbe - (Y_PROBE_OFFSET_FROM_EXTRUDER)) |
|
|
|
) { |
|
|
|
float simple_z = current_position[Z_AXIS] - measured_z; |
|
|
|
const float simple_z = current_position[Z_AXIS] - measured_z; |
|
|
|
#if ENABLED(DEBUG_LEVELING_FEATURE) |
|
|
|
if (DEBUGGING(LEVELING)) { |
|
|
|
SERIAL_ECHOPAIR("Z from Probe:", simple_z); |
|
|
@ -5503,7 +5518,7 @@ void home_all_axes() { gcode_G28(true); } |
|
|
|
// If any axis has enough movement, do the move
|
|
|
|
LOOP_XYZ(i) |
|
|
|
if (fabs(destination[i] - current_position[i]) >= G38_MINIMUM_MOVE) { |
|
|
|
if (!parser.seen('F')) feedrate_mm_s = homing_feedrate_mm_s[i]; |
|
|
|
if (!parser.seen('F')) feedrate_mm_s = homing_feedrate(i); |
|
|
|
// If G38.2 fails throw an error
|
|
|
|
if (!G38_run_probe() && is_38_2) { |
|
|
|
SERIAL_ERROR_START; |
|
|
@ -6271,10 +6286,10 @@ inline void gcode_M31() { |
|
|
|
/**
|
|
|
|
* Sensitive pin test for M42, M226 |
|
|
|
*/ |
|
|
|
static bool pin_is_protected(uint8_t pin) { |
|
|
|
static const int sensitive_pins[] = SENSITIVE_PINS; |
|
|
|
static bool pin_is_protected(const int8_t pin) { |
|
|
|
static const int8_t sensitive_pins[] PROGMEM = SENSITIVE_PINS; |
|
|
|
for (uint8_t i = 0; i < COUNT(sensitive_pins); i++) |
|
|
|
if (sensitive_pins[i] == pin) return true; |
|
|
|
if (pin == (int8_t)pgm_read_byte(&sensitive_pins[i])) return true; |
|
|
|
return false; |
|
|
|
} |
|
|
|
|
|
|
@ -7667,45 +7682,32 @@ void report_current_position() { |
|
|
|
|
|
|
|
#ifdef M114_DETAIL |
|
|
|
|
|
|
|
static const char axis_char[XYZE] = {'X','Y','Z','E'}; |
|
|
|
|
|
|
|
void report_xyze(const float pos[XYZE], uint8_t n = 4, uint8_t precision = 3) { |
|
|
|
void report_xyze(const float pos[XYZE], const uint8_t n = 4, const uint8_t precision = 3) { |
|
|
|
char str[12]; |
|
|
|
for(uint8_t i=0; i<n; i++) { |
|
|
|
for (uint8_t i = 0; i < n; i++) { |
|
|
|
SERIAL_CHAR(' '); |
|
|
|
SERIAL_CHAR(axis_char[i]); |
|
|
|
SERIAL_CHAR(axis_codes[i]); |
|
|
|
SERIAL_CHAR(':'); |
|
|
|
SERIAL_PROTOCOL(dtostrf(pos[i],8,precision,str)); |
|
|
|
SERIAL_PROTOCOL(dtostrf(pos[i], 8, precision, str)); |
|
|
|
} |
|
|
|
SERIAL_EOL; |
|
|
|
} |
|
|
|
|
|
|
|
inline void report_xyz(const float pos[XYZ]) { |
|
|
|
report_xyze(pos,3); |
|
|
|
} |
|
|
|
inline void report_xyz(const float pos[XYZ]) { report_xyze(pos, 3); } |
|
|
|
|
|
|
|
void report_current_position_detail() { |
|
|
|
|
|
|
|
stepper.synchronize(); |
|
|
|
|
|
|
|
SERIAL_EOL; |
|
|
|
SERIAL_PROTOCOLPGM("Logical:"); |
|
|
|
SERIAL_PROTOCOLPGM("\nLogical:"); |
|
|
|
report_xyze(current_position); |
|
|
|
|
|
|
|
SERIAL_PROTOCOLPGM("Raw: "); |
|
|
|
const float raw[XYZ] = { |
|
|
|
RAW_X_POSITION(current_position[X_AXIS]), |
|
|
|
RAW_Y_POSITION(current_position[Y_AXIS]), |
|
|
|
RAW_Z_POSITION(current_position[Z_AXIS]) |
|
|
|
}; |
|
|
|
const float raw[XYZ] = { RAW_X_POSITION(current_position[X_AXIS]), RAW_Y_POSITION(current_position[Y_AXIS]), RAW_Z_POSITION(current_position[Z_AXIS]) }; |
|
|
|
report_xyz(raw); |
|
|
|
|
|
|
|
SERIAL_PROTOCOLPGM("Leveled:"); |
|
|
|
float leveled[XYZ] = { |
|
|
|
current_position[X_AXIS], |
|
|
|
current_position[Y_AXIS], |
|
|
|
current_position[Z_AXIS] |
|
|
|
}; |
|
|
|
float leveled[XYZ] = { current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS] }; |
|
|
|
planner.apply_leveling(leveled); |
|
|
|
report_xyz(leveled); |
|
|
|
|
|
|
@ -7725,13 +7727,8 @@ void report_current_position() { |
|
|
|
#endif |
|
|
|
|
|
|
|
SERIAL_PROTOCOLPGM("Stepper:"); |
|
|
|
const float step_count[XYZE] = { |
|
|
|
(float)stepper.position(X_AXIS), |
|
|
|
(float)stepper.position(Y_AXIS), |
|
|
|
(float)stepper.position(Z_AXIS), |
|
|
|
(float)stepper.position(E_AXIS) |
|
|
|
}; |
|
|
|
report_xyze(step_count,4,0); |
|
|
|
const float step_count[XYZE] = { stepper.position(X_AXIS), stepper.position(Y_AXIS), stepper.position(Z_AXIS), stepper.position(E_AXIS) }; |
|
|
|
report_xyze(step_count, 4, 0); |
|
|
|
|
|
|
|
#if IS_SCARA |
|
|
|
const float deg[XYZ] = { |
|
|
@ -7739,17 +7736,12 @@ void report_current_position() { |
|
|
|
stepper.get_axis_position_degrees(B_AXIS) |
|
|
|
}; |
|
|
|
SERIAL_PROTOCOLPGM("Degrees:"); |
|
|
|
report_xyze(deg,2); |
|
|
|
report_xyze(deg, 2); |
|
|
|
#endif |
|
|
|
|
|
|
|
SERIAL_PROTOCOLPGM("FromStp:"); |
|
|
|
get_cartesian_from_steppers(); // writes cartes[XYZ] (with forward kinematics)
|
|
|
|
const float from_steppers[XYZE] = { |
|
|
|
cartes[X_AXIS], |
|
|
|
cartes[Y_AXIS], |
|
|
|
cartes[Z_AXIS], |
|
|
|
stepper.get_axis_position_mm(E_AXIS) |
|
|
|
}; |
|
|
|
const float from_steppers[XYZE] = { cartes[X_AXIS], cartes[Y_AXIS], cartes[Z_AXIS], stepper.get_axis_position_mm(E_AXIS) }; |
|
|
|
report_xyze(from_steppers); |
|
|
|
|
|
|
|
const float diff[XYZE] = { |
|
|
@ -7764,12 +7756,12 @@ void report_current_position() { |
|
|
|
#endif // M114_DETAIL
|
|
|
|
|
|
|
|
/**
|
|
|
|
* M114: Output current position to serial port |
|
|
|
* M114: Report current position to host |
|
|
|
*/ |
|
|
|
inline void gcode_M114() { |
|
|
|
|
|
|
|
#ifdef M114_DETAIL |
|
|
|
if ( parser.seen('D') ) { |
|
|
|
if (parser.seen('D')) { |
|
|
|
report_current_position_detail(); |
|
|
|
return; |
|
|
|
} |
|
|
@ -7777,7 +7769,7 @@ inline void gcode_M114() { |
|
|
|
|
|
|
|
stepper.synchronize(); |
|
|
|
report_current_position(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
/**
|
|
|
|
* M115: Capabilities string |
|
|
@ -7859,9 +7851,7 @@ inline void gcode_M115() { |
|
|
|
/**
|
|
|
|
* M117: Set LCD Status Message |
|
|
|
*/ |
|
|
|
inline void gcode_M117() { |
|
|
|
lcd_setstatus(parser.string_arg); |
|
|
|
} |
|
|
|
inline void gcode_M117() { lcd_setstatus(parser.string_arg); } |
|
|
|
|
|
|
|
/**
|
|
|
|
* M119: Output endstop states to serial output |
|
|
@ -8890,25 +8880,43 @@ void quickstop_stepper() { |
|
|
|
inline void gcode_M420() { |
|
|
|
|
|
|
|
#if ENABLED(AUTO_BED_LEVELING_UBL) |
|
|
|
|
|
|
|
// L to load a mesh from the EEPROM
|
|
|
|
if (parser.seen('L')) { |
|
|
|
const int8_t storage_slot = parser.has_value() ? parser.value_int() : ubl.state.storage_slot; |
|
|
|
const int16_t a = settings.calc_num_meshes(); |
|
|
|
|
|
|
|
if (!a) { |
|
|
|
#if ENABLED(EEPROM_SETTINGS) |
|
|
|
const int8_t storage_slot = parser.has_value() ? parser.value_int() : ubl.state.storage_slot; |
|
|
|
const int16_t a = settings.calc_num_meshes(); |
|
|
|
|
|
|
|
if (!a) { |
|
|
|
SERIAL_PROTOCOLLNPGM("?EEPROM storage not available."); |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
if (!WITHIN(storage_slot, 0, a - 1)) { |
|
|
|
SERIAL_PROTOCOLLNPGM("?Invalid storage slot."); |
|
|
|
SERIAL_PROTOCOLLNPAIR("?Use 0 to ", a - 1); |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
settings.load_mesh(storage_slot); |
|
|
|
ubl.state.storage_slot = storage_slot; |
|
|
|
|
|
|
|
#else |
|
|
|
|
|
|
|
SERIAL_PROTOCOLLNPGM("?EEPROM storage not available."); |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
if (!WITHIN(storage_slot, 0, a - 1)) { |
|
|
|
SERIAL_PROTOCOLLNPGM("?Invalid storage slot."); |
|
|
|
SERIAL_PROTOCOLLNPAIR("?Use 0 to ", a - 1); |
|
|
|
return; |
|
|
|
} |
|
|
|
#endif |
|
|
|
} |
|
|
|
|
|
|
|
settings.load_mesh(storage_slot); |
|
|
|
ubl.state.storage_slot = storage_slot; |
|
|
|
// L to load a mesh from the EEPROM
|
|
|
|
if (parser.seen('L') || parser.seen('V')) { |
|
|
|
ubl.display_map(0); // Currently only supports one map type
|
|
|
|
SERIAL_ECHOLNPAIR("UBL_MESH_VALID = ", UBL_MESH_VALID); |
|
|
|
SERIAL_ECHOLNPAIR("ubl.state.storage_slot = ", ubl.state.storage_slot); |
|
|
|
} |
|
|
|
|
|
|
|
#endif // AUTO_BED_LEVELING_UBL
|
|
|
|
|
|
|
|
// V to print the matrix or mesh
|
|
|
@ -8930,15 +8938,6 @@ void quickstop_stepper() { |
|
|
|
#endif |
|
|
|
} |
|
|
|
|
|
|
|
#if ENABLED(AUTO_BED_LEVELING_UBL) |
|
|
|
// L to load a mesh from the EEPROM
|
|
|
|
if (parser.seen('L') || parser.seen('V')) { |
|
|
|
ubl.display_map(0); // Currently only supports one map type
|
|
|
|
SERIAL_ECHOLNPAIR("UBL_MESH_VALID = ", UBL_MESH_VALID); |
|
|
|
SERIAL_ECHOLNPAIR("ubl.state.storage_slot = ", ubl.state.storage_slot); |
|
|
|
} |
|
|
|
#endif |
|
|
|
|
|
|
|
bool to_enable = false; |
|
|
|
if (parser.seen('S')) { |
|
|
|
to_enable = parser.value_bool(); |
|
|
@ -12749,7 +12748,7 @@ void setup() { |
|
|
|
#if ENABLED(ENDSTOP_INTERRUPTS_FEATURE) |
|
|
|
setup_endstop_interrupts(); |
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
#if ENABLED(SWITCHING_EXTRUDER) |
|
|
|
move_extruder_servo(0); // Initialize extruder servo
|
|
|
|
#endif |
|
|
|