Ender-3 V2 CrealityUI Enhanced (#21942)

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 GitHub
parent 43a9c71ef7
commit 0f61d9e4dd
44 changed files with 6408 additions and 84 deletions

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
}