🎨 Misc. tramming menu cleanup (#25519)
This commit is contained in:
parent
66d94ece33
commit
10983d0cfe
|
@ -2114,8 +2114,8 @@
|
||||||
|
|
||||||
#if ENABLED(LCD_BED_TRAMMING)
|
#if ENABLED(LCD_BED_TRAMMING)
|
||||||
#define BED_TRAMMING_INSET_LFRB { 30, 30, 30, 30 } // (mm) Left, Front, Right, Back insets
|
#define BED_TRAMMING_INSET_LFRB { 30, 30, 30, 30 } // (mm) Left, Front, Right, Back insets
|
||||||
#define BED_TRAMMING_HEIGHT 0.0 // (mm) Z height of nozzle at leveling points
|
#define BED_TRAMMING_HEIGHT 0.0 // (mm) Z height of nozzle at tramming points
|
||||||
#define BED_TRAMMING_Z_HOP 4.0 // (mm) Z height of nozzle between leveling points
|
#define BED_TRAMMING_Z_HOP 4.0 // (mm) Z height of nozzle between tramming points
|
||||||
//#define BED_TRAMMING_INCLUDE_CENTER // Move to the center after the last corner
|
//#define BED_TRAMMING_INCLUDE_CENTER // Move to the center after the last corner
|
||||||
//#define BED_TRAMMING_USE_PROBE
|
//#define BED_TRAMMING_USE_PROBE
|
||||||
#if ENABLED(BED_TRAMMING_USE_PROBE)
|
#if ENABLED(BED_TRAMMING_USE_PROBE)
|
||||||
|
|
|
@ -36,7 +36,7 @@
|
||||||
|
|
||||||
#if HAS_LEVELING
|
#if HAS_LEVELING
|
||||||
#include "../../../feature/bedlevel/bedlevel.h"
|
#include "../../../feature/bedlevel/bedlevel.h"
|
||||||
bool leveling_was_active;
|
bool mks_leveling_was_active;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
extern lv_group_t *g;
|
extern lv_group_t *g;
|
||||||
|
@ -110,7 +110,7 @@ static void event_handler(lv_obj_t *obj, lv_event_t event) {
|
||||||
case ID_M_RETURN:
|
case ID_M_RETURN:
|
||||||
probe.offset.z = z_offset_backup;
|
probe.offset.z = z_offset_backup;
|
||||||
SET_SOFT_ENDSTOP_LOOSE(false);
|
SET_SOFT_ENDSTOP_LOOSE(false);
|
||||||
TERN_(HAS_LEVELING, set_bed_leveling_enabled(leveling_was_active));
|
TERN_(HAS_LEVELING, set_bed_leveling_enabled(mks_leveling_was_active));
|
||||||
#if HOMING_Z_WITH_PROBE && defined(PROBE_OFFSET_WIZARD_START_Z)
|
#if HOMING_Z_WITH_PROBE && defined(PROBE_OFFSET_WIZARD_START_Z)
|
||||||
set_axis_never_homed(Z_AXIS); // On cancel the Z position needs correction
|
set_axis_never_homed(Z_AXIS); // On cancel the Z position needs correction
|
||||||
queue.inject_P(PSTR("G28Z"));
|
queue.inject_P(PSTR("G28Z"));
|
||||||
|
@ -149,8 +149,8 @@ void lv_draw_z_offset_wizard() {
|
||||||
|
|
||||||
// Store Bed-Leveling-State and disable
|
// Store Bed-Leveling-State and disable
|
||||||
#if HAS_LEVELING
|
#if HAS_LEVELING
|
||||||
leveling_was_active = planner.leveling_active;
|
mks_leveling_was_active = planner.leveling_active;
|
||||||
set_bed_leveling_enabled(leveling_was_active);
|
set_bed_leveling_enabled(mks_leveling_was_active);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
queue.inject_P(PSTR("G28"));
|
queue.inject_P(PSTR("G28"));
|
||||||
|
|
|
@ -48,7 +48,7 @@
|
||||||
////////////////////////////////////////////
|
////////////////////////////////////////////
|
||||||
|
|
||||||
#if HAS_LEVELING && ANY(LCD_BED_TRAMMING, PROBE_OFFSET_WIZARD, X_AXIS_TWIST_COMPENSATION)
|
#if HAS_LEVELING && ANY(LCD_BED_TRAMMING, PROBE_OFFSET_WIZARD, X_AXIS_TWIST_COMPENSATION)
|
||||||
bool leveling_was_active; // = false
|
bool menu_leveling_was_active; // = false
|
||||||
#endif
|
#endif
|
||||||
#if ANY(PROBE_MANUALLY, MESH_BED_LEVELING, X_AXIS_TWIST_COMPENSATION)
|
#if ANY(PROBE_MANUALLY, MESH_BED_LEVELING, X_AXIS_TWIST_COMPENSATION)
|
||||||
uint8_t manual_probe_index; // = 0
|
uint8_t manual_probe_index; // = 0
|
||||||
|
|
|
@ -264,7 +264,7 @@ inline void clear_menu_history() { screen_history_depth = 0; }
|
||||||
#define STICKY_SCREEN(S) []{ ui.defer_status_screen(); ui.goto_screen(S); }
|
#define STICKY_SCREEN(S) []{ ui.defer_status_screen(); ui.goto_screen(S); }
|
||||||
|
|
||||||
#if HAS_LEVELING && ANY(LCD_BED_TRAMMING, PROBE_OFFSET_WIZARD, X_AXIS_TWIST_COMPENSATION)
|
#if HAS_LEVELING && ANY(LCD_BED_TRAMMING, PROBE_OFFSET_WIZARD, X_AXIS_TWIST_COMPENSATION)
|
||||||
extern bool leveling_was_active;
|
extern bool menu_leveling_was_active;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if ANY(PROBE_MANUALLY, MESH_BED_LEVELING, X_AXIS_TWIST_COMPENSATION)
|
#if ANY(PROBE_MANUALLY, MESH_BED_LEVELING, X_AXIS_TWIST_COMPENSATION)
|
||||||
|
|
|
@ -293,7 +293,7 @@ void menu_bed_leveling() {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if ENABLED(LCD_BED_TRAMMING)
|
#if ENABLED(LCD_BED_TRAMMING)
|
||||||
SUBMENU(MSG_BED_TRAMMING, _lcd_level_bed_corners);
|
SUBMENU(MSG_BED_TRAMMING, _lcd_bed_tramming);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if ENABLED(EEPROM_SETTINGS)
|
#if ENABLED(EEPROM_SETTINGS)
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
//
|
//
|
||||||
// Level Bed Corners menu
|
// Bed Tramming menu
|
||||||
//
|
//
|
||||||
|
|
||||||
#include "../../inc/MarlinConfigPre.h"
|
#include "../../inc/MarlinConfigPre.h"
|
||||||
|
@ -54,7 +54,7 @@
|
||||||
#endif
|
#endif
|
||||||
float last_z;
|
float last_z;
|
||||||
int good_points;
|
int good_points;
|
||||||
bool corner_probing_done, wait_for_probe;
|
bool tramming_done, wait_for_probe;
|
||||||
|
|
||||||
#if HAS_MARLINUI_U8GLIB
|
#if HAS_MARLINUI_U8GLIB
|
||||||
#include "../dogm/marlinui_DOGM.h"
|
#include "../dogm/marlinui_DOGM.h"
|
||||||
|
@ -66,6 +66,11 @@
|
||||||
|
|
||||||
static_assert(BED_TRAMMING_Z_HOP >= 0, "BED_TRAMMING_Z_HOP must be >= 0. Please update your configuration.");
|
static_assert(BED_TRAMMING_Z_HOP >= 0, "BED_TRAMMING_Z_HOP must be >= 0. Please update your configuration.");
|
||||||
|
|
||||||
|
#define LF 1
|
||||||
|
#define RF 2
|
||||||
|
#define RB 3
|
||||||
|
#define LB 4
|
||||||
|
|
||||||
#ifndef BED_TRAMMING_LEVELING_ORDER
|
#ifndef BED_TRAMMING_LEVELING_ORDER
|
||||||
#define BED_TRAMMING_LEVELING_ORDER { LF, RF, LB, RB } // Default
|
#define BED_TRAMMING_LEVELING_ORDER { LF, RF, LB, RB } // Default
|
||||||
//#define BED_TRAMMING_LEVELING_ORDER { LF, LB, RF } // 3 hard-coded points
|
//#define BED_TRAMMING_LEVELING_ORDER { LF, LB, RF } // 3 hard-coded points
|
||||||
|
@ -75,18 +80,14 @@ static_assert(BED_TRAMMING_Z_HOP >= 0, "BED_TRAMMING_Z_HOP must be >= 0. Please
|
||||||
//#define BED_TRAMMING_LEVELING_ORDER { LB, RB } // 3-Point tramming - Front
|
//#define BED_TRAMMING_LEVELING_ORDER { LB, RB } // 3-Point tramming - Front
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define LF 1
|
|
||||||
#define RF 2
|
|
||||||
#define RB 3
|
|
||||||
#define LB 4
|
|
||||||
constexpr int lco[] = BED_TRAMMING_LEVELING_ORDER;
|
constexpr int lco[] = BED_TRAMMING_LEVELING_ORDER;
|
||||||
constexpr bool level_corners_3_points = COUNT(lco) == 2;
|
constexpr bool tramming_3_points = COUNT(lco) == 2;
|
||||||
static_assert(level_corners_3_points || COUNT(lco) == 4, "BED_TRAMMING_LEVELING_ORDER must have exactly 2 or 4 corners.");
|
static_assert(tramming_3_points || COUNT(lco) == 4, "BED_TRAMMING_LEVELING_ORDER must have exactly 2 or 4 corners.");
|
||||||
|
|
||||||
constexpr int lcodiff = ABS(lco[0] - lco[1]);
|
constexpr int lcodiff = ABS(lco[0] - lco[1]);
|
||||||
static_assert(COUNT(lco) == 4 || lcodiff == 1 || lcodiff == 3, "The first two BED_TRAMMING_LEVELING_ORDER corners must be on the same edge.");
|
static_assert(COUNT(lco) == 4 || lcodiff == 1 || lcodiff == 3, "The first two BED_TRAMMING_LEVELING_ORDER corners must be on the same edge.");
|
||||||
|
|
||||||
constexpr int nr_edge_points = level_corners_3_points ? 3 : 4;
|
constexpr int nr_edge_points = tramming_3_points ? 3 : 4;
|
||||||
constexpr int available_points = nr_edge_points + ENABLED(BED_TRAMMING_INCLUDE_CENTER);
|
constexpr int available_points = nr_edge_points + ENABLED(BED_TRAMMING_INCLUDE_CENTER);
|
||||||
constexpr int center_index = TERN(BED_TRAMMING_INCLUDE_CENTER, available_points - 1, -1);
|
constexpr int center_index = TERN(BED_TRAMMING_INCLUDE_CENTER, available_points - 1, -1);
|
||||||
constexpr float inset_lfrb[4] = BED_TRAMMING_INSET_LFRB;
|
constexpr float inset_lfrb[4] = BED_TRAMMING_INSET_LFRB;
|
||||||
|
@ -98,9 +99,9 @@ static int8_t bed_corner;
|
||||||
/**
|
/**
|
||||||
* Select next corner coordinates
|
* Select next corner coordinates
|
||||||
*/
|
*/
|
||||||
static void _lcd_level_bed_corners_get_next_position() {
|
static void _lcd_bed_tramming_get_next_position() {
|
||||||
|
|
||||||
if (level_corners_3_points) {
|
if (tramming_3_points) {
|
||||||
if (bed_corner >= available_points) bed_corner = 0; // Above max position -> move back to first corner
|
if (bed_corner >= available_points) bed_corner = 0; // Above max position -> move back to first corner
|
||||||
switch (bed_corner) {
|
switch (bed_corner) {
|
||||||
case 0 ... 1:
|
case 0 ... 1:
|
||||||
|
@ -141,9 +142,9 @@ static void _lcd_level_bed_corners_get_next_position() {
|
||||||
else {
|
else {
|
||||||
current_position = lf; // Left front
|
current_position = lf; // Left front
|
||||||
switch (lco[bed_corner]) {
|
switch (lco[bed_corner]) {
|
||||||
case RF: current_position.x = rb.x; break; // Right front
|
case RF: current_position.x = rb.x; break; // Right Front
|
||||||
case RB: current_position = rb; break; // Right rear
|
case RB: current_position = rb; break; // Right Back
|
||||||
case LB: current_position.y = rb.y; break; // Left rear
|
case LB: current_position.y = rb.y; break; // Left Back
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -198,7 +199,7 @@ static void _lcd_level_bed_corners_get_next_position() {
|
||||||
if (!ui.should_draw()) return;
|
if (!ui.should_draw()) return;
|
||||||
MenuItem_confirm::select_screen(
|
MenuItem_confirm::select_screen(
|
||||||
GET_TEXT_F(MSG_BUTTON_DONE), GET_TEXT_F(MSG_BUTTON_SKIP)
|
GET_TEXT_F(MSG_BUTTON_DONE), GET_TEXT_F(MSG_BUTTON_SKIP)
|
||||||
, []{ corner_probing_done = true; wait_for_probe = false; }
|
, []{ tramming_done = true; wait_for_probe = false; }
|
||||||
, []{ wait_for_probe = false; }
|
, []{ wait_for_probe = false; }
|
||||||
, GET_TEXT_F(MSG_BED_TRAMMING_RAISE)
|
, GET_TEXT_F(MSG_BED_TRAMMING_RAISE)
|
||||||
);
|
);
|
||||||
|
@ -207,23 +208,25 @@ static void _lcd_level_bed_corners_get_next_position() {
|
||||||
void _lcd_draw_level_prompt() {
|
void _lcd_draw_level_prompt() {
|
||||||
if (!ui.should_draw()) return;
|
if (!ui.should_draw()) return;
|
||||||
MenuItem_confirm::select_screen(
|
MenuItem_confirm::select_screen(
|
||||||
GET_TEXT_F(TERN(HAS_LEVELING, MSG_BUTTON_LEVEL, MSG_BUTTON_DONE)),
|
GET_TEXT_F(TERN(HAS_LEVELING, MSG_BUTTON_LEVEL, MSG_BUTTON_DONE))
|
||||||
TERN(HAS_LEVELING, GET_TEXT_F(MSG_BUTTON_BACK), nullptr)
|
, TERN(HAS_LEVELING, GET_TEXT_F(MSG_BUTTON_BACK), nullptr)
|
||||||
, []{ queue.inject(TERN(HAS_LEVELING, F("G29N"), FPSTR(G28_STR))); ui.return_to_status(); }
|
, []{ queue.inject(TERN(HAS_LEVELING, F("G29N"), FPSTR(G28_STR))); ui.return_to_status(); }
|
||||||
, TERN(HAS_LEVELING, ui.goto_previous_screen_no_defer, []{})
|
, TERN(HAS_LEVELING, ui.goto_previous_screen_no_defer, []{})
|
||||||
, GET_TEXT_F(MSG_BED_TRAMMING_IN_RANGE)
|
, GET_TEXT_F(MSG_BED_TRAMMING_IN_RANGE)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool _lcd_level_bed_corners_probe(bool verify=false) {
|
bool _lcd_bed_tramming_probe(bool verify=false) {
|
||||||
if (verify) do_blocking_move_to_z(current_position.z + BED_TRAMMING_Z_HOP); // do clearance if needed
|
if (verify) line_to_z(BED_TRAMMING_Z_HOP); // do clearance if needed
|
||||||
TERN_(BLTOUCH, if (!bltouch.high_speed_mode) bltouch.deploy()); // Deploy in LOW SPEED MODE on every probe action
|
TERN_(BLTOUCH, if (!bltouch.high_speed_mode) bltouch.deploy()); // Deploy in LOW SPEED MODE on every probe action
|
||||||
do_blocking_move_to_z(last_z - BED_TRAMMING_PROBE_TOLERANCE, MMM_TO_MMS(Z_PROBE_FEEDRATE_SLOW)); // Move down to lower tolerance
|
do_blocking_move_to_z(last_z - BED_TRAMMING_PROBE_TOLERANCE, MMM_TO_MMS(Z_PROBE_FEEDRATE_SLOW)); // Move down to lower tolerance
|
||||||
if (TEST(endstops.trigger_state(), Z_MIN_PROBE)) { // check if probe triggered
|
if (TEST(endstops.trigger_state(), Z_MIN_PROBE)) { // check if probe triggered
|
||||||
endstops.hit_on_purpose();
|
endstops.hit_on_purpose();
|
||||||
set_current_from_steppers_for_axis(Z_AXIS);
|
set_current_from_steppers_for_axis(Z_AXIS);
|
||||||
sync_plan_position();
|
sync_plan_position();
|
||||||
|
|
||||||
TERN_(BLTOUCH, if (!bltouch.high_speed_mode) bltouch.stow()); // Stow in LOW SPEED MODE on every trigger
|
TERN_(BLTOUCH, if (!bltouch.high_speed_mode) bltouch.stow()); // Stow in LOW SPEED MODE on every trigger
|
||||||
|
|
||||||
// Triggered outside tolerance range?
|
// Triggered outside tolerance range?
|
||||||
if (ABS(current_position.z - last_z) > BED_TRAMMING_PROBE_TOLERANCE) {
|
if (ABS(current_position.z - last_z) > BED_TRAMMING_PROBE_TOLERANCE) {
|
||||||
last_z = current_position.z; // Above tolerance. Set a new Z for subsequent corners.
|
last_z = current_position.z; // Above tolerance. Set a new Z for subsequent corners.
|
||||||
|
@ -231,13 +234,13 @@ static void _lcd_level_bed_corners_get_next_position() {
|
||||||
}
|
}
|
||||||
return true; // probe triggered
|
return true; // probe triggered
|
||||||
}
|
}
|
||||||
do_blocking_move_to_z(last_z); // go back to tolerance middle point before raise
|
line_to_z(last_z); // go back to tolerance middle point before raise
|
||||||
return false; // probe not triggered
|
return false; // probe not triggered
|
||||||
}
|
}
|
||||||
|
|
||||||
bool _lcd_level_bed_corners_raise() {
|
bool _lcd_bed_tramming_raise() {
|
||||||
bool probe_triggered = false;
|
bool probe_triggered = false;
|
||||||
corner_probing_done = false;
|
tramming_done = false;
|
||||||
wait_for_probe = true;
|
wait_for_probe = true;
|
||||||
ui.goto_screen(_lcd_draw_raise); // show raise screen
|
ui.goto_screen(_lcd_draw_raise); // show raise screen
|
||||||
ui.set_selection(true);
|
ui.set_selection(true);
|
||||||
|
@ -264,25 +267,25 @@ static void _lcd_level_bed_corners_get_next_position() {
|
||||||
ui.refresh(LCDVIEW_REDRAW_NOW);
|
ui.refresh(LCDVIEW_REDRAW_NOW);
|
||||||
_lcd_draw_probing(); // update screen with # of good points
|
_lcd_draw_probing(); // update screen with # of good points
|
||||||
|
|
||||||
do_blocking_move_to_z(current_position.z + BED_TRAMMING_Z_HOP + TERN0(BLTOUCH, bltouch.z_extra_clearance())); // clearance
|
line_to_z(current_position.z + BED_TRAMMING_Z_HOP + TERN0(BLTOUCH, bltouch.z_extra_clearance())); // clearance
|
||||||
|
|
||||||
_lcd_level_bed_corners_get_next_position(); // Select next corner coordinates
|
_lcd_bed_tramming_get_next_position(); // Select next corner coordinates
|
||||||
current_position -= probe.offset_xy; // Account for probe offsets
|
current_position -= probe.offset_xy; // Account for probe offsets
|
||||||
do_blocking_move_to_xy(current_position); // Goto corner
|
do_blocking_move_to_xy(current_position); // Goto corner
|
||||||
|
|
||||||
TERN_(BLTOUCH, if (bltouch.high_speed_mode) bltouch.deploy()); // Deploy in HIGH SPEED MODE
|
TERN_(BLTOUCH, if (bltouch.high_speed_mode) bltouch.deploy()); // Deploy in HIGH SPEED MODE
|
||||||
if (!_lcd_level_bed_corners_probe()) { // Probe down to tolerance
|
if (!_lcd_bed_tramming_probe()) { // Probe down to tolerance
|
||||||
if (_lcd_level_bed_corners_raise()) { // Prompt user to raise bed if needed
|
if (_lcd_bed_tramming_raise()) { // Prompt user to raise bed if needed
|
||||||
#if ENABLED(BED_TRAMMING_VERIFY_RAISED) // Verify
|
#if ENABLED(BED_TRAMMING_VERIFY_RAISED) // Verify
|
||||||
while (!_lcd_level_bed_corners_probe(true)) { // Loop while corner verified
|
while (!_lcd_bed_tramming_probe(true)) { // Loop while corner verified
|
||||||
if (!_lcd_level_bed_corners_raise()) { // Prompt user to raise bed if needed
|
if (!_lcd_bed_tramming_raise()) { // Prompt user to raise bed if needed
|
||||||
if (corner_probing_done) return; // Done was selected
|
if (tramming_done) return; // Done was selected
|
||||||
break; // Skip was selected
|
break; // Skip was selected
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
else if (corner_probing_done) // Done was selected
|
else if (tramming_done) // Done was selected
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -293,9 +296,9 @@ static void _lcd_level_bed_corners_get_next_position() {
|
||||||
|
|
||||||
#if ENABLED(BLTOUCH)
|
#if ENABLED(BLTOUCH)
|
||||||
if (bltouch.high_speed_mode) {
|
if (bltouch.high_speed_mode) {
|
||||||
// In HIGH SPEED MODE do clearance and stow at the very end
|
// In HIGH SPEED MODE do stow and clearance at the very end
|
||||||
do_blocking_move_to_z(current_position.z + BED_TRAMMING_Z_HOP);
|
|
||||||
bltouch.stow();
|
bltouch.stow();
|
||||||
|
do_z_clearance(BED_TRAMMING_Z_HOP);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -309,7 +312,7 @@ static void _lcd_level_bed_corners_get_next_position() {
|
||||||
line_to_z(BED_TRAMMING_Z_HOP);
|
line_to_z(BED_TRAMMING_Z_HOP);
|
||||||
|
|
||||||
// Select next corner coordinates
|
// Select next corner coordinates
|
||||||
_lcd_level_bed_corners_get_next_position();
|
_lcd_bed_tramming_get_next_position();
|
||||||
|
|
||||||
line_to_current_position(manual_feedrate_mm_s.x);
|
line_to_current_position(manual_feedrate_mm_s.x);
|
||||||
line_to_z(BED_TRAMMING_HEIGHT);
|
line_to_z(BED_TRAMMING_HEIGHT);
|
||||||
|
@ -318,15 +321,19 @@ static void _lcd_level_bed_corners_get_next_position() {
|
||||||
|
|
||||||
#endif // !BED_TRAMMING_USE_PROBE
|
#endif // !BED_TRAMMING_USE_PROBE
|
||||||
|
|
||||||
static void _lcd_level_bed_corners_homing() {
|
void _lcd_bed_tramming_homing() {
|
||||||
_lcd_draw_homing();
|
_lcd_draw_homing();
|
||||||
if (!all_axes_homed()) return;
|
if (!all_axes_homed()) return;
|
||||||
|
|
||||||
#if ENABLED(BED_TRAMMING_USE_PROBE)
|
#if ENABLED(BED_TRAMMING_USE_PROBE)
|
||||||
|
|
||||||
_lcd_test_corners();
|
_lcd_test_corners();
|
||||||
if (corner_probing_done) ui.goto_previous_screen_no_defer();
|
if (tramming_done) ui.goto_previous_screen_no_defer();
|
||||||
TERN_(HAS_LEVELING, set_bed_leveling_enabled(leveling_was_active));
|
TERN_(HAS_LEVELING, set_bed_leveling_enabled(menu_leveling_was_active));
|
||||||
endstops.enable_z_probe(false);
|
endstops.enable_z_probe(false);
|
||||||
#else
|
|
||||||
|
#else // !BED_TRAMMING_USE_PROBE
|
||||||
|
|
||||||
bed_corner = 0;
|
bed_corner = 0;
|
||||||
ui.goto_screen([]{
|
ui.goto_screen([]{
|
||||||
MenuItem_confirm::select_screen(
|
MenuItem_confirm::select_screen(
|
||||||
|
@ -334,7 +341,7 @@ static void _lcd_level_bed_corners_homing() {
|
||||||
, _lcd_goto_next_corner
|
, _lcd_goto_next_corner
|
||||||
, []{
|
, []{
|
||||||
line_to_z(BED_TRAMMING_Z_HOP); // Raise Z off the bed when done
|
line_to_z(BED_TRAMMING_Z_HOP); // Raise Z off the bed when done
|
||||||
TERN_(HAS_LEVELING, set_bed_leveling_enabled(leveling_was_active));
|
TERN_(HAS_LEVELING, set_bed_leveling_enabled(menu_leveling_was_active));
|
||||||
ui.goto_previous_screen_no_defer();
|
ui.goto_previous_screen_no_defer();
|
||||||
}
|
}
|
||||||
, GET_TEXT_F(TERN(BED_TRAMMING_INCLUDE_CENTER, MSG_LEVEL_BED_NEXT_POINT, MSG_NEXT_CORNER))
|
, GET_TEXT_F(TERN(BED_TRAMMING_INCLUDE_CENTER, MSG_LEVEL_BED_NEXT_POINT, MSG_NEXT_CORNER))
|
||||||
|
@ -343,10 +350,11 @@ static void _lcd_level_bed_corners_homing() {
|
||||||
});
|
});
|
||||||
ui.set_selection(true);
|
ui.set_selection(true);
|
||||||
_lcd_goto_next_corner();
|
_lcd_goto_next_corner();
|
||||||
#endif
|
|
||||||
|
#endif // !BED_TRAMMING_USE_PROBE
|
||||||
}
|
}
|
||||||
|
|
||||||
void _lcd_level_bed_corners() {
|
void _lcd_bed_tramming() {
|
||||||
ui.defer_status_screen();
|
ui.defer_status_screen();
|
||||||
if (!all_axes_trusted()) {
|
if (!all_axes_trusted()) {
|
||||||
set_all_unhomed();
|
set_all_unhomed();
|
||||||
|
@ -355,11 +363,11 @@ void _lcd_level_bed_corners() {
|
||||||
|
|
||||||
// Disable leveling so the planner won't mess with us
|
// Disable leveling so the planner won't mess with us
|
||||||
#if HAS_LEVELING
|
#if HAS_LEVELING
|
||||||
leveling_was_active = planner.leveling_active;
|
menu_leveling_was_active = planner.leveling_active;
|
||||||
set_bed_leveling_enabled(false);
|
set_bed_leveling_enabled(false);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
ui.goto_screen(_lcd_level_bed_corners_homing);
|
ui.goto_screen(_lcd_bed_tramming_homing);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // HAS_MARLINUI_MENU && LCD_BED_TRAMMING
|
#endif // HAS_MARLINUI_MENU && LCD_BED_TRAMMING
|
|
@ -537,7 +537,7 @@ class MenuItem_bool : public MenuEditItemBase {
|
||||||
#define YESNO_ITEM_N(N,LABEL, V...) YESNO_ITEM_N_F(N, GET_TEXT_F(LABEL), ##V)
|
#define YESNO_ITEM_N(N,LABEL, V...) YESNO_ITEM_N_F(N, GET_TEXT_F(LABEL), ##V)
|
||||||
|
|
||||||
#if ENABLED(LCD_BED_TRAMMING)
|
#if ENABLED(LCD_BED_TRAMMING)
|
||||||
void _lcd_level_bed_corners();
|
void _lcd_bed_tramming();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if HAS_FAN
|
#if HAS_FAN
|
||||||
|
|
|
@ -411,7 +411,7 @@ void menu_motion() {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if ENABLED(LCD_BED_TRAMMING) && DISABLED(LCD_BED_LEVELING)
|
#if ENABLED(LCD_BED_TRAMMING) && DISABLED(LCD_BED_LEVELING)
|
||||||
SUBMENU(MSG_BED_TRAMMING, _lcd_level_bed_corners);
|
SUBMENU(MSG_BED_TRAMMING, _lcd_bed_tramming);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if ENABLED(Z_MIN_PROBE_REPEATABILITY_TEST)
|
#if ENABLED(Z_MIN_PROBE_REPEATABILITY_TEST)
|
||||||
|
|
|
@ -51,7 +51,7 @@ inline void z_clearance_move() {
|
||||||
void set_offset_and_go_back(const_float_t z) {
|
void set_offset_and_go_back(const_float_t z) {
|
||||||
probe.offset.z = z;
|
probe.offset.z = z;
|
||||||
SET_SOFT_ENDSTOP_LOOSE(false);
|
SET_SOFT_ENDSTOP_LOOSE(false);
|
||||||
TERN_(HAS_LEVELING, set_bed_leveling_enabled(leveling_was_active));
|
TERN_(HAS_LEVELING, set_bed_leveling_enabled(menu_leveling_was_active));
|
||||||
ui.goto_previous_screen_no_defer();
|
ui.goto_previous_screen_no_defer();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -143,7 +143,7 @@ void goto_probe_offset_wizard() {
|
||||||
|
|
||||||
// Store Bed-Leveling-State and disable
|
// Store Bed-Leveling-State and disable
|
||||||
#if HAS_LEVELING
|
#if HAS_LEVELING
|
||||||
leveling_was_active = planner.leveling_active;
|
menu_leveling_was_active = planner.leveling_active;
|
||||||
set_bed_leveling_enabled(false);
|
set_bed_leveling_enabled(false);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -46,7 +46,7 @@ float measured_z, z_offset;
|
||||||
void xatc_wizard_done() {
|
void xatc_wizard_done() {
|
||||||
if (!ui.wait_for_move) {
|
if (!ui.wait_for_move) {
|
||||||
xatc.print_points();
|
xatc.print_points();
|
||||||
set_bed_leveling_enabled(leveling_was_active);
|
set_bed_leveling_enabled(menu_leveling_was_active);
|
||||||
SET_SOFT_ENDSTOP_LOOSE(false);
|
SET_SOFT_ENDSTOP_LOOSE(false);
|
||||||
ui.goto_screen(menu_advanced_settings);
|
ui.goto_screen(menu_advanced_settings);
|
||||||
}
|
}
|
||||||
|
@ -199,7 +199,7 @@ void xatc_wizard_homing() {
|
||||||
void xatc_wizard_continue() {
|
void xatc_wizard_continue() {
|
||||||
// Store Bed-Leveling-State and disable
|
// Store Bed-Leveling-State and disable
|
||||||
#if HAS_LEVELING
|
#if HAS_LEVELING
|
||||||
leveling_was_active = planner.leveling_active;
|
menu_leveling_was_active = planner.leveling_active;
|
||||||
set_bed_leveling_enabled(false);
|
set_bed_leveling_enabled(false);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -528,7 +528,7 @@ bool Probe::set_deployed(const bool deploy) {
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
const xy_pos_t old_xy = current_position;
|
const xy_pos_t old_xy = current_position; // Remember location before probe deployment
|
||||||
|
|
||||||
#if ENABLED(PROBE_TRIGGERED_WHEN_STOWED_TEST)
|
#if ENABLED(PROBE_TRIGGERED_WHEN_STOWED_TEST)
|
||||||
|
|
||||||
|
@ -625,7 +625,7 @@ bool Probe::probe_down_to_z(const_float_t z, const_feedRate_t fr_mm_s) {
|
||||||
|
|
||||||
// Offset sensorless probing
|
// Offset sensorless probing
|
||||||
#if HAS_DELTA_SENSORLESS_PROBING
|
#if HAS_DELTA_SENSORLESS_PROBING
|
||||||
if (probe_triggered) probe.refresh_largest_sensorless_adj();
|
if (probe_triggered) refresh_largest_sensorless_adj();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
TERN_(HAS_QUIET_PROBING, set_probing_paused(false));
|
TERN_(HAS_QUIET_PROBING, set_probing_paused(false));
|
||||||
|
|
|
@ -114,7 +114,7 @@ public:
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#else
|
#else // !IS_KINEMATIC
|
||||||
|
|
||||||
static bool obstacle_check(const_float_t rx, const_float_t ry) {
|
static bool obstacle_check(const_float_t rx, const_float_t ry) {
|
||||||
#if ENABLED(AVOID_OBSTACLES)
|
#if ENABLED(AVOID_OBSTACLES)
|
||||||
|
@ -166,7 +166,7 @@ public:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif // !IS_KINEMATIC
|
||||||
|
|
||||||
static void move_z_after_probing() {
|
static void move_z_after_probing() {
|
||||||
#ifdef Z_AFTER_PROBING
|
#ifdef Z_AFTER_PROBING
|
||||||
|
@ -178,7 +178,7 @@ public:
|
||||||
return probe_at_point(pos.x, pos.y, raise_after, verbose_level, probe_relative, sanity_check);
|
return probe_at_point(pos.x, pos.y, raise_after, verbose_level, probe_relative, sanity_check);
|
||||||
}
|
}
|
||||||
|
|
||||||
#else
|
#else // !HAS_BED_PROBE
|
||||||
|
|
||||||
static constexpr xyz_pos_t offset = xyz_pos_t(NUM_AXIS_ARRAY_1(0)); // See #16767
|
static constexpr xyz_pos_t offset = xyz_pos_t(NUM_AXIS_ARRAY_1(0)); // See #16767
|
||||||
|
|
||||||
|
@ -186,7 +186,7 @@ public:
|
||||||
|
|
||||||
static bool can_reach(const_float_t rx, const_float_t ry, const bool=true) { return position_is_reachable(rx, ry); }
|
static bool can_reach(const_float_t rx, const_float_t ry, const bool=true) { return position_is_reachable(rx, ry); }
|
||||||
|
|
||||||
#endif
|
#endif // !HAS_BED_PROBE
|
||||||
|
|
||||||
static void move_z_after_homing() {
|
static void move_z_after_homing() {
|
||||||
#if ALL(DWIN_LCD_PROUI, INDIVIDUAL_AXIS_HOMING_SUBMENU, MESH_BED_LEVELING) || defined(Z_AFTER_HOMING)
|
#if ALL(DWIN_LCD_PROUI, INDIVIDUAL_AXIS_HOMING_SUBMENU, MESH_BED_LEVELING) || defined(Z_AFTER_HOMING)
|
||||||
|
|
|
@ -54,7 +54,7 @@
|
||||||
#define HAS_MENU_BACKLASH
|
#define HAS_MENU_BACKLASH
|
||||||
#endif
|
#endif
|
||||||
#if ENABLED(LCD_BED_TRAMMING)
|
#if ENABLED(LCD_BED_TRAMMING)
|
||||||
#define HAS_MENU_BED_CORNERS
|
#define HAS_MENU_BED_TRAMMING
|
||||||
#endif
|
#endif
|
||||||
#if ENABLED(CANCEL_OBJECTS)
|
#if ENABLED(CANCEL_OBJECTS)
|
||||||
#define HAS_MENU_CANCELOBJECT
|
#define HAS_MENU_CANCELOBJECT
|
||||||
|
@ -99,7 +99,7 @@
|
||||||
#define HAS_MENU_TOUCH_SCREEN
|
#define HAS_MENU_TOUCH_SCREEN
|
||||||
#endif
|
#endif
|
||||||
#if ENABLED(ASSISTED_TRAMMING_WIZARD)
|
#if ENABLED(ASSISTED_TRAMMING_WIZARD)
|
||||||
#define HAS_MENU_TRAMMING
|
#define HAS_MENU_TRAMMING_WIZARD
|
||||||
#endif
|
#endif
|
||||||
#if ENABLED(AUTO_BED_LEVELING_UBL)
|
#if ENABLED(AUTO_BED_LEVELING_UBL)
|
||||||
#define HAS_MENU_UBL
|
#define HAS_MENU_UBL
|
||||||
|
|
|
@ -16,7 +16,8 @@ opt_set E0_AUTO_FAN_PIN PC10 E1_AUTO_FAN_PIN PC11 E2_AUTO_FAN_PIN PC12 NEOPIXEL_
|
||||||
FIL_RUNOUT6_PIN 8 FIL_RUNOUT7_PIN 9 FIL_RUNOUT8_PIN 10 FIL_RUNOUT4_STATE HIGH FIL_RUNOUT8_STATE HIGH \
|
FIL_RUNOUT6_PIN 8 FIL_RUNOUT7_PIN 9 FIL_RUNOUT8_PIN 10 FIL_RUNOUT4_STATE HIGH FIL_RUNOUT8_STATE HIGH \
|
||||||
FILAMENT_RUNOUT_SCRIPT '"M600 T%c"'
|
FILAMENT_RUNOUT_SCRIPT '"M600 T%c"'
|
||||||
opt_enable REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER BLTOUCH NEOPIXEL_LED Z_SAFE_HOMING NOZZLE_PARK_FEATURE ADVANCED_PAUSE_FEATURE \
|
opt_enable REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER BLTOUCH NEOPIXEL_LED Z_SAFE_HOMING NOZZLE_PARK_FEATURE ADVANCED_PAUSE_FEATURE \
|
||||||
FILAMENT_RUNOUT_SENSOR FIL_RUNOUT4_PULLUP FIL_RUNOUT8_PULLUP FILAMENT_CHANGE_RESUME_ON_INSERT PAUSE_REHEAT_FAST_RESUME
|
FILAMENT_RUNOUT_SENSOR FIL_RUNOUT4_PULLUP FIL_RUNOUT8_PULLUP FILAMENT_CHANGE_RESUME_ON_INSERT PAUSE_REHEAT_FAST_RESUME \
|
||||||
|
LCD_BED_TRAMMING BED_TRAMMING_USE_PROBE
|
||||||
exec_test $1 $2 "BigTreeTech GTR | 8 Extruders | Auto-Fan | Mixed TMC Drivers | Runout Sensors w/ distinct states" "$3"
|
exec_test $1 $2 "BigTreeTech GTR | 8 Extruders | Auto-Fan | Mixed TMC Drivers | Runout Sensors w/ distinct states" "$3"
|
||||||
|
|
||||||
restore_configs
|
restore_configs
|
||||||
|
|
|
@ -60,8 +60,8 @@ MARLIN_INVADERS = src_filter=+<src/lcd/menu/game/invaders
|
||||||
MARLIN_MAZE = src_filter=+<src/lcd/menu/game/maze.cpp>
|
MARLIN_MAZE = src_filter=+<src/lcd/menu/game/maze.cpp>
|
||||||
MARLIN_SNAKE = src_filter=+<src/lcd/menu/game/snake.cpp>
|
MARLIN_SNAKE = src_filter=+<src/lcd/menu/game/snake.cpp>
|
||||||
HAS_MENU_BACKLASH = src_filter=+<src/lcd/menu/menu_backlash.cpp>
|
HAS_MENU_BACKLASH = src_filter=+<src/lcd/menu/menu_backlash.cpp>
|
||||||
HAS_MENU_BED_CORNERS = src_filter=+<src/lcd/menu/menu_bed_corners.cpp>
|
|
||||||
LCD_BED_LEVELING = src_filter=+<src/lcd/menu/menu_bed_leveling.cpp>
|
LCD_BED_LEVELING = src_filter=+<src/lcd/menu/menu_bed_leveling.cpp>
|
||||||
|
HAS_MENU_BED_TRAMMING = src_filter=+<src/lcd/menu/menu_bed_tramming.cpp>
|
||||||
HAS_MENU_CANCELOBJECT = src_filter=+<src/lcd/menu/menu_cancelobject.cpp>
|
HAS_MENU_CANCELOBJECT = src_filter=+<src/lcd/menu/menu_cancelobject.cpp>
|
||||||
HAS_MENU_DELTA_CALIBRATE = src_filter=+<src/lcd/menu/menu_delta_calibrate.cpp>
|
HAS_MENU_DELTA_CALIBRATE = src_filter=+<src/lcd/menu/menu_delta_calibrate.cpp>
|
||||||
HAS_MENU_FILAMENT = src_filter=+<src/lcd/menu/menu_filament.cpp>
|
HAS_MENU_FILAMENT = src_filter=+<src/lcd/menu/menu_filament.cpp>
|
||||||
|
@ -78,7 +78,7 @@ HAS_MENU_CUTTER = src_filter=+<src/lcd/menu/menu_spindle_
|
||||||
HAS_MENU_TEMPERATURE = src_filter=+<src/lcd/menu/menu_temperature.cpp>
|
HAS_MENU_TEMPERATURE = src_filter=+<src/lcd/menu/menu_temperature.cpp>
|
||||||
HAS_MENU_TMC = src_filter=+<src/lcd/menu/menu_tmc.cpp>
|
HAS_MENU_TMC = src_filter=+<src/lcd/menu/menu_tmc.cpp>
|
||||||
HAS_MENU_TOUCH_SCREEN = src_filter=+<src/lcd/menu/menu_touch_screen.cpp>
|
HAS_MENU_TOUCH_SCREEN = src_filter=+<src/lcd/menu/menu_touch_screen.cpp>
|
||||||
HAS_MENU_TRAMMING = src_filter=+<src/lcd/menu/menu_tramming.cpp>
|
HAS_MENU_TRAMMING_WIZARD = src_filter=+<src/lcd/menu/menu_tramming_wizard.cpp>
|
||||||
HAS_MENU_UBL = src_filter=+<src/lcd/menu/menu_ubl.cpp>
|
HAS_MENU_UBL = src_filter=+<src/lcd/menu/menu_ubl.cpp>
|
||||||
ANYCUBIC_LCD_CHIRON = src_filter=+<src/lcd/extui/anycubic_chiron>
|
ANYCUBIC_LCD_CHIRON = src_filter=+<src/lcd/extui/anycubic_chiron>
|
||||||
ANYCUBIC_LCD_I3MEGA = src_filter=+<src/lcd/extui/anycubic_i3mega>
|
ANYCUBIC_LCD_I3MEGA = src_filter=+<src/lcd/extui/anycubic_i3mega>
|
||||||
|
|
|
@ -60,8 +60,8 @@ default_src_filter = +<src/*> -<src/config> -<src/HAL> +<src/HAL/shared> -<src/t
|
||||||
-<src/lcd/menu/game/game.cpp> -<src/lcd/menu/game/brickout.cpp> -<src/lcd/menu/game/invaders.cpp>
|
-<src/lcd/menu/game/game.cpp> -<src/lcd/menu/game/brickout.cpp> -<src/lcd/menu/game/invaders.cpp>
|
||||||
-<src/lcd/menu/game/maze.cpp> -<src/lcd/menu/game/snake.cpp>
|
-<src/lcd/menu/game/maze.cpp> -<src/lcd/menu/game/snake.cpp>
|
||||||
-<src/lcd/menu/menu_backlash.cpp>
|
-<src/lcd/menu/menu_backlash.cpp>
|
||||||
-<src/lcd/menu/menu_bed_corners.cpp>
|
|
||||||
-<src/lcd/menu/menu_bed_leveling.cpp>
|
-<src/lcd/menu/menu_bed_leveling.cpp>
|
||||||
|
-<src/lcd/menu/menu_bed_tramming.cpp>
|
||||||
-<src/lcd/menu/menu_cancelobject.cpp>
|
-<src/lcd/menu/menu_cancelobject.cpp>
|
||||||
-<src/lcd/menu/menu_delta_calibrate.cpp>
|
-<src/lcd/menu/menu_delta_calibrate.cpp>
|
||||||
-<src/lcd/menu/menu_filament.cpp>
|
-<src/lcd/menu/menu_filament.cpp>
|
||||||
|
@ -77,7 +77,7 @@ default_src_filter = +<src/*> -<src/config> -<src/HAL> +<src/HAL/shared> -<src/t
|
||||||
-<src/lcd/menu/menu_temperature.cpp>
|
-<src/lcd/menu/menu_temperature.cpp>
|
||||||
-<src/lcd/menu/menu_tmc.cpp>
|
-<src/lcd/menu/menu_tmc.cpp>
|
||||||
-<src/lcd/menu/menu_touch_screen.cpp>
|
-<src/lcd/menu/menu_touch_screen.cpp>
|
||||||
-<src/lcd/menu/menu_tramming.cpp>
|
-<src/lcd/menu/menu_tramming_wizard.cpp>
|
||||||
-<src/lcd/menu/menu_ubl.cpp>
|
-<src/lcd/menu/menu_ubl.cpp>
|
||||||
-<src/lcd/menu/menu_x_twist.cpp>
|
-<src/lcd/menu/menu_x_twist.cpp>
|
||||||
-<src/lcd/extui/anycubic_chiron>
|
-<src/lcd/extui/anycubic_chiron>
|
||||||
|
|
Loading…
Reference in a new issue