🚸 Update Ender3 V2/S1 Pro UI (#23878)

This commit is contained in:
Miguel Risco-Castillo
2022-03-11 15:06:49 -05:00
committed by Scott Lahteine
parent b045c91f26
commit eabeac29fd
40 changed files with 1577 additions and 1211 deletions

View File

@ -105,6 +105,7 @@ void GcodeSuite::G29() {
if (!ui.wait_for_move) {
queue.inject(parser.seen_test('N') ? F("G28" TERN(CAN_SET_LEVELING_AFTER_G28, "L0", "") "\nG29S2") : F("G29S2"));
TERN_(EXTENSIBLE_UI, ExtUI::onMeshLevelingStart());
TERN_(DWIN_LCD_PROUI, DWIN_MeshLevelingStart());
return;
}
state = MeshNext;
@ -127,6 +128,7 @@ void GcodeSuite::G29() {
// Save Z for the previous mesh position
mbl.set_zigzag_z(mbl_probe_index - 1, current_position.z);
TERN_(EXTENSIBLE_UI, ExtUI::onMeshUpdate(ix, iy, current_position.z));
TERN_(DWIN_LCD_PROUI, DWIN_MeshUpdate(_MIN(mbl_probe_index, GRID_MAX_POINTS), int(GRID_MAX_POINTS), current_position.z));
SET_SOFT_ENDSTOP_LOOSE(false);
}
// If there's another point to sample, move there with optional lift.

View File

@ -27,6 +27,10 @@
#include "../gcode.h"
#include "../../module/temperature.h"
#if ENABLED(DWIN_LCD_PROUI)
#include "../../lcd/e3v2/proui/dwin_defines.h"
#endif
/**
* M302: Allow cold extrudes, or set the minimum extrude temperature
*
@ -47,6 +51,7 @@ void GcodeSuite::M302() {
if (seen_S) {
thermalManager.extrude_min_temp = parser.value_celsius();
thermalManager.allow_cold_extrude = (thermalManager.extrude_min_temp == 0);
TERN_(DWIN_LCD_PROUI, HMI_data.ExtMinT = thermalManager.extrude_min_temp);
}
if (parser.seen('P'))

View File

@ -27,15 +27,27 @@
#include "../gcode.h"
#include "../../sd/cardreader.h"
#if ENABLED(DWIN_LCD_PROUI)
#include "../../lcd/e3v2/proui/dwin.h"
#endif
/**
* M524: Abort the current SD print job (started with M24)
*/
void GcodeSuite::M524() {
if (IS_SD_PRINTING())
card.abortFilePrintSoon();
else if (card.isMounted())
card.closefile();
#if ENABLED(DWIN_LCD_PROUI)
HMI_flag.abort_flag = true; // The LCD will handle it
#else
if (IS_SD_PRINTING())
card.abortFilePrintSoon();
else if (card.isMounted())
card.closefile();
#endif
}

View File

@ -39,8 +39,8 @@
void GcodeSuite::M75() {
startOrResumeJob();
#if ENABLED(DWIN_LCD_PROUI)
DWIN_Print_Header(parser.string_arg && parser.string_arg[0] ? parser.string_arg : GET_TEXT(MSG_HOST_START_PRINT));
DWIN_Print_Started(false);
if (!IS_SD_PRINTING()) DWIN_Print_Header(parser.string_arg && parser.string_arg[0] ? parser.string_arg : GET_TEXT(MSG_HOST_START_PRINT));
#endif
}
@ -50,6 +50,7 @@ void GcodeSuite::M75() {
void GcodeSuite::M76() {
print_job_timer.pause();
TERN_(HOST_PAUSE_M76, hostui.pause());
TERN_(DWIN_LCD_PROUI, DWIN_Print_Pause());
}
/**