Browse Source

Fix nextion compile error (#21884)

vanilla_fb_2.0.x
ellensp 4 years ago
committed by Scott Lahteine
parent
commit
5298fa357c
  1. 6
      Marlin/src/lcd/extui/nextion/nextion_extui.cpp
  2. 10
      Marlin/src/lcd/extui/nextion/nextion_tft.cpp

6
Marlin/src/lcd/extui/nextion/nextion_extui.cpp

@ -26,12 +26,12 @@
* Nextion TFT support for Marlin * Nextion TFT support for Marlin
*/ */
#include "../../inc/MarlinConfigPre.h" #include "../../../inc/MarlinConfigPre.h"
#if ENABLED(NEXTION_TFT) #if ENABLED(NEXTION_TFT)
#include "ui_api.h" #include "../ui_api.h"
#include "lib/nextion/nextion_tft.h" #include "nextion_tft.h"
namespace ExtUI { namespace ExtUI {

10
Marlin/src/lcd/extui/nextion/nextion_tft.cpp

@ -645,6 +645,9 @@ void NextionTFT::UpdateOnChange() {
last_flow_speed = getFlow_percent(getActiveTool()); last_flow_speed = getFlow_percent(getActiveTool());
} }
// tmppage Axis
static float last_get_axis_position_mmX = 999, last_get_axis_position_mmY = 999, last_get_axis_position_mmZ = 999;
// tmppage Progress + Layer + Time // tmppage Progress + Layer + Time
if (isPrinting()) { if (isPrinting()) {
@ -679,9 +682,6 @@ void NextionTFT::UpdateOnChange() {
} }
} }
// tmppage Axis
static float last_get_axis_position_mmX = 999, last_get_axis_position_mmY = 999, last_get_axis_position_mmZ = 999;
if (!WITHIN(last_get_axis_position_mmX - getAxisPosition_mm(X), -0.1, 0.1)) { if (!WITHIN(last_get_axis_position_mmX - getAxisPosition_mm(X), -0.1, 0.1)) {
if (ELAPSED(ms, next_event_ms)) { if (ELAPSED(ms, next_event_ms)) {
next_event_ms = ms + 30; next_event_ms = ms + 30;
@ -723,9 +723,9 @@ void NextionTFT::UpdateOnChange() {
last_homedZ = isAxisPositionKnown(Z); last_homedZ = isAxisPositionKnown(Z);
} }
// tmppage IDEX Mode
static uint8_t last_IDEX_Mode = 99;
#if ENABLED(DUAL_X_CARRIAGE) #if ENABLED(DUAL_X_CARRIAGE)
// tmppage IDEX Mode
static uint8_t last_IDEX_Mode = 99;
if (last_IDEX_Mode != getIDEX_Mode()) { if (last_IDEX_Mode != getIDEX_Mode()) {
SEND_VAL("tmppage.idexmode", getIDEX_Mode()); SEND_VAL("tmppage.idexmode", getIDEX_Mode());
last_IDEX_Mode = getIDEX_Mode(); last_IDEX_Mode = getIDEX_Mode();

Loading…
Cancel
Save