0
0
Fork 0
mirror of https://github.com/MarlinFirmware/Marlin.git synced 2025-01-19 08:08:25 +00:00

🩹 Various simple fixes

This commit is contained in:
Scott Lahteine 2023-02-08 20:28:56 -06:00
parent 7e79fc5b8e
commit f595878b5b
16 changed files with 53 additions and 64 deletions

View file

@ -32,8 +32,8 @@ enum MeshLevelingState : char {
MeshReset // G29 S5 MeshReset // G29 S5
}; };
#define MESH_X_DIST (float(MESH_MAX_X - (MESH_MIN_X)) / (GRID_MAX_CELLS_X)) #define MESH_X_DIST (float((MESH_MAX_X) - (MESH_MIN_X)) / (GRID_MAX_CELLS_X))
#define MESH_Y_DIST (float(MESH_MAX_Y - (MESH_MIN_Y)) / (GRID_MAX_CELLS_Y)) #define MESH_Y_DIST (float((MESH_MAX_Y) - (MESH_MIN_Y)) / (GRID_MAX_CELLS_Y))
class mesh_bed_leveling { class mesh_bed_leveling {
public: public:

View file

@ -38,8 +38,8 @@ enum MeshPointType : char { INVALID, REAL, SET_IN_BITMAP, CLOSEST };
struct mesh_index_pair; struct mesh_index_pair;
#define MESH_X_DIST (float(MESH_MAX_X - (MESH_MIN_X)) / (GRID_MAX_CELLS_X)) #define MESH_X_DIST (float((MESH_MAX_X) - (MESH_MIN_X)) / (GRID_MAX_CELLS_X))
#define MESH_Y_DIST (float(MESH_MAX_Y - (MESH_MIN_Y)) / (GRID_MAX_CELLS_Y)) #define MESH_Y_DIST (float((MESH_MAX_Y) - (MESH_MIN_Y)) / (GRID_MAX_CELLS_Y))
#if ENABLED(OPTIMIZED_MESH_STORAGE) #if ENABLED(OPTIMIZED_MESH_STORAGE)
typedef int16_t mesh_store_t[GRID_MAX_POINTS_X][GRID_MAX_POINTS_Y]; typedef int16_t mesh_store_t[GRID_MAX_POINTS_X][GRID_MAX_POINTS_Y];

View file

@ -58,7 +58,7 @@ void GcodeSuite::G34() {
// Move XY to safe position // Move XY to safe position
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("Parking XY"); if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("Parking XY");
const xy_pos_t safe_pos = GANTRY_CALIBRATION_SAFE_POSITION; const xy_pos_t safe_pos = GANTRY_CALIBRATION_SAFE_POSITION;
do_blocking_move_to(safe_pos, MMM_TO_MMS(GANTRY_CALIBRATION_XY_PARK_FEEDRATE)); do_blocking_move_to_xy(safe_pos, MMM_TO_MMS(GANTRY_CALIBRATION_XY_PARK_FEEDRATE));
#endif #endif
const float move_distance = parser.intval('Z', GANTRY_CALIBRATION_EXTRA_HEIGHT), const float move_distance = parser.intval('Z', GANTRY_CALIBRATION_EXTRA_HEIGHT),

View file

@ -29,9 +29,6 @@
#if NUM_AXES == XYZ && EXTRUDERS >= 1 #if NUM_AXES == XYZ && EXTRUDERS >= 1
#define HAS_M350_B_PARAM 1 // "5th axis" (after E0) for an original XYZEB setup. #define HAS_M350_B_PARAM 1 // "5th axis" (after E0) for an original XYZEB setup.
#if AXIS_COLLISION('B')
#error "M350 parameter 'B' collision with axis name."
#endif
#endif #endif
/** /**

View file

@ -128,11 +128,13 @@ void GcodeSuite::M240() {
if (homing_needed_error()) return; if (homing_needed_error()) return;
const xyz_pos_t old_pos = { const xyz_pos_t old_pos = NUM_AXIS_ARRAY(
current_position.x + parser.linearval('A'), current_position.x + parser.linearval('A'),
current_position.y + parser.linearval('B'), current_position.y + parser.linearval('B'),
current_position.z current_position.z,
}; current_position.i, current_position.j, current_position.k,
current_position.u, current_position.v, current_position.w
);
#ifdef PHOTO_RETRACT_MM #ifdef PHOTO_RETRACT_MM
const float rval = parser.linearval('R', _PHOTO_RETRACT_MM); const float rval = parser.linearval('R', _PHOTO_RETRACT_MM);
@ -140,7 +142,7 @@ void GcodeSuite::M240() {
e_move_m240(-rval, sval); e_move_m240(-rval, sval);
#endif #endif
feedRate_t fr_mm_s = MMM_TO_MMS(parser.linearval('F')); feedRate_t fr_mm_s = parser.feedrateval('F');
if (fr_mm_s) NOLESS(fr_mm_s, 10.0f); if (fr_mm_s) NOLESS(fr_mm_s, 10.0f);
constexpr xyz_pos_t photo_position = PHOTO_POSITION; constexpr xyz_pos_t photo_position = PHOTO_POSITION;

View file

@ -110,13 +110,7 @@ void GcodeSuite::G38(const int8_t subcode) {
remember_feedrate_scaling_off(); remember_feedrate_scaling_off();
const bool error_on_fail = const bool error_on_fail = TERN(G38_PROBE_AWAY, !TEST(subcode, 0), subcode == 2);
#if ENABLED(G38_PROBE_AWAY)
!TEST(subcode, 0)
#else
(subcode == 2)
#endif
;
// If any axis has enough movement, do the move // If any axis has enough movement, do the move
LOOP_NUM_AXES(i) LOOP_NUM_AXES(i)

View file

@ -843,11 +843,13 @@ namespace ExtUI {
#endif // BABYSTEPPING #endif // BABYSTEPPING
float getZOffset_mm() { float getZOffset_mm() {
return (0.0f return (
#if HAS_BED_PROBE #if HAS_BED_PROBE
+ probe.offset.z probe.offset.z
#elif ENABLED(BABYSTEP_DISPLAY_TOTAL) #elif ENABLED(BABYSTEP_DISPLAY_TOTAL)
+ planner.mm_per_step[Z_AXIS] * babystep.axis_total[BS_AXIS_IND(Z_AXIS)] planner.mm_per_step[Z_AXIS] * babystep.axis_total[BS_AXIS_IND(Z_AXIS)]
#else
0.0f
#endif #endif
); );
} }

View file

@ -367,7 +367,7 @@ namespace Language_fr {
LSTR MSG_STOPPED = _UxGT("STOPPÉ"); LSTR MSG_STOPPED = _UxGT("STOPPÉ");
LSTR MSG_CONTROL_RETRACT = _UxGT("Rétractation mm"); LSTR MSG_CONTROL_RETRACT = _UxGT("Rétractation mm");
LSTR MSG_CONTROL_RETRACT_SWAP = _UxGT("Ech. rétr. mm"); LSTR MSG_CONTROL_RETRACT_SWAP = _UxGT("Ech. rétr. mm");
LSTR MSG_CONTROL_RETRACTF = _UxGT("Vit. rétract°"); LSTR MSG_CONTROL_RETRACTF = _UxGT("Vit. rétract") LCD_STR_DEGREE;
LSTR MSG_CONTROL_RETRACT_ZHOP = _UxGT("Saut Z mm"); LSTR MSG_CONTROL_RETRACT_ZHOP = _UxGT("Saut Z mm");
LSTR MSG_CONTROL_RETRACT_RECOVER = _UxGT("Rét.reprise mm"); LSTR MSG_CONTROL_RETRACT_RECOVER = _UxGT("Rét.reprise mm");
LSTR MSG_CONTROL_RETRACT_RECOVER_SWAP = _UxGT("Ech.reprise mm"); LSTR MSG_CONTROL_RETRACT_RECOVER_SWAP = _UxGT("Ech.reprise mm");
@ -378,7 +378,7 @@ namespace Language_fr {
LSTR MSG_TOOL_CHANGE_ZLIFT = _UxGT("Augmenter Z"); LSTR MSG_TOOL_CHANGE_ZLIFT = _UxGT("Augmenter Z");
LSTR MSG_SINGLENOZZLE_PRIME_SPEED = _UxGT("Vitesse primaire"); LSTR MSG_SINGLENOZZLE_PRIME_SPEED = _UxGT("Vitesse primaire");
LSTR MSG_SINGLENOZZLE_WIPE_RETRACT = _UxGT("Purge Retract"); LSTR MSG_SINGLENOZZLE_WIPE_RETRACT = _UxGT("Purge Retract");
LSTR MSG_SINGLENOZZLE_RETRACT_SPEED = _UxGT("Vitesse rétract°"); LSTR MSG_SINGLENOZZLE_RETRACT_SPEED = _UxGT("Vitesse rétract") LCD_STR_DEGREE;
LSTR MSG_FILAMENT_PARK_ENABLED = _UxGT("Garer Extrudeur"); LSTR MSG_FILAMENT_PARK_ENABLED = _UxGT("Garer Extrudeur");
LSTR MSG_SINGLENOZZLE_UNRETRACT_SPEED = _UxGT("Vitesse reprise"); LSTR MSG_SINGLENOZZLE_UNRETRACT_SPEED = _UxGT("Vitesse reprise");
LSTR MSG_SINGLENOZZLE_FAN_SPEED = _UxGT("Vit. ventil."); LSTR MSG_SINGLENOZZLE_FAN_SPEED = _UxGT("Vit. ventil.");

View file

@ -218,10 +218,10 @@ namespace Language_ru {
LSTR MSG_UBL_BUILD_CUSTOM_MESH = _UxGT("Построить свою сетку"); LSTR MSG_UBL_BUILD_CUSTOM_MESH = _UxGT("Построить свою сетку");
LSTR MSG_UBL_DONE_EDITING_MESH = _UxGT("Правка сетки завершена"); LSTR MSG_UBL_DONE_EDITING_MESH = _UxGT("Правка сетки завершена");
#else #else
LSTR MSG_UBL_SET_TEMP_BED = LCD_STR_THERMOMETER _UxGT(" стола, ") LCD_STR_DEGREE "C"; LSTR MSG_UBL_SET_TEMP_BED = LCD_STR_THERMOMETER _UxGT(" стола, ") LCD_STR_DEGREE _UxGT("C");
LSTR MSG_UBL_BED_TEMP_CUSTOM = _UxGT("Своя ") LCD_STR_THERMOMETER _UxGT(" стола,") LCD_STR_DEGREE "C"; LSTR MSG_UBL_BED_TEMP_CUSTOM = _UxGT("Своя ") LCD_STR_THERMOMETER _UxGT(" стола,") LCD_STR_DEGREE _UxGT("C");
LSTR MSG_UBL_SET_TEMP_HOTEND = LCD_STR_THERMOMETER _UxGT(" сопла, ") LCD_STR_DEGREE "C"; LSTR MSG_UBL_SET_TEMP_HOTEND = LCD_STR_THERMOMETER _UxGT(" сопла, ") LCD_STR_DEGREE _UxGT("C");
LSTR MSG_UBL_HOTEND_TEMP_CUSTOM = _UxGT("Своя ") LCD_STR_THERMOMETER _UxGT(" сопла,") LCD_STR_DEGREE "C"; LSTR MSG_UBL_HOTEND_TEMP_CUSTOM = _UxGT("Своя ") LCD_STR_THERMOMETER _UxGT(" сопла,") LCD_STR_DEGREE _UxGT("C");
LSTR MSG_UBL_BUILD_CUSTOM_MESH = _UxGT("Построить свою"); LSTR MSG_UBL_BUILD_CUSTOM_MESH = _UxGT("Построить свою");
LSTR MSG_UBL_DONE_EDITING_MESH = _UxGT("Правка завершена"); LSTR MSG_UBL_DONE_EDITING_MESH = _UxGT("Правка завершена");
#endif #endif
@ -343,12 +343,12 @@ namespace Language_ru {
LSTR MSG_MOVE_100MM = _UxGT("Движение 100mm"); LSTR MSG_MOVE_100MM = _UxGT("Движение 100mm");
LSTR MSG_SPEED = _UxGT("Скорость"); LSTR MSG_SPEED = _UxGT("Скорость");
LSTR MSG_BED_Z = _UxGT("Z стола"); LSTR MSG_BED_Z = _UxGT("Z стола");
LSTR MSG_NOZZLE = _UxGT("Сопло, ") LCD_STR_DEGREE "C"; LSTR MSG_NOZZLE = _UxGT("Сопло, ") LCD_STR_DEGREE _UxGT("C");
LSTR MSG_NOZZLE_N = _UxGT("Сопло ~"); LSTR MSG_NOZZLE_N = _UxGT("Сопло ~");
LSTR MSG_NOZZLE_PARKED = _UxGT("Сопло запарковано"); LSTR MSG_NOZZLE_PARKED = _UxGT("Сопло запарковано");
LSTR MSG_NOZZLE_STANDBY = _UxGT("Сопло ожидает"); LSTR MSG_NOZZLE_STANDBY = _UxGT("Сопло ожидает");
LSTR MSG_BED = _UxGT("Стол, ") LCD_STR_DEGREE "C"; LSTR MSG_BED = _UxGT("Стол, ") LCD_STR_DEGREE _UxGT("C");
LSTR MSG_CHAMBER = _UxGT("Камера,") LCD_STR_DEGREE "C"; LSTR MSG_CHAMBER = _UxGT("Камера,") LCD_STR_DEGREE _UxGT("C");
#if LCD_WIDTH > 21 || HAS_DWIN_E3V2 #if LCD_WIDTH > 21 || HAS_DWIN_E3V2
LSTR MSG_COOLER = _UxGT("Охлаждение лазера"); LSTR MSG_COOLER = _UxGT("Охлаждение лазера");
LSTR MSG_COOLER_TOGGLE = _UxGT("Переключ. охлажд."); LSTR MSG_COOLER_TOGGLE = _UxGT("Переключ. охлажд.");

View file

@ -213,10 +213,10 @@ namespace Language_uk {
LSTR MSG_UBL_MOVING_TO_NEXT = _UxGT("Рух до наступної"); LSTR MSG_UBL_MOVING_TO_NEXT = _UxGT("Рух до наступної");
LSTR MSG_UBL_ACTIVATE_MESH = _UxGT("Активувати UBL"); LSTR MSG_UBL_ACTIVATE_MESH = _UxGT("Активувати UBL");
LSTR MSG_UBL_DEACTIVATE_MESH = _UxGT("Деактивувати UBL"); LSTR MSG_UBL_DEACTIVATE_MESH = _UxGT("Деактивувати UBL");
LSTR MSG_UBL_SET_TEMP_BED = LCD_STR_THERMOMETER _UxGT(" столу, ") LCD_STR_DEGREE "C"; LSTR MSG_UBL_SET_TEMP_BED = LCD_STR_THERMOMETER _UxGT(" столу, ") LCD_STR_DEGREE _UxGT("C");
LSTR MSG_UBL_BED_TEMP_CUSTOM = _UxGT("Своя ") LCD_STR_THERMOMETER _UxGT(" столу,") LCD_STR_DEGREE "C"; LSTR MSG_UBL_BED_TEMP_CUSTOM = _UxGT("Своя ") LCD_STR_THERMOMETER _UxGT(" столу,") LCD_STR_DEGREE _UxGT("C");
LSTR MSG_UBL_SET_TEMP_HOTEND = LCD_STR_THERMOMETER _UxGT(" сопла, ") LCD_STR_DEGREE "C"; LSTR MSG_UBL_SET_TEMP_HOTEND = LCD_STR_THERMOMETER _UxGT(" сопла, ") LCD_STR_DEGREE _UxGT("C");
LSTR MSG_UBL_HOTEND_TEMP_CUSTOM = _UxGT("Своя ") LCD_STR_THERMOMETER _UxGT(" сопла,") LCD_STR_DEGREE "C"; LSTR MSG_UBL_HOTEND_TEMP_CUSTOM = _UxGT("Своя ") LCD_STR_THERMOMETER _UxGT(" сопла,") LCD_STR_DEGREE _UxGT("C");
#if LCD_WIDTH > 21 || HAS_DWIN_E3V2 #if LCD_WIDTH > 21 || HAS_DWIN_E3V2
LSTR MSG_UBL_EDIT_CUSTOM_MESH = _UxGT("Редагувати свою сітку"); LSTR MSG_UBL_EDIT_CUSTOM_MESH = _UxGT("Редагувати свою сітку");
LSTR MSG_UBL_FINE_TUNE_MESH = _UxGT("Точне редагування сітки"); LSTR MSG_UBL_FINE_TUNE_MESH = _UxGT("Точне редагування сітки");
@ -344,12 +344,12 @@ namespace Language_uk {
LSTR MSG_MOVE_100MM = _UxGT("Рух 100mm"); LSTR MSG_MOVE_100MM = _UxGT("Рух 100mm");
LSTR MSG_SPEED = _UxGT("Швидкість"); LSTR MSG_SPEED = _UxGT("Швидкість");
LSTR MSG_BED_Z = _UxGT("Z Столу"); LSTR MSG_BED_Z = _UxGT("Z Столу");
LSTR MSG_NOZZLE = _UxGT("Сопло, ") LCD_STR_DEGREE "C"; LSTR MSG_NOZZLE = _UxGT("Сопло, ") LCD_STR_DEGREE _UxGT("C");
LSTR MSG_NOZZLE_N = _UxGT("Сопло ~"); LSTR MSG_NOZZLE_N = _UxGT("Сопло ~");
LSTR MSG_NOZZLE_PARKED = _UxGT("Сопло запарковане"); LSTR MSG_NOZZLE_PARKED = _UxGT("Сопло запарковане");
LSTR MSG_NOZZLE_STANDBY = _UxGT("Сопло очікує"); LSTR MSG_NOZZLE_STANDBY = _UxGT("Сопло очікує");
LSTR MSG_BED = _UxGT("Стіл, ") LCD_STR_DEGREE "C"; LSTR MSG_BED = _UxGT("Стіл, ") LCD_STR_DEGREE _UxGT("C");
LSTR MSG_CHAMBER = _UxGT("Камера,") LCD_STR_DEGREE "C"; LSTR MSG_CHAMBER = _UxGT("Камера,") LCD_STR_DEGREE _UxGT("C");
#if LCD_WIDTH > 21 || HAS_DWIN_E3V2 #if LCD_WIDTH > 21 || HAS_DWIN_E3V2
LSTR MSG_COOLER = _UxGT("Охолодження лазеру"); LSTR MSG_COOLER = _UxGT("Охолодження лазеру");
LSTR MSG_COOLER_TOGGLE = _UxGT("Перемк. охолодж."); LSTR MSG_COOLER_TOGGLE = _UxGT("Перемк. охолодж.");

View file

@ -833,7 +833,7 @@ void MarlinUI::init() {
// Apply a linear offset to a single axis // Apply a linear offset to a single axis
if (axis == ALL_AXES_ENUM) if (axis == ALL_AXES_ENUM)
destination = all_axes_destination; destination = all_axes_destination;
else if (axis <= XYZE) { else if (axis <= LOGICAL_AXES) {
destination = current_position; destination = current_position;
destination[axis] += offset; destination[axis] += offset;
} }

View file

@ -555,7 +555,7 @@ void _internal_move_to_destination(const_feedRate_t fr_mm_s/*=0.0f*/
* - Delta may lower Z first to get into the free motion zone. * - Delta may lower Z first to get into the free motion zone.
* - Before returning, wait for the planner buffer to empty. * - Before returning, wait for the planner buffer to empty.
*/ */
void do_blocking_move_to(NUM_AXIS_ARGS(const float), const_feedRate_t fr_mm_s/*=0.0f*/) { void do_blocking_move_to(NUM_AXIS_ARGS(const_float_t), const_feedRate_t fr_mm_s/*=0.0f*/) {
DEBUG_SECTION(log_move, "do_blocking_move_to", DEBUGGING(LEVELING)); DEBUG_SECTION(log_move, "do_blocking_move_to", DEBUGGING(LEVELING));
if (DEBUGGING(LEVELING)) DEBUG_XYZ("> ", NUM_AXIS_ARGS()); if (DEBUGGING(LEVELING)) DEBUG_XYZ("> ", NUM_AXIS_ARGS());
@ -2281,25 +2281,18 @@ void prepare_line_to_destination() {
#endif #endif
// Put away the Z probe // Put away the Z probe
#if HOMING_Z_WITH_PROBE if (TERN0(HOMING_Z_WITH_PROBE, axis == Z_AXIS && probe.stow())) return;
if (axis == Z_AXIS && probe.stow()) return;
#endif
#if DISABLED(DELTA) && defined(HOMING_BACKOFF_POST_MM) #if DISABLED(DELTA) && defined(HOMING_BACKOFF_POST_MM)
const xyz_float_t endstop_backoff = HOMING_BACKOFF_POST_MM; const xyz_float_t endstop_backoff = HOMING_BACKOFF_POST_MM;
if (endstop_backoff[axis]) { if (endstop_backoff[axis]) {
current_position[axis] -= ABS(endstop_backoff[axis]) * axis_home_dir; current_position[axis] -= ABS(endstop_backoff[axis]) * axis_home_dir;
line_to_current_position( line_to_current_position(TERN_(HOMING_Z_WITH_PROBE, (axis == Z_AXIS) ? z_probe_fast_mm_s :) homing_feedrate(axis));
#if HOMING_Z_WITH_PROBE
(axis == Z_AXIS) ? z_probe_fast_mm_s :
#endif
homing_feedrate(axis)
);
#if ENABLED(SENSORLESS_HOMING) #if ENABLED(SENSORLESS_HOMING)
planner.synchronize(); planner.synchronize();
if (false if (false
#if ANY(IS_CORE, MARKFORGED_XY, MARKFORGED_YX) #ifdef NORMAL_AXIS
|| axis != NORMAL_AXIS || axis != NORMAL_AXIS
#endif #endif
) safe_delay(200); // Short delay to allow belts to spring back ) safe_delay(200); // Short delay to allow belts to spring back
@ -2406,7 +2399,7 @@ void set_axis_is_at_home(const AxisEnum axis) {
* Change the home offset for an axis. * Change the home offset for an axis.
* Also refreshes the workspace offset. * Also refreshes the workspace offset.
*/ */
void set_home_offset(const AxisEnum axis, const float v) { void set_home_offset(const AxisEnum axis, const_float_t v) {
home_offset[axis] = v; home_offset[axis] = v;
update_workspace_offset(axis); update_workspace_offset(axis);
} }

View file

@ -346,7 +346,7 @@ inline void prepare_internal_move_to_destination(const_feedRate_t fr_mm_s=0.0f)
/** /**
* Blocking movement and shorthand functions * Blocking movement and shorthand functions
*/ */
void do_blocking_move_to(NUM_AXIS_ARGS(const float), const_feedRate_t fr_mm_s=0.0f); void do_blocking_move_to(NUM_AXIS_ARGS(const_float_t), const_feedRate_t fr_mm_s=0.0f);
void do_blocking_move_to(const xy_pos_t &raw, const_feedRate_t fr_mm_s=0.0f); void do_blocking_move_to(const xy_pos_t &raw, const_feedRate_t fr_mm_s=0.0f);
void do_blocking_move_to(const xyz_pos_t &raw, const_feedRate_t fr_mm_s=0.0f); void do_blocking_move_to(const xyz_pos_t &raw, const_feedRate_t fr_mm_s=0.0f);
void do_blocking_move_to(const xyze_pos_t &raw, const_feedRate_t fr_mm_s=0.0f); void do_blocking_move_to(const xyze_pos_t &raw, const_feedRate_t fr_mm_s=0.0f);
@ -618,7 +618,7 @@ void home_if_needed(const bool keeplev=false);
#endif #endif
#if HAS_M206_COMMAND #if HAS_M206_COMMAND
void set_home_offset(const AxisEnum axis, const float v); void set_home_offset(const AxisEnum axis, const_float_t v);
#endif #endif
#if USE_SENSORLESS #if USE_SENSORLESS

View file

@ -2192,7 +2192,7 @@ bool Planner::_populate_block(
#endif #endif
); );
#if SECONDARY_LINEAR_AXES >= 1 && NONE(FOAMCUTTER_XYUV, ARTICULATED_ROBOT_ARM) #if SECONDARY_LINEAR_AXES && NONE(FOAMCUTTER_XYUV, ARTICULATED_ROBOT_ARM)
if (UNEAR_ZERO(distance_sqr)) { if (UNEAR_ZERO(distance_sqr)) {
// Move does not involve any primary linear axes (xyz) but might involve secondary linear axes // Move does not involve any primary linear axes (xyz) but might involve secondary linear axes
distance_sqr = (0.0f distance_sqr = (0.0f

View file

@ -152,7 +152,7 @@ xyz_pos_t Probe::offset; // Initialized by settings.load()
#elif ENABLED(TOUCH_MI_PROBE) #elif ENABLED(TOUCH_MI_PROBE)
// Move to the magnet to unlock the probe // Move to the magnet to unlock the probe
inline void run_deploy_moves_script() { inline void run_deploy_moves() {
#ifndef TOUCH_MI_DEPLOY_XPOS #ifndef TOUCH_MI_DEPLOY_XPOS
#define TOUCH_MI_DEPLOY_XPOS X_MIN_POS #define TOUCH_MI_DEPLOY_XPOS X_MIN_POS
#elif TOUCH_MI_DEPLOY_XPOS > X_MAX_BED #elif TOUCH_MI_DEPLOY_XPOS > X_MAX_BED
@ -183,16 +183,17 @@ xyz_pos_t Probe::offset; // Initialized by settings.load()
} }
// Move down to the bed to stow the probe // Move down to the bed to stow the probe
inline void run_stow_moves_script() { // TODO: Handle cases where it would be a bad idea to move down.
const xyz_pos_t oldpos = current_position; inline void run_stow_moves() {
const float oldz = current_position.z;
endstops.enable_z_probe(false); endstops.enable_z_probe(false);
do_blocking_move_to_z(TOUCH_MI_RETRACT_Z, homing_feedrate(Z_AXIS)); do_blocking_move_to_z(TOUCH_MI_RETRACT_Z, homing_feedrate(Z_AXIS));
do_blocking_move_to(oldpos, homing_feedrate(Z_AXIS)); do_blocking_move_to_z(oldz, homing_feedrate(Z_AXIS));
} }
#elif ENABLED(Z_PROBE_ALLEN_KEY) #elif ENABLED(Z_PROBE_ALLEN_KEY)
inline void run_deploy_moves_script() { inline void run_deploy_moves() {
#ifdef Z_PROBE_ALLEN_KEY_DEPLOY_1 #ifdef Z_PROBE_ALLEN_KEY_DEPLOY_1
#ifndef Z_PROBE_ALLEN_KEY_DEPLOY_1_FEEDRATE #ifndef Z_PROBE_ALLEN_KEY_DEPLOY_1_FEEDRATE
#define Z_PROBE_ALLEN_KEY_DEPLOY_1_FEEDRATE 0.0 #define Z_PROBE_ALLEN_KEY_DEPLOY_1_FEEDRATE 0.0
@ -230,7 +231,7 @@ xyz_pos_t Probe::offset; // Initialized by settings.load()
#endif #endif
} }
inline void run_stow_moves_script() { inline void run_stow_moves() {
#ifdef Z_PROBE_ALLEN_KEY_STOW_1 #ifdef Z_PROBE_ALLEN_KEY_STOW_1
#ifndef Z_PROBE_ALLEN_KEY_STOW_1_FEEDRATE #ifndef Z_PROBE_ALLEN_KEY_STOW_1_FEEDRATE
#define Z_PROBE_ALLEN_KEY_STOW_1_FEEDRATE 0.0 #define Z_PROBE_ALLEN_KEY_STOW_1_FEEDRATE 0.0
@ -272,7 +273,7 @@ xyz_pos_t Probe::offset; // Initialized by settings.load()
typedef struct { float fr_mm_min; xyz_pos_t where; } mag_probe_move_t; typedef struct { float fr_mm_min; xyz_pos_t where; } mag_probe_move_t;
inline void run_deploy_moves_script() { inline void run_deploy_moves() {
#ifdef MAG_MOUNTED_DEPLOY_1 #ifdef MAG_MOUNTED_DEPLOY_1
constexpr mag_probe_move_t deploy_1 = MAG_MOUNTED_DEPLOY_1; constexpr mag_probe_move_t deploy_1 = MAG_MOUNTED_DEPLOY_1;
do_blocking_move_to(deploy_1.where, MMM_TO_MMS(deploy_1.fr_mm_min)); do_blocking_move_to(deploy_1.where, MMM_TO_MMS(deploy_1.fr_mm_min));
@ -295,7 +296,7 @@ xyz_pos_t Probe::offset; // Initialized by settings.load()
#endif #endif
} }
inline void run_stow_moves_script() { inline void run_stow_moves() {
#ifdef MAG_MOUNTED_STOW_1 #ifdef MAG_MOUNTED_STOW_1
constexpr mag_probe_move_t stow_1 = MAG_MOUNTED_STOW_1; constexpr mag_probe_move_t stow_1 = MAG_MOUNTED_STOW_1;
do_blocking_move_to(stow_1.where, MMM_TO_MMS(stow_1.fr_mm_min)); do_blocking_move_to(stow_1.where, MMM_TO_MMS(stow_1.fr_mm_min));
@ -406,7 +407,7 @@ FORCE_INLINE void probe_specific_action(const bool deploy) {
#elif ANY(TOUCH_MI_PROBE, Z_PROBE_ALLEN_KEY, MAG_MOUNTED_PROBE) #elif ANY(TOUCH_MI_PROBE, Z_PROBE_ALLEN_KEY, MAG_MOUNTED_PROBE)
deploy ? run_deploy_moves_script() : run_stow_moves_script(); deploy ? run_deploy_moves() : run_stow_moves();
#elif ENABLED(RACK_AND_PINION_PROBE) #elif ENABLED(RACK_AND_PINION_PROBE)

View file

@ -90,7 +90,7 @@ def fetch_example(url):
if '@' in url: url, brch = map(str.strip, url.split('@')) if '@' in url: url, brch = map(str.strip, url.split('@'))
url = f"https://raw.githubusercontent.com/MarlinFirmware/Configurations/{brch}/config/{url}" url = f"https://raw.githubusercontent.com/MarlinFirmware/Configurations/{brch}/config/{url}"
url = url.replace("%", "%25").replace(" ", "%20") url = url.replace("%", "%25").replace(" ", "%20")
# Find a suitable fetch command # Find a suitable fetch command
if shutil.which("curl") is not None: if shutil.which("curl") is not None:
fetch = "curl -L -s -S -f -o" fetch = "curl -L -s -S -f -o"