config, sanity, rts

This commit is contained in:
Scott Lahteine
2025-11-10 00:29:17 -06:00
parent 80a1c129f1
commit 5e3f61cc7c
5 changed files with 30 additions and 21 deletions
+2 -1
View File
@@ -2317,7 +2317,6 @@
//#define 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_HEIGHT 0.0 // (mm) Z height of nozzle at tramming points
#define BED_TRAMMING_Z_HOP 4.0 // (mm) Z raise between tramming points
//#define BED_TRAMMING_INCLUDE_CENTER // Move to the center after the last corner
@@ -2326,6 +2325,8 @@
#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
#else
#define BED_TRAMMING_INSET_LFRB { 30, 30, 30, 30 } // (mm) Left, Front, Right, Back insets
#endif
/**
+1 -1
View File
@@ -1643,7 +1643,7 @@ static_assert(NUM_SERVOS <= NUM_SERVO_PLUGS, "NUM_SERVOS (or some servo index) i
#error "BED_TRAMMING_USE_PROBE is incompatible with SENSORLESS_PROBING."
#endif
#elif !defined(BED_TRAMMING_INSET_LFRB)
#error "LCD_BED_TRAMMING requires BED_TRAMMING_INSET_LFRB values."
#error "LCD_BED_TRAMMING without BED_TRAMMING_USE_PROBE requires BED_TRAMMING_INSET_LFRB."
#endif
static_assert(BED_TRAMMING_Z_HOP >= 0, "BED_TRAMMING_Z_HOP must be >= 0.");
#elif ANY(DGUS_LCD_UI_RELOADED, DGUS_LCD_UI_E3S1PRO)
+11 -13
View File
@@ -199,10 +199,6 @@ typedef struct {
} select_t;
select_t select_page{0}, select_print{0};
#if ENABLED(LCD_BED_TRAMMING) && DISABLED(BED_TRAMMING_USE_PROBE)
constexpr float bed_tramming_inset_lfrb[] = BED_TRAMMING_INSET_LFRB;
#endif
bool hash_changed = true; // Flag to know if message status was changed
bool blink = false;
uint8_t checkkey = 255, last_checkkey = ID_MainMenu;
@@ -2434,34 +2430,36 @@ void setFlow() { setPIntOnClick(FLOW_EDIT_MIN, FLOW_EDIT_MAX, []{ planner.refres
void tramXY(const uint8_t point, float &x, float &y) {
#if ENABLED(BED_TRAMMING_USE_PROBE)
constexpr float slop = 0.01f;
float bed_tramming_inset_lfrb[] = {
float lfrb[] = {
(X_MIN_BED) + probe.min_x() + slop,
(Y_MIN_BED) + probe.min_y() + slop,
(X_MAX_BED) - probe.max_x() - slop,
(Y_MAX_BED) - probe.max_y() - slop
};
#else
constexpr float lfrb[] = BED_TRAMMING_INSET_LFRB;
#endif
switch (point) {
case 0:
LCD_MESSAGE(MSG_TRAM_FL);
x = bed_tramming_inset_lfrb[0];
y = bed_tramming_inset_lfrb[1];
x = lfrb[0];
y = lfrb[1];
break;
case 1:
LCD_MESSAGE(MSG_TRAM_FR);
x = X_BED_SIZE - bed_tramming_inset_lfrb[2];
y = bed_tramming_inset_lfrb[1];
x = X_BED_SIZE - lfrb[2];
y = lfrb[1];
break;
case 2:
LCD_MESSAGE(MSG_TRAM_BR);
x = X_BED_SIZE - bed_tramming_inset_lfrb[2];
y = Y_BED_SIZE - bed_tramming_inset_lfrb[3];
x = X_BED_SIZE - lfrb[2];
y = Y_BED_SIZE - lfrb[3];
break;
case 3:
LCD_MESSAGE(MSG_TRAM_BL);
x = bed_tramming_inset_lfrb[0];
y = Y_BED_SIZE - bed_tramming_inset_lfrb[3];
x = lfrb[0];
y = Y_BED_SIZE - lfrb[3];
break;
#if ENABLED(BED_TRAMMING_INCLUDE_CENTER)
case 4:
@@ -42,6 +42,10 @@ using namespace ExtUI;
#include <string.h> // for memset
#if ENABLED(BED_TRAMMING_USE_PROBE)
#include "../../../module/probe.h"
#endif
// Singleton instance
RTS rts;
@@ -690,7 +694,14 @@ void RTS::handleData() {
return;
}
#if ENABLED(LCD_BED_TRAMMING)
#if ENABLED(BED_TRAMMING_USE_PROBE)
float lfrb[4] = {
(X_MIN_BED) + probe.min_x(),
(Y_MIN_BED) + probe.min_y(),
(X_MAX_BED) - probe.max_x(),
(Y_MAX_BED) - probe.max_y()
};
#else
constexpr float lfrb[4] = BED_TRAMMING_INSET_LFRB;
#endif
+4 -5
View File
@@ -87,11 +87,6 @@ static_assert(COUNT(lco) == 4 || lcodiff == 1 || lcodiff == 3, "The first two BE
constexpr int nr_edge_points = tramming_3_points ? 3 : 4;
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);
#if DISABLED(BED_TRAMMING_USE_PROBE)
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] };
#endif
static int8_t bed_corner;
/**
@@ -102,6 +97,10 @@ static void _lcd_goto_next_corner() {
constexpr float slop = 0.01f;
const xy_pos_t lf = { (X_MIN_BED) + probe.min_x() + slop, (Y_MIN_BED) + probe.min_y() + slop },
rb = { (X_MAX_BED) - probe.max_x() - slop, (Y_MAX_BED) - probe.max_y() - slop };
#else
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] };
#endif
xy_pos_t corner_point = lf; // Left front