Fix some ExtUI issues (#13799)
This commit is contained in:
parent
db89fc0304
commit
610fb46683
|
@ -32,6 +32,10 @@
|
||||||
#define DEBUG_OUT ENABLED(DEBUG_LEVELING_FEATURE)
|
#define DEBUG_OUT ENABLED(DEBUG_LEVELING_FEATURE)
|
||||||
#include "../../../core/debug_out.h"
|
#include "../../../core/debug_out.h"
|
||||||
|
|
||||||
|
#if ENABLED(EXTENSIBLE_UI)
|
||||||
|
#include "../../../lcd/extensible_ui/ui_api.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
int bilinear_grid_spacing[2], bilinear_start[2];
|
int bilinear_grid_spacing[2], bilinear_start[2];
|
||||||
float bilinear_grid_factor[2],
|
float bilinear_grid_factor[2],
|
||||||
z_values[GRID_MAX_POINTS_X][GRID_MAX_POINTS_Y];
|
z_values[GRID_MAX_POINTS_X][GRID_MAX_POINTS_Y];
|
||||||
|
|
|
@ -42,6 +42,10 @@
|
||||||
#define DEBUG_OUT ENABLED(DEBUG_LEVELING_FEATURE)
|
#define DEBUG_OUT ENABLED(DEBUG_LEVELING_FEATURE)
|
||||||
#include "../../core/debug_out.h"
|
#include "../../core/debug_out.h"
|
||||||
|
|
||||||
|
#if ENABLED(EXTENSIBLE_UI)
|
||||||
|
#include "../../lcd/extensible_ui/ui_api.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
bool leveling_is_valid() {
|
bool leveling_is_valid() {
|
||||||
return
|
return
|
||||||
#if ENABLED(MESH_BED_LEVELING)
|
#if ENABLED(MESH_BED_LEVELING)
|
||||||
|
|
|
@ -656,7 +656,9 @@ void resume_print(const float &slow_load_length/*=0*/, const float &fast_load_le
|
||||||
// Resume the print job timer if it was running
|
// Resume the print job timer if it was running
|
||||||
if (print_job_timer.isPaused()) print_job_timer.start();
|
if (print_job_timer.isPaused()) print_job_timer.start();
|
||||||
|
|
||||||
ui.reset_status();
|
#if HAS_LCD_MENU
|
||||||
|
ui.return_to_status();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // ADVANCED_PAUSE_FEATURE
|
#endif // ADVANCED_PAUSE_FEATURE
|
||||||
|
|
|
@ -32,6 +32,10 @@
|
||||||
#include "../../module/configuration_store.h"
|
#include "../../module/configuration_store.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if ENABLED(EXTENSIBLE_UI)
|
||||||
|
#include "../../lcd/extensible_ui/ui_api.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
//#define M420_C_USE_MEAN
|
//#define M420_C_USE_MEAN
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -175,15 +179,16 @@ void GcodeSuite::M420() {
|
||||||
set_bed_leveling_enabled(false);
|
set_bed_leveling_enabled(false);
|
||||||
// Subtract the mean from all values
|
// Subtract the mean from all values
|
||||||
for (uint8_t x = GRID_MAX_POINTS_X; x--;)
|
for (uint8_t x = GRID_MAX_POINTS_X; x--;)
|
||||||
for (uint8_t y = GRID_MAX_POINTS_Y; y--;)
|
for (uint8_t y = GRID_MAX_POINTS_Y; y--;) {
|
||||||
Z_VALUES(x, y) -= zmean;
|
Z_VALUES(x, y) -= zmean;
|
||||||
#if ENABLED(ABL_BILINEAR_SUBDIVISION)
|
|
||||||
bed_level_virt_interpolate();
|
|
||||||
#endif
|
|
||||||
#if ENABLED(EXTENSIBLE_UI)
|
#if ENABLED(EXTENSIBLE_UI)
|
||||||
ExtUI::onMeshUpdate(x, y, Z_VALUES(x, y));
|
ExtUI::onMeshUpdate(x, y, Z_VALUES(x, y));
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
#if ENABLED(ABL_BILINEAR_SUBDIVISION)
|
||||||
|
bed_level_virt_interpolate();
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
|
@ -51,6 +51,10 @@
|
||||||
#define DEBUG_OUT ENABLED(DEBUG_LEVELING_FEATURE)
|
#define DEBUG_OUT ENABLED(DEBUG_LEVELING_FEATURE)
|
||||||
#include "../../../core/debug_out.h"
|
#include "../../../core/debug_out.h"
|
||||||
|
|
||||||
|
#if ENABLED(EXTENSIBLE_UI)
|
||||||
|
#include "../../../lcd/extensible_ui/ui_api.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#if ABL_GRID
|
#if ABL_GRID
|
||||||
#if ENABLED(PROBE_Y_FIRST)
|
#if ENABLED(PROBE_Y_FIRST)
|
||||||
#define PR_OUTER_VAR xCount
|
#define PR_OUTER_VAR xCount
|
||||||
|
|
|
@ -31,6 +31,10 @@
|
||||||
#include "../../gcode.h"
|
#include "../../gcode.h"
|
||||||
#include "../../../feature/bedlevel/abl/abl.h"
|
#include "../../../feature/bedlevel/abl/abl.h"
|
||||||
|
|
||||||
|
#if ENABLED(EXTENSIBLE_UI)
|
||||||
|
#include "../../../lcd/extensible_ui/ui_api.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* M421: Set a single Mesh Bed Leveling Z coordinate
|
* M421: Set a single Mesh Bed Leveling Z coordinate
|
||||||
*
|
*
|
||||||
|
|
|
@ -715,6 +715,7 @@ namespace ExtUI {
|
||||||
#if HAS_MESH
|
#if HAS_MESH
|
||||||
bool getMeshValid() { return leveling_is_valid(); }
|
bool getMeshValid() { return leveling_is_valid(); }
|
||||||
bed_mesh_t getMeshArray() { return Z_VALUES_ARR; }
|
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) {
|
void setMeshPoint(const uint8_t xpos, const uint8_t ypos, const float zoff) {
|
||||||
if (WITHIN(xpos, 0, GRID_MAX_POINTS_X) && WITHIN(ypos, 0, GRID_MAX_POINTS_Y)) {
|
if (WITHIN(xpos, 0, GRID_MAX_POINTS_X) && WITHIN(ypos, 0, GRID_MAX_POINTS_Y)) {
|
||||||
Z_VALUES(xpos, ypos) = zoff;
|
Z_VALUES(xpos, ypos) = zoff;
|
||||||
|
@ -748,10 +749,15 @@ namespace ExtUI {
|
||||||
enqueue_and_echo_commands_P(gcode);
|
enqueue_and_echo_commands_P(gcode);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool commandsInQueue() { return (planner.movesplanned() || commands_in_queue); }
|
||||||
|
|
||||||
bool isAxisPositionKnown(const axis_t axis) {
|
bool isAxisPositionKnown(const axis_t axis) {
|
||||||
return TEST(axis_known_position, axis);
|
return TEST(axis_known_position, axis);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool isPositionKnown() { return all_axes_known(); }
|
||||||
|
bool isMachineHomed() { return all_axes_homed(); }
|
||||||
|
|
||||||
PGM_P getFirmwareName_str() {
|
PGM_P getFirmwareName_str() {
|
||||||
static const char firmware_name[] PROGMEM = "Marlin " SHORT_BUILD_VERSION;
|
static const char firmware_name[] PROGMEM = "Marlin " SHORT_BUILD_VERSION;
|
||||||
return firmware_name;
|
return firmware_name;
|
||||||
|
|
|
@ -58,9 +58,12 @@ namespace ExtUI {
|
||||||
|
|
||||||
bool isMoving();
|
bool isMoving();
|
||||||
bool isAxisPositionKnown(const axis_t);
|
bool isAxisPositionKnown(const axis_t);
|
||||||
|
bool isPositionKnown(); // Axis position guaranteed, steppers active since homing
|
||||||
|
bool isMachineHomed(); // Axis position most likely correct, steppers may have deactivated
|
||||||
bool canMove(const axis_t);
|
bool canMove(const axis_t);
|
||||||
bool canMove(const extruder_t);
|
bool canMove(const extruder_t);
|
||||||
void enqueueCommands_P(PGM_P const);
|
void enqueueCommands_P(PGM_P const);
|
||||||
|
bool commandsInQueue();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Getters and setters
|
* Getters and setters
|
||||||
|
@ -110,8 +113,10 @@ namespace ExtUI {
|
||||||
bool getLevelingActive();
|
bool getLevelingActive();
|
||||||
void setLevelingActive(const bool);
|
void setLevelingActive(const bool);
|
||||||
#if HAS_MESH
|
#if HAS_MESH
|
||||||
|
#include "../../feature/bedlevel/bedlevel.h"
|
||||||
bool getMeshValid();
|
bool getMeshValid();
|
||||||
bed_mesh_t getMeshArray();
|
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);
|
void setMeshPoint(const uint8_t xpos, const uint8_t ypos, const float zval);
|
||||||
void onMeshUpdate(const uint8_t xpos, const uint8_t ypos, const float zval);
|
void onMeshUpdate(const uint8_t xpos, const uint8_t ypos, const float zval);
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -25,6 +25,7 @@
|
||||||
// These displays all share the MarlinUI class
|
// These displays all share the MarlinUI class
|
||||||
#if HAS_SPI_LCD || EITHER(MALYAN_LCD, EXTENSIBLE_UI)
|
#if HAS_SPI_LCD || EITHER(MALYAN_LCD, EXTENSIBLE_UI)
|
||||||
#include "ultralcd.h"
|
#include "ultralcd.h"
|
||||||
|
#include "fontutils.h"
|
||||||
MarlinUI ui;
|
MarlinUI ui;
|
||||||
#include "../sd/cardreader.h"
|
#include "../sd/cardreader.h"
|
||||||
#if ENABLED(EXTENSIBLE_UI)
|
#if ENABLED(EXTENSIBLE_UI)
|
||||||
|
|
Loading…
Reference in a new issue