One or the other?
This commit is contained in:
parent
a20eacaa48
commit
5cce532a29
2 changed files with 338 additions and 341 deletions
29
Marlin/ubl.h
29
Marlin/ubl.h
|
|
@ -326,21 +326,24 @@
|
|||
return i < GRID_MAX_POINTS_Y ? pgm_read_float(&_mesh_index_to_ypos[i]) : MESH_MIN_Y + i * (MESH_Y_DIST);
|
||||
}
|
||||
|
||||
static bool prepare_segmented_line_to(const float (&rtarget)[XYZE], const float &feedrate);
|
||||
static void line_to_destination_cartesian(const float &fr, uint8_t e);
|
||||
#if UBL_SEGMENTED
|
||||
static bool prepare_segmented_line_to(const float (&rtarget)[XYZE], const float &feedrate);
|
||||
#else
|
||||
static void line_to_destination_cartesian(const float &fr, const uint8_t e);
|
||||
#endif
|
||||
|
||||
#define _CMPZ(a,b) (z_values[a][b] == z_values[a][b+1])
|
||||
#define CMPZ(a) (_CMPZ(a, 0) && _CMPZ(a, 1))
|
||||
#define ZZER(a) (z_values[a][0] == 0)
|
||||
#define _CMPZ(a,b) (z_values[a][b] == z_values[a][b+1])
|
||||
#define CMPZ(a) (_CMPZ(a, 0) && _CMPZ(a, 1))
|
||||
#define ZZER(a) (z_values[a][0] == 0)
|
||||
|
||||
FORCE_INLINE bool mesh_is_valid() {
|
||||
return !(
|
||||
( CMPZ(0) && CMPZ(1) && CMPZ(2) // adjacent z values all equal?
|
||||
&& ZZER(0) && ZZER(1) && ZZER(2) // all zero at the edge?
|
||||
)
|
||||
|| isnan(z_values[0][0])
|
||||
);
|
||||
}
|
||||
FORCE_INLINE bool mesh_is_valid() {
|
||||
return !(
|
||||
( CMPZ(0) && CMPZ(1) && CMPZ(2) // adjacent z values all equal?
|
||||
&& ZZER(0) && ZZER(1) && ZZER(2) // all zero at the edge?
|
||||
)
|
||||
|| isnan(z_values[0][0])
|
||||
);
|
||||
}
|
||||
}; // class unified_bed_leveling
|
||||
|
||||
extern unified_bed_leveling ubl;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue