diff --git a/Marlin/src/feature/babystep.cpp b/Marlin/src/feature/babystep.cpp index 0f0b64295d..bcf4e4bbb9 100644 --- a/Marlin/src/feature/babystep.cpp +++ b/Marlin/src/feature/babystep.cpp @@ -83,7 +83,7 @@ void Babystep::add_steps(const AxisEnum axis, const int16_t distance) { #endif #if ENABLED(BABYSTEP_ALWAYS_AVAILABLE) - #define BSA_ENABLE(AXIS) do{ switch (AXIS) { case X_AXIS: enable_X(); break; case Y_AXIS: enable_Y(); break; case Z_AXIS: enable_Z(); } }while(0) + #define BSA_ENABLE(AXIS) do{ switch (AXIS) { case X_AXIS: enable_X(); break; case Y_AXIS: enable_Y(); break; case Z_AXIS: enable_Z(); break; default: break; } }while(0) #else #define BSA_ENABLE(AXIS) NOOP #endif diff --git a/Marlin/src/lcd/extensible_ui/ui_api.cpp b/Marlin/src/lcd/extensible_ui/ui_api.cpp index 9456f284ff..017b652a0c 100644 --- a/Marlin/src/lcd/extensible_ui/ui_api.cpp +++ b/Marlin/src/lcd/extensible_ui/ui_api.cpp @@ -725,8 +725,8 @@ namespace ExtUI { #if HAS_LEVELING bool getLevelingActive() { return planner.leveling_active; } void setLevelingActive(const bool state) { set_bed_leveling_enabled(state); } + bool getMeshValid() { return leveling_is_valid(); } #if HAS_MESH - bool getMeshValid() { return leveling_is_valid(); } bed_mesh_t getMeshArray() { return Z_VALUES_ARR; } float getMeshPoint(const uint8_t xpos, const uint8_t ypos) { return Z_VALUES(xpos,ypos); } void setMeshPoint(const uint8_t xpos, const uint8_t ypos, const float zoff) { diff --git a/Marlin/src/lcd/extensible_ui/ui_api.h b/Marlin/src/lcd/extensible_ui/ui_api.h index 2c8d133037..cce012f38f 100644 --- a/Marlin/src/lcd/extensible_ui/ui_api.h +++ b/Marlin/src/lcd/extensible_ui/ui_api.h @@ -61,6 +61,10 @@ namespace ExtUI { constexpr uint8_t hotendCount = HOTENDS; constexpr uint8_t fanCount = FAN_COUNT; + #if HAS_MESH + typedef float (&bed_mesh_t)[GRID_MAX_POINTS_X][GRID_MAX_POINTS_Y]; + #endif + bool isMoving(); bool isAxisPositionKnown(const axis_t); bool isPositionKnown(); // Axis position guaranteed, steppers active since homing @@ -122,9 +126,8 @@ namespace ExtUI { #if HAS_LEVELING bool getLevelingActive(); void setLevelingActive(const bool); + bool getMeshValid(); #if HAS_MESH - #include "../../feature/bedlevel/bedlevel.h" - bool getMeshValid(); bed_mesh_t getMeshArray(); float getMeshPoint(const uint8_t xpos, const uint8_t ypos); void setMeshPoint(const uint8_t xpos, const uint8_t ypos, const float zval);