Ender-3 V2 CrealityUI Enhanced (#21942, #22728, #22733)

Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
This commit is contained in:
Miguel Risco-Castillo
2021-09-07 02:15:24 -05:00
committed by Scott Lahteine
parent 54416f780d
commit 6cf2cf7bd4
45 changed files with 6545 additions and 86 deletions

View File

@ -35,6 +35,8 @@
#include "../../lcd/marlinui.h"
#elif ENABLED(EXTENSIBLE_UI)
#include "../../lcd/extui/ui_api.h"
#elif ENABLED(DWIN_CREALITY_LCD_ENHANCED)
#include "../../lcd/e3v2/enhanced/dwin.h"
#endif
#if ENABLED(HOST_PROMPT_SUPPORT)
@ -68,6 +70,8 @@ void GcodeSuite::M0_M1() {
ExtUI::onUserConfirmRequired(parser.string_arg); // Can this take an SRAM string??
else
ExtUI::onUserConfirmRequired_P(GET_TEXT(MSG_USERWAIT));
#elif ENABLED(DWIN_CREALITY_LCD_ENHANCED)
DWIN_Popup_Confirm(ICON_BLTouch, parser.string_arg ?: GET_TEXT(MSG_STOPPED), GET_TEXT(MSG_USERWAIT));
#else
if (parser.string_arg) {

View File

@ -28,6 +28,10 @@
#include "../../lcd/marlinui.h"
#include "../../sd/cardreader.h"
#if ENABLED(DWIN_CREALITY_LCD_ENHANCED)
#include "../../lcd/e3v2/enhanced/dwin.h"
#endif
/**
* M73: Set percentage complete (for display on LCD)
*
@ -35,13 +39,23 @@
* M73 P25 ; Set progress to 25%
*/
void GcodeSuite::M73() {
if (parser.seenval('P'))
ui.set_progress((PROGRESS_SCALE) > 1
? parser.value_float() * (PROGRESS_SCALE)
: parser.value_byte()
);
#if ENABLED(USE_M73_REMAINING_TIME)
if (parser.seenval('R')) ui.set_remaining_time(60 * parser.value_ulong());
#if ENABLED(DWIN_CREALITY_LCD_ENHANCED)
DWIN_Progress_Update();
#else
if (parser.seenval('P'))
ui.set_progress((PROGRESS_SCALE) > 1
? parser.value_float() * (PROGRESS_SCALE)
: parser.value_byte()
);
#if ENABLED(USE_M73_REMAINING_TIME)
if (parser.seenval('R')) ui.set_remaining_time(60 * parser.value_ulong());
#endif
#endif
}