Level bed corners Z-hop height option (#12858)
This commit is contained in:
committed by
Scott Lahteine
parent
8ae6f1e556
commit
a0ef6198ff
@ -154,8 +154,8 @@ template<typename NAME>
|
||||
class TMenuItem : MenuItemBase {
|
||||
private:
|
||||
typedef typename NAME::type_t type_t;
|
||||
inline static float unscale(const float value) { return value * (1.0f / NAME::scale); }
|
||||
inline static float scale(const float value) { return value * NAME::scale; }
|
||||
static inline float unscale(const float value) { return value * (1.0f / NAME::scale); }
|
||||
static inline float scale(const float value) { return value * NAME::scale; }
|
||||
static void load(void *ptr, const int32_t value) { *((type_t*)ptr) = unscale(value); }
|
||||
static char* to_string(const int32_t value) { return NAME::strfunc(unscale(value)); }
|
||||
public:
|
||||
|
@ -32,12 +32,18 @@
|
||||
#include "../../module/motion.h"
|
||||
#include "../../module/planner.h"
|
||||
|
||||
#ifndef LEVEL_CORNERS_Z_HOP
|
||||
#define LEVEL_CORNERS_Z_HOP 4.0
|
||||
#endif
|
||||
|
||||
static_assert(LEVEL_CORNERS_Z_HOP >= 0, "LEVEL_CORNERS_Z_HOP must be >= 0. Please update your configuration.");
|
||||
|
||||
/**
|
||||
* Level corners, starting in the front-left corner.
|
||||
*/
|
||||
static int8_t bed_corner;
|
||||
void _lcd_goto_next_corner() {
|
||||
line_to_z(4.0);
|
||||
line_to_z(LEVEL_CORNERS_Z_HOP);
|
||||
switch (bed_corner) {
|
||||
case 0:
|
||||
current_position[X_AXIS] = X_MIN_BED + LEVEL_CORNERS_INSET;
|
||||
|
Reference in New Issue
Block a user