Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

G35 assisted tramming improvements #20298

2 changes: 1 addition & 1 deletion Marlin/src/gcode/bedlevel/G35.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
// Define tramming point names.
//

#include "../../feature/tramming.h" // Validate
#include "../../feature/tramming.h"

/**
* G35: Read bed corners to help adjust bed screws
Expand Down
11 changes: 4 additions & 7 deletions Marlin/src/lcd/menu/menu_tramming.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,20 +42,18 @@
float z_measured[G35_PROBE_COUNT] = { 0 };
static uint8_t tram_index = 0;

bool probe_single_point() {
static bool probe_single_point() {
do_blocking_move_to_z(TERN(BLTOUCH, Z_CLEARANCE_DEPLOY_PROBE, Z_CLEARANCE_BETWEEN_PROBES));
// Stow after each point with BLTouch "HIGH SPEED" mode for push-pin safety
const float z_probed_height = probe.probe_at_point(screws_tilt_adjust_pos[tram_index], TERN(BLTOUCH_HS_MODE, PROBE_PT_STOW, PROBE_PT_RAISE), 0, true);
DEBUG_ECHOLNPAIR("probe_single_point: ", z_probed_height, "mm");
z_measured[tram_index] = z_probed_height;

// Move XYZ to wait position
sjasonsmith marked this conversation as resolved.
Show resolved Hide resolved
move_to_tramming_wait_pos();

return !isnan(z_probed_height);
}

void _menu_single_probe(const uint8_t point) {
static void _menu_single_probe(const uint8_t point) {
tram_index = point;
DEBUG_ECHOLNPAIR("Screen: single probe screen Arg:", point);
START_MENU();
Expand All @@ -66,7 +64,7 @@ void _menu_single_probe(const uint8_t point) {
END_MENU();
}

void tramming_wizard_menu() {
static void tramming_wizard_menu() {
DEBUG_ECHOLNPAIR("Screen: tramming_wizard_menu");
START_MENU();
STATIC_ITEM(MSG_SELECT_ORIGIN);
Expand All @@ -87,7 +85,6 @@ void goto_tramming_wizard() {
DEBUG_ECHOLNPAIR("Screen: goto_tramming_wizard", 1);
tram_index = 0;
ui.defer_status_screen();
//probe_single_point(); // Probe first point to get differences

// Inject G28, wait for homing to complete,
set_all_unhomed();
Expand All @@ -99,4 +96,4 @@ void goto_tramming_wizard() {
});
}

#endif // HAS_LCD_MENU && ASSISTED_TRAMMING_WIZARD
#endif // BOTH(HAS_LCD_MENU, ASSISTED_TRAMMING_WIZARD)
qwewer0 marked this conversation as resolved.
Show resolved Hide resolved