🔧 LEVEL_BED_CORNERS => LCD_BED_TRAMMING

This commit is contained in:
Scott Lahteine 2022-06-03 18:16:43 -05:00
parent bcd9bb9628
commit 2b3ba02f09
15 changed files with 98 additions and 92 deletions

View file

@ -1806,18 +1806,18 @@
#endif
// Add a menu item to move between bed corners for manual bed adjustment
//#define LEVEL_BED_CORNERS
//#define LCD_BED_TRAMMING
#if ENABLED(LEVEL_BED_CORNERS)
#define LEVEL_CORNERS_INSET_LFRB { 30, 30, 30, 30 } // (mm) Left, Front, Right, Back insets
#define LEVEL_CORNERS_HEIGHT 0.0 // (mm) Z height of nozzle at leveling points
#define LEVEL_CORNERS_Z_HOP 4.0 // (mm) Z height of nozzle between leveling points
//#define LEVEL_CENTER_TOO // Move to the center after the last corner
//#define LEVEL_CORNERS_USE_PROBE
#if ENABLED(LEVEL_CORNERS_USE_PROBE)
#define LEVEL_CORNERS_PROBE_TOLERANCE 0.1
#define LEVEL_CORNERS_VERIFY_RAISED // After adjustment triggers the probe, re-probe to verify
//#define LEVEL_CORNERS_AUDIO_FEEDBACK
#if ENABLED(LCD_BED_TRAMMING)
#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_Z_HOP 4.0 // (mm) Z height of nozzle between leveling points
//#define BED_TRAMMING_INCLUDE_CENTER // Move to the center after the last corner
//#define BED_TRAMMING_USE_PROBE
#if ENABLED(BED_TRAMMING_USE_PROBE)
#define BED_TRAMMING_PROBE_TOLERANCE 0.1 // (mm)
#define BED_TRAMMING_VERIFY_RAISED // After adjustment triggers the probe, re-probe to verify
//#define BED_TRAMMING_AUDIO_FEEDBACK
#endif
/**
@ -1837,7 +1837,7 @@
* | 1 2 | | 1 4 | | 1 2 | | 2 |
* LF --------- RF LF --------- RF LF --------- RF LF --------- RF
*/
#define LEVEL_CORNERS_LEVELING_ORDER { LF, RF, RB, LB }
#define BED_TRAMMING_LEVELING_ORDER { LF, RF, RB, LB }
#endif
/**

View file

@ -266,7 +266,7 @@
* No adjustable bed on non-cartesians
*/
#if IS_KINEMATIC
#undef LEVEL_BED_CORNERS
#undef LCD_BED_TRAMMING
#endif
/**

View file

@ -371,7 +371,7 @@
#elif defined(FILAMENT_CHANGE_LOAD_LENGTH)
#error "FILAMENT_CHANGE_LOAD_LENGTH is now FILAMENT_CHANGE_FAST_LOAD_LENGTH."
#elif defined(LEVEL_CORNERS_INSET)
#error "LEVEL_CORNERS_INSET is now LEVEL_CORNERS_INSET_LFRB."
#error "LEVEL_CORNERS_INSET is now BED_TRAMMING_INSET_LFRB."
#elif defined(BEZIER_JERK_CONTROL)
#error "BEZIER_JERK_CONTROL is now S_CURVE_ACCELERATION."
#elif HAS_JUNCTION_DEVIATION && defined(JUNCTION_DEVIATION_FACTOR)
@ -627,6 +627,12 @@
#error "Y_DUAL_STEPPER_DRIVERS is no longer needed and should be removed."
#elif defined(NUM_Z_STEPPER_DRIVERS)
#error "NUM_Z_STEPPER_DRIVERS is no longer needed and should be removed."
#elif defined(LEVEL_BED_CORNERS)
#error "LEVEL_BED_CORNERS is now LCD_BED_TRAMMING."
#elif defined(LEVEL_CORNERS_INSET_LFRB) || defined(LEVEL_CORNERS_HEIGHT) || defined(LEVEL_CORNERS_Z_HOP) || defined(LEVEL_CORNERS_USE_PROBE) || defined(LEVEL_CORNERS_PROBE_TOLERANCE) || defined(LEVEL_CORNERS_VERIFY_RAISED) || defined(LEVEL_CORNERS_AUDIO_FEEDBACK)
#error "LEVEL_CORNERS_* settings have been renamed BED_TRAMMING_*."
#elif defined(LEVEL_CENTER_TOO)
#error "LEVEL_CENTER_TOO is now BED_TRAMMING_INCLUDE_CENTER."
#endif
constexpr float arm[] = AXIS_RELATIVE_MODES;
@ -1824,14 +1830,14 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
#endif
#if ENABLED(LEVEL_BED_CORNERS)
#ifndef LEVEL_CORNERS_INSET_LFRB
#error "LEVEL_BED_CORNERS requires LEVEL_CORNERS_INSET_LFRB values."
#elif ENABLED(LEVEL_CORNERS_USE_PROBE)
#if ENABLED(LCD_BED_TRAMMING)
#ifndef BED_TRAMMING_INSET_LFRB
#error "LCD_BED_TRAMMING requires BED_TRAMMING_INSET_LFRB values."
#elif ENABLED(BED_TRAMMING_USE_PROBE)
#if !HAS_BED_PROBE
#error "LEVEL_CORNERS_USE_PROBE requires a real probe."
#error "BED_TRAMMING_USE_PROBE requires a real probe."
#elif ENABLED(SENSORLESS_PROBING)
#error "LEVEL_CORNERS_USE_PROBE is incompatible with SENSORLESS_PROBING."
#error "BED_TRAMMING_USE_PROBE is incompatible with SENSORLESS_PROBING."
#endif
#endif
#endif
@ -2952,8 +2958,8 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
#error "DWIN_CREALITY_LCD does not support PID_EDIT_MENU or PID_AUTOTUNE_MENU."
#elif EITHER(MPC_EDIT_MENU, MPC_AUTOTUNE_MENU)
#error "DWIN_CREALITY_LCD does not support MPC_EDIT_MENU or MPC_AUTOTUNE_MENU."
#elif ENABLED(LEVEL_BED_CORNERS)
#error "DWIN_CREALITY_LCD does not support LEVEL_BED_CORNERS."
#elif ENABLED(LCD_BED_TRAMMING)
#error "DWIN_CREALITY_LCD does not support LCD_BED_TRAMMING."
#elif BOTH(LCD_BED_LEVELING, PROBE_MANUALLY)
#error "DWIN_CREALITY_LCD does not support LCD_BED_LEVELING with PROBE_MANUALLY."
#endif
@ -2964,8 +2970,8 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
#error "DWIN_LCD_PROUI does not support PID_EDIT_MENU or PID_AUTOTUNE_MENU."
#elif EITHER(MPC_EDIT_MENU, MPC_AUTOTUNE_MENU)
#error "DWIN_LCD_PROUI does not support MPC_EDIT_MENU or MPC_AUTOTUNE_MENU."
#elif ENABLED(LEVEL_BED_CORNERS)
#error "DWIN_LCD_PROUI does not support LEVEL_BED_CORNERS."
#elif ENABLED(LCD_BED_TRAMMING)
#error "DWIN_LCD_PROUI does not support LCD_BED_TRAMMING."
#elif BOTH(LCD_BED_LEVELING, PROBE_MANUALLY)
#error "DWIN_LCD_PROUI does not support LCD_BED_LEVELING with PROBE_MANUALLY."
#endif
@ -4121,8 +4127,8 @@ static_assert(_PLUS_TEST(4), "HOMING_FEEDRATE_MM_M values must be positive.");
#error "DGUS_LCD_UI_RELOADED requires a bed probe."
#elif !HAS_MESH
#error "DGUS_LCD_UI_RELOADED requires mesh leveling."
#elif DISABLED(LEVEL_BED_CORNERS)
#error "DGUS_LCD_UI_RELOADED requires LEVEL_BED_CORNERS."
#elif DISABLED(LCD_BED_TRAMMING)
#error "DGUS_LCD_UI_RELOADED requires LCD_BED_TRAMMING."
#elif DISABLED(BABYSTEP_ALWAYS_AVAILABLE)
#error "DGUS_LCD_UI_RELOADED requires BABYSTEP_ALWAYS_AVAILABLE."
#elif DISABLED(BABYSTEP_ZPROBE_OFFSET)

View file

@ -466,7 +466,7 @@ void DGUSRxHandler::MoveToPoint(DGUS_VP &vp, void *data_ptr) {
}
const uint8_t point = ((uint8_t*)data_ptr)[1];
constexpr float lfrb[4] = LEVEL_CORNERS_INSET_LFRB;
constexpr float lfrb[4] = BED_TRAMMING_INSET_LFRB;
float x, y;
switch (point) {
@ -493,12 +493,12 @@ void DGUSRxHandler::MoveToPoint(DGUS_VP &vp, void *data_ptr) {
break;
}
if (ExtUI::getAxisPosition_mm(ExtUI::Z) < Z_MIN_POS + LEVEL_CORNERS_Z_HOP) {
ExtUI::setAxisPosition_mm(Z_MIN_POS + LEVEL_CORNERS_Z_HOP, ExtUI::Z);
if (ExtUI::getAxisPosition_mm(ExtUI::Z) < Z_MIN_POS + BED_TRAMMING_Z_HOP) {
ExtUI::setAxisPosition_mm(Z_MIN_POS + BED_TRAMMING_Z_HOP, ExtUI::Z);
}
ExtUI::setAxisPosition_mm(x, ExtUI::X);
ExtUI::setAxisPosition_mm(y, ExtUI::Y);
ExtUI::setAxisPosition_mm(Z_MIN_POS + LEVEL_CORNERS_HEIGHT, ExtUI::Z);
ExtUI::setAxisPosition_mm(Z_MIN_POS + BED_TRAMMING_HEIGHT, ExtUI::Z);
}
void DGUSRxHandler::Probe(DGUS_VP &vp, void *data_ptr) {

View file

@ -71,15 +71,15 @@ static_assert((DGUS_LEVEL_GRID_SIZE == GRID_MAX_POINTS_X * GRID_MAX_POINTS_Y), "
#define DGUS_DEFAULT_FILAMENT_LEN 10
#endif
#ifndef LEVEL_CORNERS_Z_HOP
#define LEVEL_CORNERS_Z_HOP 4.0
#ifndef BED_TRAMMING_Z_HOP
#define BED_TRAMMING_Z_HOP 4.0
#endif
#ifndef LEVEL_CORNERS_HEIGHT
#define LEVEL_CORNERS_HEIGHT 0.0
#ifndef BED_TRAMMING_HEIGHT
#define BED_TRAMMING_HEIGHT 0.0
#endif
static_assert(LEVEL_CORNERS_Z_HOP >= 0, "LEVEL_CORNERS_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.");
#ifndef DGUS_LEVEL_CENTER_X
#define DGUS_LEVEL_CENTER_X ((X_BED_SIZE) / 2)

View file

@ -47,7 +47,7 @@
///////////// Global Variables /////////////
////////////////////////////////////////////
#if HAS_LEVELING && ANY(LEVEL_BED_CORNERS, 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
#endif
#if ANY(PROBE_MANUALLY, MESH_BED_LEVELING, X_AXIS_TWIST_COMPENSATION)

View file

@ -211,7 +211,7 @@ void menu_move();
void lcd_move_z();
void _lcd_draw_homing();
#define HAS_LINE_TO_Z ANY(DELTA, PROBE_MANUALLY, MESH_BED_LEVELING, LEVEL_BED_CORNERS)
#define HAS_LINE_TO_Z ANY(DELTA, PROBE_MANUALLY, MESH_BED_LEVELING, LCD_BED_TRAMMING)
#if HAS_LINE_TO_Z
void line_to_z(const_float_t z);
@ -258,7 +258,7 @@ inline void clear_menu_history() { screen_history_depth = 0; }
#define STICKY_SCREEN(S) []{ ui.defer_status_screen(); ui.goto_screen(S); }
#if HAS_LEVELING && ANY(LEVEL_BED_CORNERS, 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;
#endif

View file

@ -26,7 +26,7 @@
#include "../../inc/MarlinConfigPre.h"
#if BOTH(HAS_MARLINUI_MENU, LEVEL_BED_CORNERS)
#if BOTH(HAS_MARLINUI_MENU, LCD_BED_TRAMMING)
#include "menu_item.h"
#include "../../module/motion.h"
@ -36,21 +36,21 @@
#include "../../feature/bedlevel/bedlevel.h"
#endif
#ifndef LEVEL_CORNERS_Z_HOP
#define LEVEL_CORNERS_Z_HOP 4.0
#ifndef BED_TRAMMING_Z_HOP
#define BED_TRAMMING_Z_HOP 4.0
#endif
#ifndef LEVEL_CORNERS_HEIGHT
#define LEVEL_CORNERS_HEIGHT 0.0
#ifndef BED_TRAMMING_HEIGHT
#define BED_TRAMMING_HEIGHT 0.0
#endif
#if ENABLED(LEVEL_CORNERS_USE_PROBE)
#if ENABLED(BED_TRAMMING_USE_PROBE)
#include "../../module/probe.h"
#include "../../module/endstops.h"
#if ENABLED(BLTOUCH)
#include "../../feature/bltouch.h"
#endif
#ifndef LEVEL_CORNERS_PROBE_TOLERANCE
#define LEVEL_CORNERS_PROBE_TOLERANCE 0.2
#ifndef BED_TRAMMING_PROBE_TOLERANCE
#define BED_TRAMMING_PROBE_TOLERANCE 0.2
#endif
float last_z;
int good_points;
@ -64,32 +64,32 @@
#endif
static_assert(LEVEL_CORNERS_Z_HOP >= 0, "LEVEL_CORNERS_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.");
#ifndef LEVEL_CORNERS_LEVELING_ORDER
#define LEVEL_CORNERS_LEVELING_ORDER { LF, RF, LB, RB } // Default
//#define LEVEL_CORNERS_LEVELING_ORDER { LF, LB, RF } // 3 hard-coded points
//#define LEVEL_CORNERS_LEVELING_ORDER { LF, RF } // 3-Point tramming - Rear
//#define LEVEL_CORNERS_LEVELING_ORDER { LF, LB } // 3-Point tramming - Right
//#define LEVEL_CORNERS_LEVELING_ORDER { RF, RB } // 3-Point tramming - Left
//#define LEVEL_CORNERS_LEVELING_ORDER { LB, RB } // 3-Point tramming - Front
#ifndef BED_TRAMMING_LEVELING_ORDER
#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, RF } // 3-Point tramming - Rear
//#define BED_TRAMMING_LEVELING_ORDER { LF, LB } // 3-Point tramming - Right
//#define BED_TRAMMING_LEVELING_ORDER { RF, RB } // 3-Point tramming - Left
//#define BED_TRAMMING_LEVELING_ORDER { LB, RB } // 3-Point tramming - Front
#endif
#define LF 1
#define RF 2
#define RB 3
#define LB 4
constexpr int lco[] = LEVEL_CORNERS_LEVELING_ORDER;
constexpr int lco[] = BED_TRAMMING_LEVELING_ORDER;
constexpr bool level_corners_3_points = COUNT(lco) == 2;
static_assert(level_corners_3_points || COUNT(lco) == 4, "LEVEL_CORNERS_LEVELING_ORDER must have exactly 2 or 4 corners.");
static_assert(level_corners_3_points || COUNT(lco) == 4, "BED_TRAMMING_LEVELING_ORDER must have exactly 2 or 4 corners.");
constexpr int lcodiff = ABS(lco[0] - lco[1]);
static_assert(COUNT(lco) == 4 || lcodiff == 1 || lcodiff == 3, "The first two LEVEL_CORNERS_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 available_points = nr_edge_points + ENABLED(LEVEL_CENTER_TOO);
constexpr int center_index = TERN(LEVEL_CENTER_TOO, available_points - 1, -1);
constexpr float inset_lfrb[4] = LEVEL_CORNERS_INSET_LFRB;
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 float inset_lfrb[4] = BED_TRAMMING_INSET_LFRB;
constexpr xy_pos_t lf { (X_MIN_BED) + inset_lfrb[0], (Y_MIN_BED) + inset_lfrb[1] },
rb { (X_MAX_BED) - inset_lfrb[2], (Y_MAX_BED) - inset_lfrb[3] };
@ -120,12 +120,12 @@ static void _lcd_level_bed_corners_get_next_position() {
if ((lco[0] == LF && lco[1] == LB) || (lco[0] == LB && lco[1] == LF)) current_position.x = rb.x; // Center Right
if ((lco[0] == RF && lco[1] == RB) || (lco[0] == RB && lco[1] == RF)) current_position.x = lf.x; // Left Center
if ((lco[0] == LF && lco[1] == RF) || (lco[0] == RF && lco[1] == LF)) current_position.y = rb.y; // Center Back
#if DISABLED(LEVEL_CENTER_TOO) && ENABLED(LEVEL_CORNERS_USE_PROBE)
#if DISABLED(BED_TRAMMING_INCLUDE_CENTER) && ENABLED(BED_TRAMMING_USE_PROBE)
bed_corner++; // Must increment the count to ensure it resets the loop if the 3rd point is out of tolerance
#endif
break;
#if ENABLED(LEVEL_CENTER_TOO)
#if ENABLED(BED_TRAMMING_INCLUDE_CENTER)
case 3:
current_position.set(X_CENTER, Y_CENTER);
break;
@ -134,9 +134,9 @@ static void _lcd_level_bed_corners_get_next_position() {
}
else {
// Four-Corner Bed Tramming with optional center
if (TERN0(LEVEL_CENTER_TOO, bed_corner == center_index)) {
if (TERN0(BED_TRAMMING_INCLUDE_CENTER, bed_corner == center_index)) {
current_position.set(X_CENTER, Y_CENTER);
TERN_(LEVEL_CORNERS_USE_PROBE, good_points--); // Decrement to allow one additional probe point
TERN_(BED_TRAMMING_USE_PROBE, good_points--); // Decrement to allow one additional probe point
}
else {
current_position = lf; // Left front
@ -152,10 +152,10 @@ static void _lcd_level_bed_corners_get_next_position() {
/**
* Level corners, starting in the front-left corner.
*/
#if ENABLED(LEVEL_CORNERS_USE_PROBE)
#if ENABLED(BED_TRAMMING_USE_PROBE)
#define VALIDATE_POINT(X, Y, STR) static_assert(Probe::build_time::can_reach((X), (Y)), \
"LEVEL_CORNERS_INSET_LFRB " STR " inset is not reachable with the default NOZZLE_TO_PROBE offset and PROBING_MARGIN.")
"BED_TRAMMING_INSET_LFRB " STR " inset is not reachable with the default NOZZLE_TO_PROBE offset and PROBING_MARGIN.")
VALIDATE_POINT(lf.x, Y_CENTER, "left"); VALIDATE_POINT(X_CENTER, lf.y, "front");
VALIDATE_POINT(rb.x, Y_CENTER, "right"); VALIDATE_POINT(X_CENTER, rb.y, "back");
@ -216,16 +216,16 @@ static void _lcd_level_bed_corners_get_next_position() {
}
bool _lcd_level_bed_corners_probe(bool verify=false) {
if (verify) do_blocking_move_to_z(current_position.z + LEVEL_CORNERS_Z_HOP); // do clearance if needed
if (verify) do_blocking_move_to_z(current_position.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
do_blocking_move_to_z(last_z - LEVEL_CORNERS_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
endstops.hit_on_purpose();
set_current_from_steppers_for_axis(Z_AXIS);
sync_plan_position();
TERN_(BLTOUCH, if (!bltouch.high_speed_mode) bltouch.stow()); // Stow in LOW SPEED MODE on every trigger
// Triggered outside tolerance range?
if (ABS(current_position.z - last_z) > LEVEL_CORNERS_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.
good_points = 0; // ...and start over
}
@ -245,7 +245,7 @@ static void _lcd_level_bed_corners_get_next_position() {
probe_triggered = PROBE_TRIGGERED();
if (probe_triggered) {
endstops.hit_on_purpose();
TERN_(LEVEL_CORNERS_AUDIO_FEEDBACK, BUZZ(200, 600));
TERN_(BED_TRAMMING_AUDIO_FEEDBACK, BUZZ(200, 600));
}
idle();
}
@ -255,8 +255,8 @@ static void _lcd_level_bed_corners_get_next_position() {
}
void _lcd_test_corners() {
bed_corner = TERN(LEVEL_CENTER_TOO, center_index, 0);
last_z = LEVEL_CORNERS_HEIGHT;
bed_corner = TERN(BED_TRAMMING_INCLUDE_CENTER, center_index, 0);
last_z = BED_TRAMMING_HEIGHT;
endstops.enable_z_probe(true);
good_points = 0;
ui.goto_screen(_lcd_draw_probing);
@ -264,7 +264,7 @@ static void _lcd_level_bed_corners_get_next_position() {
ui.refresh(LCDVIEW_REDRAW_NOW);
_lcd_draw_probing(); // update screen with # of good points
do_blocking_move_to_z(current_position.z + LEVEL_CORNERS_Z_HOP + TERN0(BLTOUCH, bltouch.z_extra_clearance())); // clearance
do_blocking_move_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
current_position -= probe.offset_xy; // Account for probe offsets
@ -273,7 +273,7 @@ static void _lcd_level_bed_corners_get_next_position() {
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_level_bed_corners_raise()) { // Prompt user to raise bed if needed
#if ENABLED(LEVEL_CORNERS_VERIFY_RAISED) // Verify
#if ENABLED(BED_TRAMMING_VERIFY_RAISED) // Verify
while (!_lcd_level_bed_corners_probe(true)) { // Loop while corner verified
if (!_lcd_level_bed_corners_raise()) { // Prompt user to raise bed if needed
if (corner_probing_done) return; // Done was selected
@ -294,7 +294,7 @@ static void _lcd_level_bed_corners_get_next_position() {
#if ENABLED(BLTOUCH)
if (bltouch.high_speed_mode) {
// In HIGH SPEED MODE do clearance and stow at the very end
do_blocking_move_to_z(current_position.z + LEVEL_CORNERS_Z_HOP);
do_blocking_move_to_z(current_position.z + BED_TRAMMING_Z_HOP);
bltouch.stow();
}
#endif
@ -303,25 +303,25 @@ static void _lcd_level_bed_corners_get_next_position() {
ui.set_selection(true);
}
#else // !LEVEL_CORNERS_USE_PROBE
#else // !BED_TRAMMING_USE_PROBE
static void _lcd_goto_next_corner() {
line_to_z(LEVEL_CORNERS_Z_HOP);
line_to_z(BED_TRAMMING_Z_HOP);
// Select next corner coordinates
_lcd_level_bed_corners_get_next_position();
line_to_current_position(manual_feedrate_mm_s.x);
line_to_z(LEVEL_CORNERS_HEIGHT);
line_to_z(BED_TRAMMING_HEIGHT);
if (++bed_corner >= available_points) bed_corner = 0;
}
#endif // !LEVEL_CORNERS_USE_PROBE
#endif // !BED_TRAMMING_USE_PROBE
static void _lcd_level_bed_corners_homing() {
_lcd_draw_homing();
if (!all_axes_homed()) return;
#if ENABLED(LEVEL_CORNERS_USE_PROBE)
#if ENABLED(BED_TRAMMING_USE_PROBE)
_lcd_test_corners();
if (corner_probing_done) ui.goto_previous_screen_no_defer();
TERN_(HAS_LEVELING, set_bed_leveling_enabled(leveling_was_active));
@ -333,11 +333,11 @@ static void _lcd_level_bed_corners_homing() {
GET_TEXT_F(MSG_BUTTON_NEXT), GET_TEXT_F(MSG_BUTTON_DONE)
, _lcd_goto_next_corner
, []{
line_to_z(LEVEL_CORNERS_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));
ui.goto_previous_screen_no_defer();
}
, GET_TEXT_F(TERN(LEVEL_CENTER_TOO, MSG_LEVEL_BED_NEXT_POINT, MSG_NEXT_CORNER))
, GET_TEXT_F(TERN(BED_TRAMMING_INCLUDE_CENTER, MSG_LEVEL_BED_NEXT_POINT, MSG_NEXT_CORNER))
, (const char*)nullptr, F("?")
);
});
@ -362,4 +362,4 @@ void _lcd_level_bed_corners() {
ui.goto_screen(_lcd_level_bed_corners_homing);
}
#endif // HAS_MARLINUI_MENU && LEVEL_BED_CORNERS
#endif // HAS_MARLINUI_MENU && LCD_BED_TRAMMING

View file

@ -290,7 +290,7 @@ void menu_bed_leveling() {
EDIT_ITEM(LCD_Z_OFFSET_TYPE, MSG_ZPROBE_ZOFFSET, &probe.offset.z, Z_PROBE_OFFSET_RANGE_MIN, Z_PROBE_OFFSET_RANGE_MAX);
#endif
#if ENABLED(LEVEL_BED_CORNERS)
#if ENABLED(LCD_BED_TRAMMING)
SUBMENU(MSG_BED_TRAMMING, _lcd_level_bed_corners);
#endif

View file

@ -466,7 +466,7 @@ class MenuItem_bool : public MenuEditItemBase {
#define YESNO_ITEM_N_F(N,FLABEL, V...) CONFIRM_ITEM_N_F(N, FLABEL, MSG_YES, MSG_NO, ##V)
#define YESNO_ITEM_N(N,LABEL, V...) YESNO_ITEM_N_F(N, GET_TEXT_F(LABEL), ##V)
#if ENABLED(LEVEL_BED_CORNERS)
#if ENABLED(LCD_BED_TRAMMING)
void _lcd_level_bed_corners();
#endif

View file

@ -491,7 +491,7 @@ void menu_motion() {
#endif
#if ENABLED(LEVEL_BED_CORNERS) && DISABLED(LCD_BED_LEVELING)
#if ENABLED(LCD_BED_TRAMMING) && DISABLED(LCD_BED_LEVELING)
SUBMENU(MSG_BED_TRAMMING, _lcd_level_bed_corners);
#endif

View file

@ -53,7 +53,7 @@
#if ENABLED(BACKLASH_GCODE)
#define HAS_MENU_BACKLASH
#endif
#if ENABLED(LEVEL_BED_CORNERS)
#if ENABLED(LCD_BED_TRAMMING)
#define HAS_MENU_BED_CORNERS
#endif
#if ENABLED(CANCEL_OBJECTS)

View file

@ -10,7 +10,7 @@ restore_configs
opt_set MOTHERBOARD BOARD_BTT_GTR_V1_0 SERIAL_PORT 3 \
EXTRUDERS 8 TEMP_SENSOR_1 1 TEMP_SENSOR_2 1 TEMP_SENSOR_3 1 TEMP_SENSOR_4 1 TEMP_SENSOR_5 1 TEMP_SENSOR_6 1 TEMP_SENSOR_7 1
opt_enable SDSUPPORT USB_FLASH_DRIVE_SUPPORT USE_OTG_USB_HOST \
REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER BLTOUCH LEVEL_BED_CORNERS LEVEL_CORNERS_USE_PROBE \
REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER BLTOUCH LCD_BED_TRAMMING BED_TRAMMING_USE_PROBE \
NEOPIXEL_LED Z_SAFE_HOMING FILAMENT_RUNOUT_SENSOR NOZZLE_PARK_FEATURE ADVANCED_PAUSE_FEATURE
# Not necessary to enable auto-fan for all extruders to hit problematic code paths
opt_set E0_AUTO_FAN_PIN PC10 E1_AUTO_FAN_PIN PC11 E2_AUTO_FAN_PIN PC12 NEOPIXEL_PIN PF13 \

View file

@ -21,7 +21,7 @@ opt_set MOTHERBOARD BOARD_SMOOTHIEBOARD \
opt_enable TFTGLCD_PANEL_SPI SDSUPPORT ADAPTIVE_FAN_SLOWING NO_FAN_SLOWING_IN_PID_TUNING \
MAX31865_SENSOR_OHMS_0 MAX31865_CALIBRATION_OHMS_0 \
FIX_MOUNTED_PROBE AUTO_BED_LEVELING_BILINEAR G29_RETRY_AND_RECOVER Z_MIN_PROBE_REPEATABILITY_TEST DEBUG_LEVELING_FEATURE \
BABYSTEPPING BABYSTEP_XY BABYSTEP_ZPROBE_OFFSET LEVEL_CORNERS_USE_PROBE LEVEL_CORNERS_VERIFY_RAISED \
BABYSTEPPING BABYSTEP_XY BABYSTEP_ZPROBE_OFFSET BED_TRAMMING_USE_PROBE BED_TRAMMING_VERIFY_RAISED \
PRINTCOUNTER NOZZLE_PARK_FEATURE NOZZLE_CLEAN_FEATURE SLOW_PWM_HEATERS PIDTEMPBED EEPROM_SETTINGS INCH_MODE_SUPPORT TEMPERATURE_UNITS_SUPPORT \
Z_SAFE_HOMING ADVANCED_PAUSE_FEATURE PARK_HEAD_ON_PAUSE \
LCD_INFO_MENU ARC_SUPPORT BEZIER_CURVE_SUPPORT EXTENDED_CAPABILITIES_REPORT AUTO_REPORT_TEMPERATURES SDCARD_SORT_ALPHA EMERGENCY_PARSER

View file

@ -24,7 +24,7 @@ opt_enable USE_ZMAX_PLUG REPRAP_DISCOUNT_SMART_CONTROLLER LCD_PROGRESS_BAR LCD_P
BLINKM PCA9533 PCA9632 RGB_LED RGB_LED_R_PIN RGB_LED_G_PIN RGB_LED_B_PIN LED_CONTROL_MENU \
NEOPIXEL_LED NEOPIXEL_PIN CASE_LIGHT_ENABLE CASE_LIGHT_USE_NEOPIXEL CASE_LIGHT_MENU \
PID_PARAMS_PER_HOTEND PID_AUTOTUNE_MENU PID_EDIT_MENU LCD_SHOW_E_TOTAL \
PRINTCOUNTER SERVICE_NAME_1 SERVICE_INTERVAL_1 LEVEL_BED_CORNERS LEVEL_CENTER_TOO \
PRINTCOUNTER SERVICE_NAME_1 SERVICE_INTERVAL_1 LCD_BED_TRAMMING BED_TRAMMING_INCLUDE_CENTER \
NOZZLE_PARK_FEATURE FILAMENT_RUNOUT_SENSOR FILAMENT_RUNOUT_DISTANCE_MM \
ADVANCED_PAUSE_FEATURE FILAMENT_LOAD_UNLOAD_GCODES FILAMENT_UNLOAD_ALL_EXTRUDERS \
PASSWORD_FEATURE PASSWORD_ON_STARTUP PASSWORD_ON_SD_PRINT_MENU PASSWORD_AFTER_SD_PRINT_END PASSWORD_AFTER_SD_PRINT_ABORT \
@ -51,13 +51,13 @@ opt_set MOTHERBOARD BOARD_RAMBO \
DEFAULT_MAX_ACCELERATION '{ 3000, 3000, 100 }' \
MANUAL_FEEDRATE '{ 50*60, 50*60, 4*60 }' \
AXIS_RELATIVE_MODES '{ false, false, false }' \
LEVEL_CORNERS_LEVELING_ORDER '{ LF, RF }' \
BED_TRAMMING_LEVELING_ORDER '{ LF, RF }' \
X2_DRIVER_TYPE A4988 Y2_DRIVER_TYPE A4988
opt_enable USE_XMAX_PLUG USE_YMAX_PLUG USE_ZMAX_PLUG \
REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER REVERSE_ENCODER_DIRECTION SDSUPPORT EEPROM_SETTINGS \
S_CURVE_ACCELERATION X_DUAL_ENDSTOPS Y_DUAL_ENDSTOPS \
ADAPTIVE_STEP_SMOOTHING CNC_COORDINATE_SYSTEMS GCODE_MOTION_MODES \
LEVEL_BED_CORNERS LEVEL_CENTER_TOO
LCD_BED_TRAMMING BED_TRAMMING_INCLUDE_CENTER
opt_disable MIN_SOFTWARE_ENDSTOP_Z MAX_SOFTWARE_ENDSTOPS
exec_test $1 $2 "Rambo CNC Configuration" "$3"