Browse Source

Fix ExtUI mesh functions (#14027)

pull/1/head
InsanityAutomation 6 years ago
committed by Scott Lahteine
parent
commit
84ac5b360b
  1. 2
      Marlin/src/feature/babystep.cpp
  2. 2
      Marlin/src/lcd/extensible_ui/ui_api.cpp
  3. 7
      Marlin/src/lcd/extensible_ui/ui_api.h

2
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

2
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) {

7
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);

Loading…
Cancel
Save