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

Add Extra ProUI features #26761

Open
wants to merge 61 commits into
base: bugfix-2.1.x
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 43 commits
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
1129b71
add Cancel ABL, other abl fixes
classicrocker883 Jan 31, 2024
2f1929b
add EXIT_PROBE_MESH
classicrocker883 Feb 1, 2024
87ed27a
fixes for dwin
classicrocker883 Feb 1, 2024
d0e400e
fixes for dwin, add probe_offset to G29
classicrocker883 Feb 2, 2024
2266b79
remove homeZ
classicrocker883 Feb 3, 2024
bb89c67
add multipleProbing
classicrocker883 Feb 3, 2024
059b9b4
revert menus.cpp ^= true, save for other PR
classicrocker883 Feb 3, 2024
6242d1d
add zprobeFeed(rate) feature
classicrocker883 Feb 3, 2024
0ae89c0
update menu options
classicrocker883 Feb 3, 2024
c535a9b
add variable Mesh_Inset
classicrocker883 Feb 4, 2024
bed57fe
add another run_z_probe function for testing
classicrocker883 Feb 4, 2024
8a671ee
update meshinset
classicrocker883 Feb 4, 2024
396bb6c
add GRID points
classicrocker883 Feb 5, 2024
c47cfe4
add grid points (UBL)
classicrocker883 Feb 5, 2024
de13f6d
Merge branch 'bugfix-2.1.x' of https://github.com/MarlinFirmware/Marl…
classicrocker883 Feb 6, 2024
9506730
update for Bilinear + UBL, kinda for MBL (needs more testing)
classicrocker883 Feb 7, 2024
ee716be
Merge branch 'bugfix-2.1.x' of https://github.com/MarlinFirmware/Marl…
classicrocker883 Feb 7, 2024
581803b
couple tweaks
classicrocker883 Feb 7, 2024
70e9ed7
update drawmeshpoints
classicrocker883 Feb 8, 2024
ef22fec
update fix for Mesh bed leveling + the others
classicrocker883 Feb 8, 2024
9aa0573
Merge branch 'bugfix-2.1.x' of https://github.com/MarlinFirmware/Marl…
classicrocker883 Feb 8, 2024
bca866a
update run_z_probe
classicrocker883 Feb 9, 2024
ef01edf
Merge branch 'bugfix-2.1.x' of https://github.com/MarlinFirmware/Marl…
classicrocker883 Feb 9, 2024
c5d7e68
move resetMesh
classicrocker883 Feb 10, 2024
7930249
update settings.cpp gridpoints
classicrocker883 Feb 11, 2024
dc1d4e7
add tram() exclusion
classicrocker883 Feb 15, 2024
0702de9
Merge branch 'bugfix-2.1.x' of https://github.com/MarlinFirmware/Marl…
classicrocker883 Feb 18, 2024
6b719b8
tweak - remove unused
classicrocker883 Feb 19, 2024
859746c
typo
classicrocker883 Feb 21, 2024
038b1db
grid_loop test (warning)
classicrocker883 Feb 21, 2024
114fad2
revert back (test), typos
classicrocker883 Feb 21, 2024
6e5cfd3
adjust ubl_G29 for narrowing conv.
classicrocker883 Feb 29, 2024
f05713e
adjust ubl_G29 spacing
classicrocker883 Feb 29, 2024
cc67a8a
update dwin.cpp, rearrange menu items - add levelMenu
classicrocker883 Mar 14, 2024
ea12b4f
Merge branch 'bugfix-2.1.x' of https://github.com/MarlinFirmware/Marl…
classicrocker883 Mar 14, 2024
4cee1c1
move hmiData to dwin_defines.h, tweak
classicrocker883 Apr 6, 2024
a0647e9
Merge branch 'bugfix-2.1.x' of https://github.com/MarlinFirmware/Marl…
classicrocker883 Apr 14, 2024
ffa5c64
update - merge fixes
classicrocker883 Apr 14, 2024
d67a23f
fix a compile err
thinkyhead Apr 14, 2024
5a9961e
maybe fixes mesh_inset?
classicrocker883 Apr 15, 2024
1226dae
fix editable mesh_inset to work, update get_mesh_x/y()
classicrocker883 Apr 15, 2024
3244427
update gcode_preview to work better
classicrocker883 Apr 15, 2024
b21a8d8
call for ubl
thinkyhead Apr 16, 2024
953f6ba
remove PROUI_GRID_PNTS
classicrocker883 Apr 19, 2024
6039e2b
Merge branch 'bugfix-2.1.x' of https://github.com/MarlinFirmware/Marl…
classicrocker883 Apr 23, 2024
04da879
update for ABL - Bilinear variable mesh_inset
classicrocker883 Apr 28, 2024
61a1d91
Merge branch 'bugfix-2.1.x' of https://github.com/MarlinFirmware/Marl…
classicrocker883 May 22, 2024
5b615f0
add mesh viewer to display_map
classicrocker883 May 22, 2024
580db49
Merge branch 'bugfix-2.1.x' of https://github.com/MarlinFirmware/Marl…
classicrocker883 May 28, 2024
a18ef72
revert settings.cpp
classicrocker883 May 28, 2024
f49ace9
remove comments motion.h
classicrocker883 May 28, 2024
e319336
revert some, change some
classicrocker883 May 28, 2024
41a7d62
revert ubl.cpp
classicrocker883 May 28, 2024
ef45055
update from other PR for here
classicrocker883 May 29, 2024
c42dbd7
update dwin.cpp - remove duplicate
classicrocker883 May 30, 2024
b3dcfcc
add missing declaration
classicrocker883 May 30, 2024
fb61d5c
adjust spacing, rearrange MESH_##_DIST
classicrocker883 Jun 1, 2024
f2afc3b
Merge https://github.com/MarlinFirmware/Marlin into bugfix-2.1.x-Jan2
classicrocker883 Jun 27, 2024
7ce624d
Merge https://github.com/MarlinFirmware/Marlin into bugfix-2.1.x-Jan2
classicrocker883 Jul 13, 2024
1f17c48
Merge https://github.com/MarlinFirmware/Marlin into bugfix-2.1.x-Jan2
classicrocker883 Aug 2, 2024
1d505eb
Merge branch 'bugfix-2.1.x' of https://github.com/MarlinFirmware/Marl…
classicrocker883 Oct 21, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Marlin/src/core/utility.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ void safe_delay(millis_t ms); // Delay ensuring that temperatures are
inline void serial_delay(const millis_t) {}
#endif

#if GRID_MAX_POINTS
#if TERN(PROUI_GRID_PNTS, HAS_MESH, GRID_MAX_POINTS)
thinkyhead marked this conversation as resolved.
Show resolved Hide resolved

// 16x16 bit arrays
template <int W, int H>
Expand All @@ -49,7 +49,7 @@ void safe_delay(millis_t ms); // Delay ensuring that temperatures are
inline bool marked(const xy_int8_t &xy) { return marked(xy.x, xy.y); }
};

typedef FlagBits<GRID_MAX_POINTS_X, GRID_MAX_POINTS_Y> MeshFlags;
typedef FlagBits<TERN(PROUI_GRID_PNTS, GRID_LIMIT, GRID_MAX_POINTS_X), TERN(PROUI_GRID_PNTS, GRID_LIMIT, GRID_MAX_POINTS_Y)> MeshFlags;

#endif

Expand Down
20 changes: 10 additions & 10 deletions Marlin/src/feature/bedlevel/abl/bbl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,12 @@

LevelingBilinear bedlevel;

xy_pos_t LevelingBilinear::grid_spacing,
LevelingBilinear::grid_start;
xy_float_t LevelingBilinear::grid_factor;
bed_mesh_t LevelingBilinear::z_values;
xy_pos_t LevelingBilinear::cached_rel;
xy_pos_t LevelingBilinear::grid_spacing,
LevelingBilinear::grid_start,
LevelingBilinear::cached_rel;
xy_int8_t LevelingBilinear::cached_g;
bed_mesh_t LevelingBilinear::z_values;

/**
* Extrapolate a single point from its neighbors
Expand Down Expand Up @@ -118,18 +118,18 @@ void LevelingBilinear::set_grid(const xy_pos_t& _grid_spacing, const xy_pos_t& _
*/
void LevelingBilinear::extrapolate_unprobed_bed_level() {
#ifdef HALF_IN_X
constexpr uint8_t ctrx2 = 0, xend = GRID_MAX_POINTS_X - 1;
TERN(PROUI_GRID_PNTS, const, constexpr) uint8_t ctrx2 = 0, xend = GRID_MAX_POINTS_X - 1;
#else
constexpr uint8_t ctrx1 = (GRID_MAX_CELLS_X) / 2, // left-of-center
ctrx2 = (GRID_MAX_POINTS_X) / 2, // right-of-center
TERN(PROUI_GRID_PNTS, const, constexpr) uint8_t ctrx1 = (GRID_MAX_CELLS_X) / 2, // left-of-center
ctrx2 = (GRID_MAX_POINTS_X) / 2, // right-of-center
xend = ctrx1;
#endif

#ifdef HALF_IN_Y
constexpr uint8_t ctry2 = 0, yend = GRID_MAX_POINTS_Y - 1;
TERN(PROUI_GRID_PNTS, const, constexpr) uint8_t ctry2 = 0, yend = GRID_MAX_POINTS_Y - 1;
#else
constexpr uint8_t ctry1 = (GRID_MAX_CELLS_Y) / 2, // top-of-center
ctry2 = (GRID_MAX_POINTS_Y) / 2, // bottom-of-center
TERN(PROUI_GRID_PNTS, const, constexpr) uint8_t ctry1 = (GRID_MAX_CELLS_Y) / 2, // top-of-center
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can't use TERN() with the integer define PROUI_GRID_PNTS.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wait im confused, PROUI_GRID_PNTS is enabled by being defined as 1 - like "true". just as many other examples use TERN or TERN_(HAS_....), as in HAS_whatever also defined as 1

ctry2 = (GRID_MAX_POINTS_Y) / 2, // bottom-of-center
yend = ctry1;
#endif

Expand Down
10 changes: 8 additions & 2 deletions Marlin/src/feature/bedlevel/abl/bbl.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,14 @@ class LevelingBilinear {
static void extrapolate_one_point(const uint8_t x, const uint8_t y, const int8_t xdir, const int8_t ydir);

#if ENABLED(ABL_BILINEAR_SUBDIVISION)
#define ABL_GRID_POINTS_VIRT_X (GRID_MAX_CELLS_X * (BILINEAR_SUBDIVISIONS) + 1)
#define ABL_GRID_POINTS_VIRT_Y (GRID_MAX_CELLS_Y * (BILINEAR_SUBDIVISIONS) + 1)
#if PROUI_GRID_PNTS
#define ABL_GRID_POINTS_VIRT_N (GRID_LIMIT - 1) * (BILINEAR_SUBDIVISIONS) + 1
#define ABL_GRID_POINTS_VIRT_X ABL_GRID_POINTS_VIRT_N
#define ABL_GRID_POINTS_VIRT_Y ABL_GRID_POINTS_VIRT_N
#else
#define ABL_GRID_POINTS_VIRT_X (GRID_MAX_CELLS_X * (BILINEAR_SUBDIVISIONS) + 1)
#define ABL_GRID_POINTS_VIRT_Y (GRID_MAX_CELLS_Y * (BILINEAR_SUBDIVISIONS) + 1)
#endif

static float z_values_virt[ABL_GRID_POINTS_VIRT_X][ABL_GRID_POINTS_VIRT_Y];
static xy_pos_t grid_spacing_virt;
Expand Down
10 changes: 9 additions & 1 deletion Marlin/src/feature/bedlevel/bedlevel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,16 @@
#include "../../lcd/extui/ui_api.h"
#endif

#if ALL(MESH_BED_LEVELING, DWIN_LCD_PROUI)
#include "../../lcd/e3v2/proui/bedlevel_tools.h"
#endif

bool leveling_is_valid() {
return TERN1(HAS_MESH, bedlevel.mesh_is_valid());
#if ALL(MESH_BED_LEVELING, DWIN_LCD_PROUI)
return bedLevelTools.meshValidate();
#else
return TERN1(HAS_MESH, bedlevel.mesh_is_valid());
#endif
}

/**
Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/feature/bedlevel/bedlevel.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ class TemporaryBedLevelingState {

#if HAS_MESH

typedef float bed_mesh_t[GRID_MAX_POINTS_X][GRID_MAX_POINTS_Y];
typedef float bed_mesh_t[TERN(PROUI_GRID_PNTS, GRID_LIMIT, GRID_MAX_POINTS_X)][TERN(PROUI_GRID_PNTS, GRID_LIMIT, GRID_MAX_POINTS_Y)];

#if ENABLED(AUTO_BED_LEVELING_BILINEAR)
#include "abl/bbl.h"
Expand Down
21 changes: 15 additions & 6 deletions Marlin/src/feature/bedlevel/hilbert_curve.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,21 @@
#include "bedlevel.h"
#include "hilbert_curve.h"

constexpr int8_t to_fix(int8_t v) { return v * 2; }
constexpr int8_t to_int(int8_t v) { return v / 2; }
constexpr uint8_t log2(uint8_t n) { return (n > 1) ? 1 + log2(uint8_t(n >> 1)) : 0; }
constexpr uint8_t order(uint8_t n) { return uint8_t(log2(uint8_t(n - 1))) + 1; }
constexpr uint8_t ord = order(_MAX(GRID_MAX_POINTS_X, GRID_MAX_POINTS_Y));
constexpr uint8_t dim = _BV(ord);
#if PROUI_GRID_PNTS
int8_t to_fix(int8_t v) { return v * 2; }
int8_t to_int(int8_t v) { return v / 2; }
uint8_t log2(uint8_t n) { return (n > 1) ? 1 + log2(uint8_t(n >> 1)) : 0; }
uint8_t order(uint8_t n) { return uint8_t(log2(uint8_t(n - 1))) + 1; }
#define ord order(GRID_MAX_POINTS_X)
#define dim _BV(ord)
#else
constexpr int8_t to_fix(int8_t v) { return v * 2; }
constexpr int8_t to_int(int8_t v) { return v / 2; }
constexpr uint8_t log2(uint8_t n) { return (n > 1) ? 1 + log2(uint8_t(n >> 1)) : 0; }
constexpr uint8_t order(uint8_t n) { return uint8_t(log2(uint8_t(n - 1))) + 1; }
constexpr uint8_t ord = order(_MAX(GRID_MAX_POINTS_X, GRID_MAX_POINTS_Y));
constexpr uint8_t dim = _BV(ord);
#endif

static inline bool eval_candidate(int8_t x, int8_t y, hilbert_curve::callback_ptr func, void *data) {
// The print bed likely has fewer points than the full Hilbert
Expand Down
8 changes: 7 additions & 1 deletion Marlin/src/feature/bedlevel/mbl/mesh_bed_leveling.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,15 @@
mesh_bed_leveling bedlevel;

float mesh_bed_leveling::z_offset,
mesh_bed_leveling::z_values[GRID_MAX_POINTS_X][GRID_MAX_POINTS_Y],
#if PROUI_GRID_PNTS
mesh_bed_leveling::index_to_xpos[GRID_LIMIT],
mesh_bed_leveling::index_to_ypos[GRID_LIMIT];
bed_mesh_t mesh_bed_leveling::z_values;
#else
mesh_bed_leveling::index_to_xpos[GRID_MAX_POINTS_X],
mesh_bed_leveling::index_to_ypos[GRID_MAX_POINTS_Y];
bed_mesh_t mesh_bed_leveling::z_values;
#endif

mesh_bed_leveling::mesh_bed_leveling() {
for (uint8_t i = 0; i < GRID_MAX_POINTS_X; ++i)
Expand Down
8 changes: 7 additions & 1 deletion Marlin/src/feature/bedlevel/mbl/mesh_bed_leveling.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,15 @@ enum MeshLevelingState : char {
class mesh_bed_leveling {
public:
static float z_offset,
#if PROUI_GRID_PNTS
z_values[GRID_LIMIT][GRID_LIMIT],
index_to_xpos[GRID_LIMIT],
index_to_ypos[GRID_LIMIT];
#else
z_values[GRID_MAX_POINTS_X][GRID_MAX_POINTS_Y],
index_to_xpos[GRID_MAX_POINTS_X],
index_to_ypos[GRID_MAX_POINTS_Y];
#endif

mesh_bed_leveling();

Expand Down Expand Up @@ -70,7 +76,7 @@ class mesh_bed_leveling {
}

static float get_mesh_x(const uint8_t i) { return index_to_xpos[i]; }
static float get_mesh_y(const uint8_t i) { return index_to_ypos[i]; }
static float get_mesh_y(const uint8_t j) { return index_to_ypos[j]; }

static uint8_t cell_index_x(const_float_t x) {
int8_t cx = (x - (MESH_MIN_X)) * RECIPROCAL(MESH_X_DIST);
Expand Down
38 changes: 20 additions & 18 deletions Marlin/src/feature/bedlevel/ubl/ubl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,23 +64,25 @@ void unified_bed_leveling::report_state() {

int8_t unified_bed_leveling::storage_slot;

float unified_bed_leveling::z_values[GRID_MAX_POINTS_X][GRID_MAX_POINTS_Y];

#define _GRIDPOS(A,N) (MESH_MIN_##A + N * (MESH_##A##_DIST))

const float
unified_bed_leveling::_mesh_index_to_xpos[GRID_MAX_POINTS_X] PROGMEM = ARRAY_N(GRID_MAX_POINTS_X,
_GRIDPOS(X, 0), _GRIDPOS(X, 1), _GRIDPOS(X, 2), _GRIDPOS(X, 3),
_GRIDPOS(X, 4), _GRIDPOS(X, 5), _GRIDPOS(X, 6), _GRIDPOS(X, 7),
_GRIDPOS(X, 8), _GRIDPOS(X, 9), _GRIDPOS(X, 10), _GRIDPOS(X, 11),
_GRIDPOS(X, 12), _GRIDPOS(X, 13), _GRIDPOS(X, 14), _GRIDPOS(X, 15)
),
unified_bed_leveling::_mesh_index_to_ypos[GRID_MAX_POINTS_Y] PROGMEM = ARRAY_N(GRID_MAX_POINTS_Y,
_GRIDPOS(Y, 0), _GRIDPOS(Y, 1), _GRIDPOS(Y, 2), _GRIDPOS(Y, 3),
_GRIDPOS(Y, 4), _GRIDPOS(Y, 5), _GRIDPOS(Y, 6), _GRIDPOS(Y, 7),
_GRIDPOS(Y, 8), _GRIDPOS(Y, 9), _GRIDPOS(Y, 10), _GRIDPOS(Y, 11),
_GRIDPOS(Y, 12), _GRIDPOS(Y, 13), _GRIDPOS(Y, 14), _GRIDPOS(Y, 15)
);
bed_mesh_t unified_bed_leveling::z_values;

#if DISABLED(PROUI_MESH_EDIT)
#define _GRIDPOS(A,N) (MESH_MIN_##A + N * (MESH_##A##_DIST))

const bed_mesh_t
unified_bed_leveling::_mesh_index_to_xpos PROGMEM = ARRAY_N(GRID_MAX_POINTS_X,
_GRIDPOS(X, 0), _GRIDPOS(X, 1), _GRIDPOS(X, 2), _GRIDPOS(X, 3),
_GRIDPOS(X, 4), _GRIDPOS(X, 5), _GRIDPOS(X, 6), _GRIDPOS(X, 7),
_GRIDPOS(X, 8), _GRIDPOS(X, 9), _GRIDPOS(X, 10), _GRIDPOS(X, 11),
_GRIDPOS(X, 12), _GRIDPOS(X, 13), _GRIDPOS(X, 14), _GRIDPOS(X, 15)
),
unified_bed_leveling::_mesh_index_to_ypos PROGMEM = ARRAY_N(GRID_MAX_POINTS_Y,
_GRIDPOS(Y, 0), _GRIDPOS(Y, 1), _GRIDPOS(Y, 2), _GRIDPOS(Y, 3),
_GRIDPOS(Y, 4), _GRIDPOS(Y, 5), _GRIDPOS(Y, 6), _GRIDPOS(Y, 7),
_GRIDPOS(Y, 8), _GRIDPOS(Y, 9), _GRIDPOS(Y, 10), _GRIDPOS(Y, 11),
_GRIDPOS(Y, 12), _GRIDPOS(Y, 13), _GRIDPOS(Y, 14), _GRIDPOS(Y, 15)
);
#endif

volatile int16_t unified_bed_leveling::encoder_diff;

Expand Down Expand Up @@ -166,7 +168,7 @@ static void serial_echo_column_labels(const uint8_t sp) {
void unified_bed_leveling::display_map(const uint8_t map_type) {
const bool was = gcode.set_autoreport_paused(true);

constexpr uint8_t eachsp = 1 + 6 + 1, // [-3.567]
IF_DISABLED(PROUI_GRID_PNTS, constexpr) uint8_t eachsp = 1 + 6 + 1, // [-3.567]
twixt = eachsp * (GRID_MAX_POINTS_X) - 9 * 2; // Leading 4sp, Coordinates 9sp each

const bool human = !(map_type & 0x3), csv = map_type == 1, lcd = map_type == 2, comp = map_type & 0x4;
Expand Down
30 changes: 21 additions & 9 deletions Marlin/src/feature/bedlevel/ubl/ubl.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ struct mesh_index_pair;
#define MESH_Y_DIST (float((MESH_MAX_Y) - (MESH_MIN_Y)) / (GRID_MAX_CELLS_Y))

#if ENABLED(OPTIMIZED_MESH_STORAGE)
typedef int16_t mesh_store_t[GRID_MAX_POINTS_X][GRID_MAX_POINTS_Y];
typedef int16_t mesh_store_t[TERN(PROUI_GRID_PNTS, GRID_LIMIT, GRID_MAX_POINTS_X)][TERN(PROUI_GRID_PNTS, GRID_LIMIT, GRID_MAX_POINTS_Y)];
#endif

typedef struct {
Expand Down Expand Up @@ -116,8 +116,11 @@ class unified_bed_leveling {
static void set_store_from_mesh(const bed_mesh_t &in_values, mesh_store_t &stored_values);
static void set_mesh_from_store(const mesh_store_t &stored_values, bed_mesh_t &out_values);
#endif
static const float _mesh_index_to_xpos[GRID_MAX_POINTS_X],
_mesh_index_to_ypos[GRID_MAX_POINTS_Y];

#if DISABLED(PROUI_MESH_EDIT)
static const bed_mesh_t _mesh_index_to_xpos,
_mesh_index_to_ypos;
#endif

#if HAS_MARLINUI_MENU
static bool lcd_map_control;
Expand Down Expand Up @@ -287,12 +290,21 @@ class unified_bed_leveling {

static constexpr float get_z_offset() { return 0.0f; }

static float get_mesh_x(const uint8_t i) {
return i < (GRID_MAX_POINTS_X) ? pgm_read_float(&_mesh_index_to_xpos[i]) : MESH_MIN_X + i * (MESH_X_DIST);
}
static float get_mesh_y(const uint8_t i) {
return i < (GRID_MAX_POINTS_Y) ? pgm_read_float(&_mesh_index_to_ypos[i]) : MESH_MIN_Y + i * (MESH_Y_DIST);
}
#if ENABLED(PROUI_MESH_EDIT)
static float get_mesh_x(const uint8_t i) {
return MESH_MIN_X + i * (MESH_X_DIST);
}
static float get_mesh_y(const uint8_t j) {
return MESH_MIN_Y + j * (MESH_Y_DIST);
}
#else
static float get_mesh_x(const uint8_t i) {
return i < (GRID_MAX_POINTS_X) ? pgm_read_float(&_mesh_index_to_xpos[i]) : MESH_MIN_X + i * (MESH_X_DIST);
}
static float get_mesh_y(const uint8_t j) {
return j < (GRID_MAX_POINTS_Y) ? pgm_read_float(&_mesh_index_to_ypos[j]) : MESH_MIN_Y + j * (MESH_Y_DIST);
}
#endif

#if UBL_SEGMENTED
static bool line_to_destination_segmented(const_feedRate_t scaled_fr_mm_s);
Expand Down
Loading