Skip to content

Commit

Permalink
🩹 PROBING_TOOL followup (MarlinFirmware#26122)
Browse files Browse the repository at this point in the history
Followup to MarlinFirmware#24411

Co-authored-by: Scott Lahteine <[email protected]>
  • Loading branch information
2 people authored and Pragma8123 committed Oct 24, 2023
1 parent bf9b952 commit b5f7661
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions Marlin/src/gcode/calibrate/G33.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ void ac_setup(const bool reset_bed) {
#endif
}

void ac_cleanup(TERN_(HAS_MULTI_HOTEND, const uint8_t old_tool_index)) {
void ac_cleanup() {
TERN_(DELTA_HOME_TO_SAFE_ZONE, do_blocking_move_to_z(delta_clip_start_height));
TERN_(HAS_BED_PROBE, probe.stow());
restore_feedrate_and_scaling();
Expand All @@ -97,7 +97,7 @@ void print_signed_float(FSTR_P const prefix, const_float_t f) {
}

/**
* - Print the delta settings
* - Print the delta settings
*/
static void print_calibration_settings(const bool end_stops, const bool tower_angles) {
SERIAL_ECHOPGM(".Height:", delta_height);
Expand All @@ -123,7 +123,7 @@ static void print_calibration_settings(const bool end_stops, const bool tower_an
}

/**
* - Print the probe results
* - Print the probe results
*/
static void print_calibration_results(const float z_pt[NPP + 1], const bool tower_points, const bool opposite_points) {
SERIAL_ECHOPGM(". ");
Expand All @@ -147,7 +147,7 @@ static void print_calibration_results(const float z_pt[NPP + 1], const bool towe
}

/**
* - Calculate the standard deviation from the zero plane
* - Calculate the standard deviation from the zero plane
*/
static float std_dev_points(float z_pt[NPP + 1], const bool _0p_cal, const bool _1p_cal, const bool _4p_cal, const bool _4p_opp) {
if (!_0p_cal) {
Expand All @@ -165,7 +165,7 @@ static float std_dev_points(float z_pt[NPP + 1], const bool _0p_cal, const bool
}

/**
* - Probe a point
* - Probe a point
*/
static float calibration_probe(const xy_pos_t &xy, const bool stow, const bool probe_at_offset) {
#if HAS_BED_PROBE
Expand All @@ -177,7 +177,7 @@ static float calibration_probe(const xy_pos_t &xy, const bool stow, const bool p
}

/**
* - Probe a grid
* - Probe a grid
*/
static bool probe_calibration_points(float z_pt[NPP + 1], const int8_t probe_points, const float dcr, const bool towers_set, const bool stow_after_each, const bool probe_at_offset) {
const bool _0p_calibration = probe_points == 0,
Expand Down Expand Up @@ -501,7 +501,7 @@ void GcodeSuite::G33() {
zero_std_dev_old = zero_std_dev;
if (!probe_calibration_points(z_at_pt, probe_points, dcr, towers_set, stow_after_each, probe_at_offset)) {
SERIAL_ECHOLNPGM("Correct delta settings with M665 and M666");
return ac_cleanup(TERN_(HAS_MULTI_HOTEND, old_tool_index));
return ac_cleanup();
}
zero_std_dev = std_dev_points(z_at_pt, _0p_calibration, _1p_calibration, _4p_calibration, _4p_opposite_points);

Expand Down Expand Up @@ -678,7 +678,7 @@ void GcodeSuite::G33() {
}
while (((zero_std_dev < test_precision && iterations < 31) || iterations <= force_iterations) && zero_std_dev > calibration_precision);

ac_cleanup(TERN_(HAS_MULTI_HOTEND, old_tool_index));
ac_cleanup();

TERN_(FULL_REPORT_TO_HOST_FEATURE, set_and_report_grblstate(M_IDLE));
#if HAS_DELTA_SENSORLESS_PROBING
Expand Down

0 comments on commit b5f7661

Please sign in to comment.