Skip to content

Commit

Permalink
Update - TERN's, DEBUG, include's, powerloss, status
Browse files Browse the repository at this point in the history
  • Loading branch information
classicrocker883 committed Aug 13, 2024
1 parent fb1c0b5 commit de9be52
Show file tree
Hide file tree
Showing 50 changed files with 171 additions and 170 deletions.
2 changes: 1 addition & 1 deletion Marlin/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -2568,7 +2568,7 @@
//#define NOZZLE_CLEAN_HEATUP // Heat up the nozzle instead of skipping wipe

// Explicit wipe G-code script applies to a G12 with no arguments.
#define WIPE_SEQUENCE_COMMANDS "G0 X2 Y200 Z50\nG0 Z0.3\nG0 Z0.3\nG92 E0\nG1 Y140 E10 F1500\nG1 X2.3 F5000\nG92 E0\nG1 Y10 E10 F1200\nG92 E0"
#define WIPE_SEQUENCE_COMMANDS "G0X2Y200Z50\nG0Z0.3\nG0Z0.3\nG92E0\nG1Y140E10F1500\nG1X2.3F5000\nG92E0\nG1Y10E10F1200\nG92E0"
// PrusaSlicer Start G-code Purge Line
#endif

Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/HAL/STM32/pinsDebug.h
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ const XrefInfo pin_xref[] PROGMEM = {
#ifndef NUM_ANALOG_LAST
#define NUM_ANALOG_LAST ((NUM_ANALOG_FIRST) + (NUM_ANALOG_INPUTS) - 1)
#endif
#define NUMBER_PINS_TOTAL ((NUM_DIGITAL_PINS) + TERN0(HAS_HIGH_ANALOG_PINS, NUM_ANALOG_INPUTS))
#define NUMBER_PINS_TOTAL ((NUM_DIGITAL_PINS) PLUS_TERN0(HAS_HIGH_ANALOG_PINS, NUM_ANALOG_INPUTS))
#define isValidPin(P) (WITHIN(P, 0, (NUM_DIGITAL_PINS) - 1) || TERN0(HAS_HIGH_ANALOG_PINS, WITHIN(P, NUM_ANALOG_FIRST, NUM_ANALOG_LAST)))
#define digitalRead_mod(Ard_num) extDigitalRead(Ard_num) // must use Arduino pin numbers when doing reads
#define printPinNumber(Q)
Expand Down
8 changes: 4 additions & 4 deletions Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1200,9 +1200,9 @@ bool unified_bed_leveling::G29_parse_parameters() {
}

param.XY_seen.x = parser.seenval('X');
float sx = param.XY_seen.x ? parser.value_float() : TERN(DWIN_LCD_PROUI, 0, current_position.x - TERN0(HAS_BED_PROBE, probe.offset.x));
float sx = param.XY_seen.x ? parser.value_float() : TERN(DWIN_LCD_PROUI, 0, current_position.x MINUS_TERN0(HAS_BED_PROBE, probe.offset.x));
param.XY_seen.y = parser.seenval('Y');
float sy = param.XY_seen.y ? parser.value_float() : TERN(DWIN_LCD_PROUI, 0, current_position.y - TERN0(HAS_BED_PROBE, probe.offset.y));
float sy = param.XY_seen.y ? parser.value_float() : TERN(DWIN_LCD_PROUI, 0, current_position.y MINUS_TERN0(HAS_BED_PROBE, probe.offset.y));

if (param.XY_seen.x != param.XY_seen.y) {
SERIAL_ECHOLNPGM("Both X & Y locations must be specified.\n");
Expand All @@ -1211,8 +1211,8 @@ bool unified_bed_leveling::G29_parse_parameters() {

// If X or Y are not valid, use center of the bed values
// (for UBL_HILBERT_CURVE default to lower-left corner instead)
if (!COORDINATE_OKAY(sx, X_MIN_BED, X_MAX_BED)) sx = TERN(UBL_HILBERT_CURVE, 0, X_CENTER - TERN0(HAS_BED_PROBE, probe.offset.x));
if (!COORDINATE_OKAY(sy, Y_MIN_BED, Y_MAX_BED)) sy = TERN(UBL_HILBERT_CURVE, 0, Y_CENTER - TERN0(HAS_BED_PROBE, probe.offset.y));
if (!COORDINATE_OKAY(sx, X_MIN_BED, X_MAX_BED)) sx = TERN(UBL_HILBERT_CURVE, 0, X_CENTER MINUS_TERN0(HAS_BED_PROBE, probe.offset.x));
if (!COORDINATE_OKAY(sy, Y_MIN_BED, Y_MAX_BED)) sy = TERN(UBL_HILBERT_CURVE, 0, Y_CENTER MINUS_TERN0(HAS_BED_PROBE, probe.offset.y));

if (err_flag) return UBL_ERR;

Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/feature/leds/leds.h
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ typedef struct LEDColor {
bool operator!=(const LEDColor &right) { return !operator==(right); }

bool is_off() const {
return 3 > r + g + b + TERN0(HAS_WHITE_LED, w);
return 3 > r + g + b PLUS_TERN0(HAS_WHITE_LED, w);
}
} LEDColor;

Expand Down
3 changes: 2 additions & 1 deletion Marlin/src/feature/pause.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ bool load_filament(const_float_t slow_load_length/*=0*/, const_float_t fast_load
TERN_(EXTENSIBLE_UI, ExtUI::onUserConfirmRequired(GET_TEXT_F(MSG_FILAMENTLOAD)));

#if ENABLED(HOST_PROMPT_SUPPORT)
const char tool = '0' + TERN0(MULTI_FILAMENT_SENSOR, active_extruder);
const char tool = '0' PLUS_TERN0(MULTI_FILAMENT_SENSOR, active_extruder);
hostui.prompt_do(PROMPT_USER_CONTINUE, F("Load Filament T"), tool, FPSTR(CONTINUE_STR));
#endif

Expand Down Expand Up @@ -540,6 +540,7 @@ void wait_for_confirmation(const bool is_reload/*=false*/, const int8_t max_beep
KEEPALIVE_STATE(PAUSED_FOR_USER);
TERN_(HOST_PROMPT_SUPPORT, hostui.continue_prompt(GET_TEXT_F(MSG_NOZZLE_PARKED)));
TERN_(EXTENSIBLE_UI, ExtUI::onUserConfirmRequired(GET_TEXT_F(MSG_NOZZLE_PARKED)));
TERN_(DWIN_LCD_PROUI, LCD_MESSAGE(MSG_NOZZLE_PARKED));
wait_for_user = true; // LCD click or M108 will clear this
while (wait_for_user) {
impatient_beep(max_beep_count);
Expand Down
15 changes: 11 additions & 4 deletions Marlin/src/feature/powerloss.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,7 @@ void PrintJobRecovery::resume() {
// establish the current position as best we can.
//

#if ENABLED(DWIN_LCD_PROUI) && DISABLED(NOZZLE_CLEAN_FEATURE)
#if ENABLED(DWIN_LCD_PROUI) && (DISABLED(NOZZLE_CLEAN_FEATURE) || defined(WIPE_SEQUENCE_COMMANDS))
xyze_pos_t save_pos = info.current_position;
#endif

Expand Down Expand Up @@ -502,9 +502,16 @@ void PrintJobRecovery::resume() {
#endif
#endif

#if ENABLED(DWIN_LCD_PROUI) && DISABLED(NOZZLE_CLEAN_FEATURE)
#if ENABLED(DWIN_LCD_PROUI) && (DISABLED(NOZZLE_CLEAN_FEATURE) || defined(WIPE_SEQUENCE_COMMANDS))
// Parking head to allow clean before of heating the hotend
gcode.process_subcommands_now(F("G27"));
#if ENABLED(NOZZLE_PARK_FEATURE)
gcode.process_subcommands_now(F("G27P3\nG27P2"));
#else
const_float_t zpos = current_position.z + TERN(NOZZLE_PARK_FEATURE, NOZZLE_PARK_Z_RAISE_MIN, Z_POST_CLEARANCE);
_MIN(zpos, Z_MAX_POS);
const int16_t ypos = TERN(NOZZLE_PARK_FEATURE, TERN(PROUI_EX, PRO_data.Park_point.y, DEF_NOZZLE_PARK_POINT.y), Y_MAX_POS);
gcode.process_subcommands_now(TS(F("G0F600Z"), zpos, F("\nG0F2000Y"), ypos, F("\nM400")));
#endif
DWIN_Popup_Continue(ICON_Leveling_0, GET_TEXT_F(MSG_NOZZLE_PARKED), GET_TEXT_F(MSG_NOZZLE_CLEAN));
wait_for_user_response();
info.current_position = save_pos;
Expand Down Expand Up @@ -578,7 +585,7 @@ void PrintJobRecovery::resume() {
PROCESS_SUBCOMMANDS_NOW(TS(F("G1F3000E"), (POWER_LOSS_PURGE_LEN) + (POWER_LOSS_RETRACT_LEN)));
#endif

#if ENABLED(NOZZLE_CLEAN_FEATURE)
#if ENABLED(NOZZLE_CLEAN_FEATURE) && !defined(WIPE_SEQUENCE_COMMANDS)
PROCESS_SUBCOMMANDS_NOW(F("G12"));
#endif

Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/feature/runout.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ void event_filament_runout(const uint8_t extruder) {
TERN_(DWIN_LCD_PROUI, LCD_MESSAGE(MSG_RUNOUT_SENSOR));

#if ANY(HOST_PROMPT_SUPPORT, HOST_ACTION_COMMANDS, MULTI_FILAMENT_SENSOR)
const char tool = '0' + TERN0(MULTI_FILAMENT_SENSOR, extruder);
const char tool = '0' PLUS_TERN0(MULTI_FILAMENT_SENSOR, extruder);
#endif

//action:out_of_filament
Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/gcode/calibrate/G34_M422.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ void GcodeSuite::G34() {

SERIAL_EOL();

SString<15 + TERN0(TRIPLE_Z, 30) + TERN0(QUAD_Z, 45)> msg(F("1:2="), p_float_t(ABS(z_measured[1] - z_measured[0]), 3));
SString<15 PLUS_TERN0(TRIPLE_Z, 30) PLUS_TERN0(QUAD_Z, 45)> msg(F("1:2="), p_float_t(ABS(z_measured[1] - z_measured[0]), 3));
#if TRIPLE_Z
msg.append(F(" 3-2="), p_float_t(ABS(z_measured[2] - z_measured[1]), 3))
.append(F(" 3-1="), p_float_t(ABS(z_measured[2] - z_measured[0]), 3));
Expand Down
1 change: 0 additions & 1 deletion Marlin/src/gcode/calibrate/M48.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
#if ENABLED(Z_MIN_PROBE_REPEATABILITY_TEST)

#include "../gcode.h"
#include "../../module/motion.h"
#include "../../module/probe.h"
#include "../../lcd/marlinui.h"

Expand Down
4 changes: 1 addition & 3 deletions Marlin/src/gcode/control/M997.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,7 @@

#if ENABLED(EXTENSIBLE_UI)
#include "../../lcd/extui/ui_api.h"
#endif

#if ENABLED(DWIN_LCD_PROUI)
#elif ENABLED(DWIN_LCD_PROUI)
#include "../../lcd/e3v2/proui/dwin.h"
#endif

Expand Down
4 changes: 0 additions & 4 deletions Marlin/src/gcode/lcd/M73.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,6 @@
#include "../../sd/cardreader.h"
#include "../../libs/numtostr.h"

#if ENABLED(DWIN_LCD_PROUI)
#include "../../lcd/e3v2/proui/dwin.h"
#endif

/**
* M73: Set percentage complete (for display on LCD)
*
Expand Down
2 changes: 0 additions & 2 deletions Marlin/src/gcode/sd/M1001.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,6 @@

#if ENABLED(EXTENSIBLE_UI)
#include "../../lcd/extui/ui_api.h"
#elif ENABLED(DWIN_LCD_PROUI)
#include "../../lcd/e3v2/proui/dwin.h"
#endif

#if ENABLED(HOST_ACTION_COMMANDS)
Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/gcode/temp/M303.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ void GcodeSuite::M303() {
TERN_(DWIN_LCD_PROUI, DWIN_M303(c, hid, temp);)
TERN_(EXTENSIBLE_UI, ExtUI::onStartM303(c, hid, temp));

IF_DISABLED(BUSY_WHILE_HEATING, KEEPALIVE_STATE(NOT_BUSY);)
IF_DISABLED(BUSY_WHILE_HEATING, KEEPALIVE_STATE(NOT_BUSY));

LCD_MESSAGE(MSG_PID_AUTOTUNE);
thermalManager.PID_autotune(temp, hid, c, u);
Expand Down
1 change: 0 additions & 1 deletion Marlin/src/inc/MarlinConfigPre.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
#include "../HAL/platforms.h"
#endif

#include "../core/macros.h"
#include "../core/boards.h"
#include "../../Configuration.h"
//#include "../../../configurations/_Undef_Configuration.h" //**EXPERIMENTAL** Uncomment to use
Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/lcd/dogm/dogm_Statusscreen.h
Original file line number Diff line number Diff line change
Expand Up @@ -652,7 +652,7 @@
#if STATUS_BED_WIDTH && !STATUS_HEATERS_WIDTH

#ifndef STATUS_BED_X
#define STATUS_BED_X (LCD_PIXEL_WIDTH - (STATUS_CHAMBER_BYTEWIDTH + STATUS_FAN_BYTEWIDTH + STATUS_BED_BYTEWIDTH) * 8 - TERN0(STATUS_HEAT_PERCENT, 4))
#define STATUS_BED_X (LCD_PIXEL_WIDTH - (STATUS_CHAMBER_BYTEWIDTH + STATUS_FAN_BYTEWIDTH + STATUS_BED_BYTEWIDTH) * 8 MINUS_TERN0(STATUS_HEAT_PERCENT, 4))
#endif

#ifndef STATUS_BED_HEIGHT
Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/lcd/dogm/status/bed.h
Original file line number Diff line number Diff line change
Expand Up @@ -134,5 +134,5 @@
#endif

#ifndef STATUS_BED_X
#define STATUS_BED_X (LCD_PIXEL_WIDTH - (STATUS_BED_BYTEWIDTH + STATUS_CHAMBER_BYTEWIDTH + STATUS_FAN_BYTEWIDTH) * 8 - TERN0(STATUS_HEAT_PERCENT, 4))
#define STATUS_BED_X (LCD_PIXEL_WIDTH - (STATUS_BED_BYTEWIDTH + STATUS_CHAMBER_BYTEWIDTH + STATUS_FAN_BYTEWIDTH) * 8 MINUS_TERN0(STATUS_HEAT_PERCENT, 4))
#endif
6 changes: 2 additions & 4 deletions Marlin/src/lcd/e3v2/proui/bedlevel_tools.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,7 @@
#include "../../../module/probe.h"
#include "../../../gcode/gcode.h"
#include "../../../module/planner.h"
#include "../../../gcode/queue.h"
#include "../../../libs/least_squares_fit.h"
#include "../../../libs/vector_3.h"

#include "dwin_popup.h"
#include "bedlevel_tools.h"

#define DEBUG_OUT ENABLED(DEBUG_LEVELING_FEATURE)
Expand All @@ -48,6 +44,8 @@ uint8_t BedLevelToolsClass::tilt_grid = 2;
bool drawing_mesh = false;

#if ENABLED(AUTO_BED_LEVELING_UBL)
#include "../../../libs/least_squares_fit.h"
#include "../../../libs/vector_3.h"

bool BedLevelToolsClass::create_plane_from_mesh() {
struct linear_fit_data lsf_results;
Expand Down
27 changes: 14 additions & 13 deletions Marlin/src/lcd/e3v2/proui/dwin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1901,8 +1901,8 @@ void DWIN_HomingDone() {
void DWIN_Print_Started() {
DEBUG_ECHOLNPGM("DWIN_Print_Started: ", SD_Printing());
TERN_(HAS_GCODE_PREVIEW, if (Host_Printing()) { preview.invalidate(); })
ui.progress_reset();
ui.reset_remaining_time();
TERN_(SET_PROGRESS_PERCENT, ui.progress_reset();)
TERN_(SET_REMAINING_TIME, ui.reset_remaining_time();)
HMI_flag.pause_flag = false;
HMI_flag.abort_flag = false;
select_print.reset();
Expand Down Expand Up @@ -1935,11 +1935,10 @@ void DWIN_Print_Finished() {
#ifdef SD_FINISHED_RELEASECOMMAND
queue.inject(F(SD_FINISHED_RELEASECOMMAND));
#else
const_float_t zpos = current_position.z + TERN(NOZZLE_PARK_FEATURE,
NOZZLE_PARK_Z_RAISE_MIN, Z_POST_CLEARANCE);
const_float_t zpos = current_position.z + TERN(NOZZLE_PARK_FEATURE, NOZZLE_PARK_Z_RAISE_MIN, Z_POST_CLEARANCE);
_MIN(zpos, Z_MAX_POS);
const int16_t ypos = TERN(NOZZLE_PARK_FEATURE, TERN(PROUI_EX, PRO_data.Park_point.y, DEF_NOZZLE_PARK_POINT.y), Y_MAX_POS);
queue.inject(TS(F("G0F600Z"), zpos, F("\nG0F2000Y"), ypos));
queue.inject(TS(F("G0F600Z"), zpos, F("\nG0F2000Y"), ypos, F("\nM400")));
#endif
}
}
Expand Down Expand Up @@ -2680,7 +2679,7 @@ void ApplyMove() {
#else
void RaiseHead() {
LCD_MESSAGE(MSG_TOOL_CHANGE_ZLIFT);
gcode.process_subcommands_now(TS(F("G0F600Z"), float(_MIN(current_position.z + (Z_POST_CLEARANCE), Z_MAX_POS))));
gcode.process_subcommands_now(TS(F("G0F600Z"), float(_MIN(current_position.z + (Z_POST_CLEARANCE), Z_MAX_POS, F("\nM400")))));
}
#endif

Expand Down Expand Up @@ -2842,6 +2841,7 @@ TERN(HAS_BED_PROBE, float, void) tram(uint8_t point OPTARG(HAS_BED_PROBE, bool s
F("G90\nG0F600Z" STRINGIFY(Z_CLEARANCE_BETWEEN_PROBES) "\nG0F5000X"), p_float_t(xpos, 1), F("Y"), p_float_t(ypos, 1), F("\nG0F600Z0")
#endif
));
planner.synchronize();
}
else {
if (stow_probe) { probe.stow(); }
Expand All @@ -2862,6 +2862,7 @@ TERN(HAS_BED_PROBE, float, void) tram(uint8_t point OPTARG(HAS_BED_PROBE, bool s
F("G90\nG0F600Z" STRINGIFY(Z_CLEARANCE_BETWEEN_PROBES) "\nG0F5000X"), p_float_t(xpos, 1), F("Y"), p_float_t(ypos, 1), F("\nG0F600Z0")
#endif
));
planner.synchronize();
#endif // HAS_BED_PROBE
} // Bed Tramming

Expand Down Expand Up @@ -2968,7 +2969,7 @@ TERN(HAS_BED_PROBE, float, void) tram(uint8_t point OPTARG(HAS_BED_PROBE, bool s
#if ENABLED(MESH_BED_LEVELING)

void ManualMeshStart() {
LCD_MESSAGE(MSG_UBL_BUILD_MESH_MENU);
LCD_MESSAGE(MSG_UBL_CONTINUE_MESH);
gcode.process_subcommands_now(F("G28XYO\nG28Z\nM211S0\nG29S1"));
#ifdef MANUAL_PROBE_START_Z
const uint8_t line = CurrentMenu->line(MMeshMoveZItem->pos);
Expand Down Expand Up @@ -3483,7 +3484,7 @@ void Draw_Tune_Menu() {
FanSpeedItem = EDIT_ITEM(ICON_FanSpeed, MSG_FAN_SPEED, onDrawPInt8Menu, SetFanSpeed, &thermalManager.fan_speed[EXT]);
#endif
#if HAS_ZOFFSET_ITEM && ANY(BABYSTEP_ZPROBE_OFFSET, JUST_BABYSTEP)
EDIT_ITEM(ICON_Zoffset, MSG_ZPROBE_ZOFFSET, onDrawPFloat2Menu, SetZOffset, &BABY_Z_VAR);
EDIT_ITEM(ICON_Zoffset, MSG_ZOFFSET, onDrawPFloat2Menu, SetZOffset, &BABY_Z_VAR);
#endif
#if ALL(PROUI_TUNING_GRAPH, PROUI_ITEM_PLOT)
#if ANY(PIDTEMP, MPCTEMP)
Expand Down Expand Up @@ -4519,10 +4520,10 @@ void Draw_MaxAccel_Menu() {
void HostShutDown() { Goto_Popup(PopUp_HostShutDown, OnClick_HostShutDown); }
#endif

#if ENABLED(DEBUG_DWIN)
void DWIN_Debug(PGM_P msg) {
DEBUG_ECHOLNPGM_P(msg);
DWIN_Popup_Continue(ICON_Control_1, STR_DEBUG_PREFIX, msg);
#if DEBUG_DWIN
void DWIN_Debug(PGM_P msg1, PGM_P msg2, PGM_P msg3, PGM_P msg4) {
DEBUG_ECHOLNPGM_P(msg1, msg2, msg3, msg4);
DWIN_Debug_Popup(msg1, msg2, msg3, msg4);
wait_for_user_response();
Draw_Main_Area();
}
Expand Down Expand Up @@ -4591,7 +4592,7 @@ void Draw_AdvancedSettings_Menu() {
checkkey = Menu;
if (SET_MENU(AdvancedSettings, MSG_MESH_LEVELING, 10)) {
BACK_ITEM(Goto_Main_Menu);
MENU_ITEM(ICON_ManualMesh, MSG_UBL_CONTINUE_MESH, onDrawMenuItem, ManualMeshStart);
MENU_ITEM(ICON_ManualMesh, MSG_MANUAL_MESH, onDrawMenuItem, ManualMeshStart);
MMeshMoveZItem = EDIT_ITEM(ICON_Zoffset, MSG_MESH_EDIT_Z, onDrawPFloat2Menu, SetMMeshMoveZ, &current_position.z);
MENU_ITEM(ICON_AxisD, MSG_LEVEL_BED_NEXT_POINT, onDrawMenuItem, ManualMeshContinue);
MENU_ITEM(ICON_PrintSize, MSG_MESH_SETTINGS, onDrawSubMenu, Draw_MeshSet_Menu);
Expand Down
3 changes: 2 additions & 1 deletion Marlin/src/lcd/e3v2/proui/dwin.h
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,7 @@ void Init();
void DWIN_InitScreen();
void DWIN_HandleScreen();
void DWIN_CheckStatusMessage();
void DWIN_DrawStatusMessage();
void DWIN_HomingStart();
void DWIN_HomingDone();
void DWIN_Print_Started();
Expand Down Expand Up @@ -404,5 +405,5 @@ void Draw_MaxAccel_Menu();
#endif

#if DEBUG_DWIN
void DWIN_Debug(PGM_P msg);
void DWIN_Debug(PGM_P msg1=nullptr, PGM_P msg2=nullptr, PGM_P msg3=nullptr, PGM_P msg4=nullptr);
#endif
16 changes: 16 additions & 0 deletions Marlin/src/lcd/e3v2/proui/dwin_popup.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,3 +81,19 @@ void DWIN_Popup_Continue(const uint8_t icon, T amsg1, U amsg2) {
HMI_SaveProcessID(WaitResponse);
DWIN_Show_Popup(icon, amsg1, amsg2, BTN_Continue); // Button Continue
}

#if DEBUG_DWIN
template<typename T, typename U, typename V, typename W>
void DWIN_Debug_Popup(T amsg1=nullptr, U amsg2=nullptr, V amsg3=nullptr, W amsg4=nullptr) {
HMI_SaveProcessID(WaitResponse);
DWINUI::ClearMainArea();
Draw_Popup_Bkgd();
DWINUI::Draw_CenteredString(HMI_data.PopupTxt_Color, 160, STR_DEBUG_PREFIX);
if (amsg1) DWINUI::Draw_CenteredString(HMI_data.PopupTxt_Color, 180, amsg1);
if (amsg2) DWINUI::Draw_CenteredString(HMI_data.PopupTxt_Color, 210, amsg2);
if (amsg3) DWINUI::Draw_CenteredString(HMI_data.PopupTxt_Color, 240, amsg3);
if (amsg4) DWINUI::Draw_CenteredString(HMI_data.PopupTxt_Color, 270, amsg4);
DWINUI::Draw_Button(BTN_Confirm, 86, 300, true);
DWIN_UpdateLCD();
}
#endif
2 changes: 1 addition & 1 deletion Marlin/src/lcd/e3v2/proui/proui.h
Original file line number Diff line number Diff line change
Expand Up @@ -234,4 +234,4 @@ typedef struct {

extern HMI_data_t HMI_data;

static constexpr size_t eeprom_data_size = sizeof(HMI_data_t) + TERN0(PROUI_EX, sizeof(PRO_data_t));
static constexpr size_t eeprom_data_size = sizeof(HMI_data_t) PLUS_TERN0(PROUI_EX, sizeof(PRO_data_t));
10 changes: 6 additions & 4 deletions Marlin/src/lcd/language/language_en.h
Original file line number Diff line number Diff line change
Expand Up @@ -141,12 +141,14 @@ namespace LanguageNarrow_en {
LSTR MSG_PREHEAT_1_ALL = _UxGT("Preheat ") PREHEAT_1_LABEL _UxGT(" All");
LSTR MSG_PREHEAT_1_BEDONLY = _UxGT("Preheat ") PREHEAT_1_LABEL _UxGT(" Bed");
LSTR MSG_PREHEAT_1_SETTINGS = _UxGT("Preheat ") PREHEAT_1_LABEL _UxGT(" Settings");

LSTR MSG_PREHEAT_2 = _UxGT("Preheat ") PREHEAT_2_LABEL;
LSTR MSG_PREHEAT_2_SETTINGS = _UxGT("Preheat ") PREHEAT_2_LABEL _UxGT(" Settings");
LSTR MSG_PREHEAT_3 = PREHEAT_3_LABEL;
LSTR MSG_PREHEAT_3_SETTINGS = PREHEAT_3_LABEL _UxGT(" Settings");
LSTR MSG_PREHEAT_4 = _UxGT("Preheat ") PREHEAT_4_LABEL;
LSTR MSG_PREHEAT_4_SETTINGS = _UxGT("Preheat ") PREHEAT_4_LABEL _UxGT(" Settings");

LSTR MSG_PREHEAT_M = _UxGT("Preheat $");
LSTR MSG_PREHEAT_M_H = _UxGT("Preheat $ ~");
LSTR MSG_PREHEAT_M_END = _UxGT("Preheat $ End");
Expand Down Expand Up @@ -351,7 +353,7 @@ namespace LanguageNarrow_en {
LSTR MSG_NOZZLE_N = _UxGT("Nozzle ~");
LSTR MSG_NOZZLE_PARKED = _UxGT("Nozzle Parked");
LSTR MSG_NOZZLE_STANDBY = _UxGT("Nozzle Standby");
LSTR MSG_NOZZLE_CLEAN = _UxGT("Clean and press continue");
LSTR MSG_NOZZLE_CLEAN = _UxGT("Clean and Press Continue");
LSTR MSG_BED = _UxGT("Bed");
LSTR MSG_CHAMBER = _UxGT("Enclosure");
LSTR MSG_COOLER = _UxGT("Laser Coolant");
Expand Down Expand Up @@ -655,10 +657,10 @@ namespace LanguageNarrow_en {
LSTR MSG_ZPROBE_OFFSETS = _UxGT("Probe Offsets");
LSTR MSG_ZPROBE_XOFFSET = _UxGT("Probe X Offset");
LSTR MSG_ZPROBE_YOFFSET = _UxGT("Probe Y Offset");
LSTR MSG_ZPROBE_ZOFFSET = _UxGT("Z-Offset");
LSTR MSG_ZPROBE_ZOFFSET = _UxGT("Probe Z Offset");
LSTR MSG_ZPROBE_MARGIN = _UxGT("Probe Margin");
LSTR MSG_ZPROBE_MULTIPLE = _UxGT("Multiple Probing");
LSTR MSG_ZOFFSET = _UxGT("Z Offset");
LSTR MSG_ZOFFSET = _UxGT("Z-Offset");
LSTR MSG_Z_FEED_RATE = _UxGT("Z Feed Rate");
LSTR MSG_ENABLE_HS_MODE = _UxGT("Enable HS Mode");
LSTR MSG_MOVE_NOZZLE_TO_BED = _UxGT("Center Nozzle on Bed");
Expand Down Expand Up @@ -707,7 +709,7 @@ namespace LanguageNarrow_en {
LSTR MSG_BILINEAR_LEVELING = _UxGT("Bilinear Leveling");
LSTR MSG_UBL_LEVELING = _UxGT("Unified Bed Leveling");
LSTR MSG_MESH_LEVELING = _UxGT("Mesh Leveling");
LSTR MSG_MESH_DONE = _UxGT("Mesh probing done");
LSTR MSG_MESH_DONE = _UxGT("Mesh Probing Done");
LSTR MSG_MESH_POINTS = _UxGT("Mesh Points");
LSTR MSG_MESH_SETTINGS = _UxGT("Mesh Settings");
LSTR MSG_INFO_PRINTER_STATS_MENU = _UxGT("Printer Stats");
Expand Down
Loading

0 comments on commit de9be52

Please sign in to comment.