Rename some feedrate-oriented functions
This commit is contained in:
parent
938a49f989
commit
5e13fe989f
@ -446,7 +446,7 @@ G29_TYPE GcodeSuite::G29() {
|
||||
}
|
||||
#endif
|
||||
|
||||
if (!faux) setup_for_endstop_or_probe_move();
|
||||
if (!faux) remember_feedrate_scaling_off();
|
||||
|
||||
#if ENABLED(AUTO_BED_LEVELING_BILINEAR)
|
||||
|
||||
@ -980,7 +980,7 @@ G29_TYPE GcodeSuite::G29() {
|
||||
} // !isnan(measured_z)
|
||||
|
||||
// Restore state after probing
|
||||
if (!faux) clean_up_after_endstop_or_probe_move();
|
||||
if (!faux) restore_feedrate_and_scaling();
|
||||
|
||||
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("<<< G29");
|
||||
|
||||
|
@ -261,7 +261,7 @@ void GcodeSuite::G28(const bool always_home_all) {
|
||||
extruder_duplication_enabled = false;
|
||||
#endif
|
||||
|
||||
setup_for_endstop_or_probe_move();
|
||||
remember_feedrate_scaling_off();
|
||||
|
||||
endstops.enable(true); // Enable endstops for next homing move
|
||||
|
||||
@ -427,7 +427,7 @@ void GcodeSuite::G28(const bool always_home_all) {
|
||||
set_bed_leveling_enabled(leveling_was_active);
|
||||
#endif
|
||||
|
||||
clean_up_after_endstop_or_probe_move();
|
||||
restore_feedrate_and_scaling();
|
||||
|
||||
// Restore the active tool after homing
|
||||
#if HOTENDS > 1 && (DISABLED(DELTA) || ENABLED(DELTA_HOME_TO_SAFE_ZONE))
|
||||
|
@ -84,7 +84,7 @@ void ac_setup(const bool reset_bed) {
|
||||
#endif
|
||||
|
||||
planner.synchronize();
|
||||
setup_for_endstop_or_probe_move();
|
||||
remember_feedrate_scaling_off();
|
||||
|
||||
#if HAS_LEVELING
|
||||
if (reset_bed) reset_bed_level(); // After full calibration bed-level data is no longer valid
|
||||
@ -102,7 +102,7 @@ void ac_cleanup(
|
||||
#if HAS_BED_PROBE
|
||||
STOW_PROBE();
|
||||
#endif
|
||||
clean_up_after_endstop_or_probe_move();
|
||||
restore_feedrate_and_scaling();
|
||||
#if HOTENDS > 1
|
||||
tool_change(old_tool_index, true);
|
||||
#endif
|
||||
|
@ -111,7 +111,7 @@ void GcodeSuite::M48() {
|
||||
set_bed_leveling_enabled(false);
|
||||
#endif
|
||||
|
||||
setup_for_endstop_or_probe_move();
|
||||
remember_feedrate_scaling_off();
|
||||
|
||||
float mean = 0.0, sigma = 0.0, min = 99999.9, max = -99999.9, sample_set[n_samples];
|
||||
|
||||
@ -256,7 +256,7 @@ void GcodeSuite::M48() {
|
||||
#endif
|
||||
}
|
||||
|
||||
clean_up_after_endstop_or_probe_move();
|
||||
restore_feedrate_and_scaling();
|
||||
|
||||
// Re-enable bed level correction if it had been on
|
||||
#if HAS_LEVELING
|
||||
|
@ -49,7 +49,7 @@ void GcodeSuite::G30() {
|
||||
set_bed_leveling_enabled(false);
|
||||
#endif
|
||||
|
||||
setup_for_endstop_or_probe_move();
|
||||
remember_feedrate_scaling_off();
|
||||
|
||||
const ProbePtRaise raise_after = parser.boolval('E', true) ? PROBE_PT_STOW : PROBE_PT_NONE;
|
||||
const float measured_z = probe_at_point(xpos, ypos, raise_after, 1);
|
||||
@ -57,7 +57,7 @@ void GcodeSuite::G30() {
|
||||
if (!isnan(measured_z))
|
||||
SERIAL_ECHOLNPAIR("Bed X: ", FIXFLOAT(xpos), " Y: ", FIXFLOAT(ypos), " Z: ", FIXFLOAT(measured_z));
|
||||
|
||||
clean_up_after_endstop_or_probe_move();
|
||||
restore_feedrate_and_scaling();
|
||||
|
||||
#ifdef Z_AFTER_PROBING
|
||||
if (raise_after == PROBE_PT_STOW) move_z_after_probing();
|
||||
|
@ -109,7 +109,7 @@ void GcodeSuite::G38(const int8_t subcode) {
|
||||
// Get X Y Z E F
|
||||
get_destination_from_command();
|
||||
|
||||
setup_for_endstop_or_probe_move();
|
||||
remember_feedrate_scaling_off();
|
||||
|
||||
const bool error_on_fail =
|
||||
#if ENABLED(G38_PROBE_AWAY)
|
||||
@ -128,7 +128,7 @@ void GcodeSuite::G38(const int8_t subcode) {
|
||||
break;
|
||||
}
|
||||
|
||||
clean_up_after_endstop_or_probe_move();
|
||||
restore_feedrate_and_scaling();
|
||||
}
|
||||
|
||||
#endif // G38_PROBE_TARGET
|
||||
|
@ -439,12 +439,15 @@ void do_blocking_move_to_xy(const float &rx, const float &ry, const float &fr_mm
|
||||
//
|
||||
static float saved_feedrate_mm_s;
|
||||
static int16_t saved_feedrate_percentage;
|
||||
void setup_for_endstop_or_probe_move() {
|
||||
void remember_feedrate_and_scaling() {
|
||||
saved_feedrate_mm_s = feedrate_mm_s;
|
||||
saved_feedrate_percentage = feedrate_percentage;
|
||||
}
|
||||
void remember_feedrate_scaling_off() {
|
||||
remember_feedrate_and_scaling();
|
||||
feedrate_percentage = 100;
|
||||
}
|
||||
void clean_up_after_endstop_or_probe_move() {
|
||||
void restore_feedrate_and_scaling() {
|
||||
feedrate_mm_s = saved_feedrate_mm_s;
|
||||
feedrate_percentage = saved_feedrate_percentage;
|
||||
}
|
||||
|
@ -203,8 +203,9 @@ FORCE_INLINE void do_blocking_move_to(const float (&raw)[XYZE], const float &fr_
|
||||
do_blocking_move_to(raw[X_AXIS], raw[Y_AXIS], raw[Z_AXIS], fr_mm_s);
|
||||
}
|
||||
|
||||
void setup_for_endstop_or_probe_move();
|
||||
void clean_up_after_endstop_or_probe_move();
|
||||
void remember_feedrate_and_scaling();
|
||||
void remember_feedrate_scaling_off();
|
||||
void restore_feedrate_and_scaling();
|
||||
|
||||
//
|
||||
// Homing
|
||||
|
Loading…
Reference in New Issue
Block a user