🚸 JyersUI updates (#24451)

This commit is contained in:
Meilleur Gars
2022-07-06 13:46:11 -07:00
committed by Scott Lahteine
parent 03760fd79e
commit e93a1dd2fa
32 changed files with 4336 additions and 984 deletions

View File

@ -51,6 +51,8 @@
#include "../../../lcd/e3v2/creality/dwin.h"
#elif ENABLED(DWIN_LCD_PROUI)
#include "../../../lcd/e3v2/proui/dwin.h"
#elif ENABLED(DWIN_CREALITY_LCD_JYERSUI)
#include "../../../lcd/e3v2/jyersui/dwin.h"
#endif
#if HAS_MULTI_HOTEND

View File

@ -26,6 +26,10 @@
#include "../gcode.h"
#if ENABLED(DWIN_CREALITY_LCD_JYERSUI)
#include "../../lcd/e3v2/jyersui/dwin.h"
#endif
/**
* M575 - Change serial baud rate
*
@ -65,7 +69,10 @@ void GcodeSuite::M575() {
SERIAL_FLUSH();
if (set1) { MYSERIAL1.end(); MYSERIAL1.begin(baud); }
if (set1) {
MYSERIAL1.end(); MYSERIAL1.begin(baud);
TERN_(DWIN_CREALITY_LCD_JYERSUI, eeprom_settings.Baud115k = (baud == 115200));
}
#if HAS_MULTI_SERIAL
if (set2) { MYSERIAL2.end(); MYSERIAL2.begin(baud); }
#ifdef SERIAL_PORT_3

View File

@ -26,6 +26,8 @@
#if ENABLED(DWIN_LCD_PROUI)
#include "../../lcd/e3v2/proui/dwin.h"
#elif ENABLED(DWIN_CREALITY_LCD_JYERSUI)
#include "../../lcd/e3v2/jyersui/dwin.h"
#endif
/**
@ -34,6 +36,7 @@
void GcodeSuite::M997() {
TERN_(DWIN_LCD_PROUI, DWIN_RebootScreen());
TERN_(DWIN_CREALITY_LCD_JYERSUI, CrealityDWIN.DWIN_RebootScreen());
flashFirmware(parser.intval('S'));

View File

@ -38,6 +38,8 @@
#elif ENABLED(DWIN_LCD_PROUI)
#include "../../lcd/e3v2/proui/dwin_popup.h"
#include "../../lcd/e3v2/proui/dwin.h"
#elif ENABLED(DWIN_CREALITY_LCD_JYERSUI)
#include "../../lcd/e3v2/jyersui/dwin.h"
#endif
#if ENABLED(HOST_PROMPT_SUPPORT)
@ -76,6 +78,8 @@ void GcodeSuite::M0_M1() {
DWIN_Popup_Confirm(ICON_BLTouch, parser.string_arg, GET_TEXT_F(MSG_USERWAIT));
else
DWIN_Popup_Confirm(ICON_BLTouch, GET_TEXT_F(MSG_STOPPED), GET_TEXT_F(MSG_USERWAIT));
#elif ENABLED(DWIN_CREALITY_LCD_JYERSUI)
CrealityDWIN.Confirm_Handler(UserInput, parser.string_arg == nullptr);
#else
if (parser.string_arg) {

View File

@ -33,7 +33,7 @@
#include "../../feature/probe_temp_comp.h"
#endif
#if ENABLED(DWIN_LCD_PROUI)
#if EITHER(DWIN_LCD_PROUI, DWIN_CREALITY_LCD_JYERSUI)
#include "../../lcd/marlinui.h"
#endif
@ -53,7 +53,7 @@ void GcodeSuite::G30() {
parser.linearval('Y', current_position.y + probe.offset_xy.y) };
if (!probe.can_reach(pos)) {
#if ENABLED(DWIN_LCD_PROUI)
#if EITHER(DWIN_LCD_PROUI, DWIN_CREALITY_LCD_JYERSUI)
SERIAL_ECHOLNF(GET_EN_TEXT_F(MSG_ZPROBE_OUT));
LCD_MESSAGE(MSG_ZPROBE_OUT);
#endif
@ -65,7 +65,9 @@ void GcodeSuite::G30() {
remember_feedrate_scaling_off();
TERN_(DWIN_LCD_PROUI, process_subcommands_now(F("G28O")));
#if EITHER(DWIN_LCD_PROUI, DWIN_CREALITY_LCD_JYERSUI)
process_subcommands_now(F("G28O"));
#endif
const ProbePtRaise raise_after = parser.boolval('E', true) ? PROBE_PT_STOW : PROBE_PT_NONE;
@ -74,7 +76,7 @@ void GcodeSuite::G30() {
TERN_(HAS_PTC, ptc.set_enabled(true));
if (!isnan(measured_z)) {
SERIAL_ECHOLNPGM("Bed X: ", pos.x, " Y: ", pos.y, " Z: ", measured_z);
#if ENABLED(DWIN_LCD_PROUI)
#if EITHER(DWIN_LCD_PROUI, DWIN_CREALITY_LCD_JYERSUI)
char msg[31], str_1[6], str_2[6], str_3[6];
sprintf_P(msg, PSTR("X:%s, Y:%s, Z:%s"),
dtostrf(pos.x, 1, 1, str_1),

View File

@ -33,15 +33,23 @@
#include "../../lcd/e3v2/proui/dwin.h"
#endif
#if ENABLED(DWIN_CREALITY_LCD_JYERSUI)
#include "../../lcd/e3v2/jyersui/dwin.h"
#endif
/**
* M75: Start print timer
*/
void GcodeSuite::M75() {
startOrResumeJob();
#if ENABLED(DWIN_LCD_PROUI)
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
TERN_(DWIN_LCD_PROUI, DWIN_Print_Started(false));
if (!IS_SD_PRINTING()) {
#if ENABLED(DWIN_LCD_PROUI)
DWIN_Print_Header(parser.string_arg && parser.string_arg[0] ? parser.string_arg : GET_TEXT(MSG_HOST_START_PRINT));
#elif ENABLED(DWIN_CREALITY_LCD_JYERSUI)
CrealityDWIN.Update_Print_Filename(parser.string_arg && parser.string_arg[0] ? parser.string_arg : GET_TEXT(MSG_HOST_START_PRINT));
#endif
}
}
/**

View File

@ -32,6 +32,8 @@
#include "../../lcd/extui/ui_api.h"
#elif ENABLED(DWIN_LCD_PROUI)
#include "../../lcd/e3v2/proui/dwin.h"
#elif ENABLED(DWIN_CREALITY_LCD_JYERSUI)
#include "../../lcd/e3v2/jyersui/dwin.h"
#endif
/**
@ -75,6 +77,7 @@ void GcodeSuite::M303() {
SERIAL_ECHOLNPGM(STR_PID_BAD_HEATER_ID);
TERN_(EXTENSIBLE_UI, ExtUI::onPidTuning(ExtUI::result_t::PID_BAD_EXTRUDER_NUM));
TERN_(DWIN_LCD_PROUI, DWIN_PidTuning(PID_BAD_EXTRUDER_NUM));
TERN_(DWIN_CREALITY_LCD_JYERSUI, CrealityDWINClass::DWIN_PidTuning(PID_BAD_EXTRUDER_NUM));
return;
}