Fix some ExtUI issues (#13799)

This commit is contained in:
InsanityAutomation 2019-04-26 03:32:01 -04:00 committed by Scott Lahteine
parent db89fc0304
commit 610fb46683
9 changed files with 40 additions and 5 deletions

View file

@ -32,6 +32,10 @@
#define DEBUG_OUT ENABLED(DEBUG_LEVELING_FEATURE)
#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];
float bilinear_grid_factor[2],
z_values[GRID_MAX_POINTS_X][GRID_MAX_POINTS_Y];

View file

@ -42,6 +42,10 @@
#define DEBUG_OUT ENABLED(DEBUG_LEVELING_FEATURE)
#include "../../core/debug_out.h"
#if ENABLED(EXTENSIBLE_UI)
#include "../../lcd/extensible_ui/ui_api.h"
#endif
bool leveling_is_valid() {
return
#if ENABLED(MESH_BED_LEVELING)

View file

@ -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
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

View file

@ -32,6 +32,10 @@
#include "../../module/configuration_store.h"
#endif
#if ENABLED(EXTENSIBLE_UI)
#include "../../lcd/extensible_ui/ui_api.h"
#endif
//#define M420_C_USE_MEAN
/**
@ -175,14 +179,15 @@ void GcodeSuite::M420() {
set_bed_leveling_enabled(false);
// Subtract the mean from all values
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;
#if ENABLED(EXTENSIBLE_UI)
ExtUI::onMeshUpdate(x, y, Z_VALUES(x, y));
#endif
}
#if ENABLED(ABL_BILINEAR_SUBDIVISION)
bed_level_virt_interpolate();
#endif
#if ENABLED(EXTENSIBLE_UI)
ExtUI::onMeshUpdate(x, y, Z_VALUES(x, y));
#endif
}
#endif

View file

@ -51,6 +51,10 @@
#define DEBUG_OUT ENABLED(DEBUG_LEVELING_FEATURE)
#include "../../../core/debug_out.h"
#if ENABLED(EXTENSIBLE_UI)
#include "../../../lcd/extensible_ui/ui_api.h"
#endif
#if ABL_GRID
#if ENABLED(PROBE_Y_FIRST)
#define PR_OUTER_VAR xCount

View file

@ -31,6 +31,10 @@
#include "../../gcode.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
*

View file

@ -715,6 +715,7 @@ namespace ExtUI {
#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) {
if (WITHIN(xpos, 0, GRID_MAX_POINTS_X) && WITHIN(ypos, 0, GRID_MAX_POINTS_Y)) {
Z_VALUES(xpos, ypos) = zoff;
@ -748,10 +749,15 @@ namespace ExtUI {
enqueue_and_echo_commands_P(gcode);
}
bool commandsInQueue() { return (planner.movesplanned() || commands_in_queue); }
bool isAxisPositionKnown(const axis_t axis) {
return TEST(axis_known_position, axis);
}
bool isPositionKnown() { return all_axes_known(); }
bool isMachineHomed() { return all_axes_homed(); }
PGM_P getFirmwareName_str() {
static const char firmware_name[] PROGMEM = "Marlin " SHORT_BUILD_VERSION;
return firmware_name;

View file

@ -58,9 +58,12 @@ namespace ExtUI {
bool isMoving();
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 extruder_t);
void enqueueCommands_P(PGM_P const);
bool commandsInQueue();
/**
* Getters and setters
@ -110,8 +113,10 @@ namespace ExtUI {
bool getLevelingActive();
void setLevelingActive(const bool);
#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);
void onMeshUpdate(const uint8_t xpos, const uint8_t ypos, const float zval);
#endif

View file

@ -25,6 +25,7 @@
// These displays all share the MarlinUI class
#if HAS_SPI_LCD || EITHER(MALYAN_LCD, EXTENSIBLE_UI)
#include "ultralcd.h"
#include "fontutils.h"
MarlinUI ui;
#include "../sd/cardreader.h"
#if ENABLED(EXTENSIBLE_UI)