Skip to content

Commit

Permalink
🩹 Reset DWIN CrealityUI print progress on start (#23481)
Browse files Browse the repository at this point in the history
  • Loading branch information
mriscoc authored Jan 9, 2022
1 parent 1363b43 commit 0026430
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions Marlin/src/lcd/e3v2/creality/dwin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1754,7 +1754,7 @@ void update_variable() {
if (_new_hotend_target)
Draw_Stat_Int(25 + 4 * STAT_CHR_W + 6, 384, _hotendtarget);

static int16_t _flow = planner.flow_percentage[0];
static int16_t _flow = 0;
if (_flow != planner.flow_percentage[0]) {
_flow = planner.flow_percentage[0];
Draw_Stat_Int(116 + 2 * STAT_CHR_W, 417, _flow);
Expand All @@ -1768,7 +1768,7 @@ void update_variable() {
Draw_Stat_Int(25 + 4 * STAT_CHR_W + 6, 417, _bedtarget);
#endif

static int16_t _feedrate = 100;
static int16_t _feedrate = 0;
if (_feedrate != feedrate_percentage) {
_feedrate = feedrate_percentage;
Draw_Stat_Int(116 + 2 * STAT_CHR_W, 384, _feedrate);
Expand Down Expand Up @@ -2269,6 +2269,8 @@ void HMI_SelectFile() {
// thermalManager.fan_speed[i] = 255;
#endif

_card_percent = 0;
_remain_time = 0;
Goto_PrintProcess();
}
}
Expand Down Expand Up @@ -4176,10 +4178,7 @@ void EachMomentUpdate() {
}
#if ENABLED(POWER_LOSS_RECOVERY)
else if (DWIN_lcd_sd_status && recovery.dwin_flag) { // resume print before power off
static bool recovery_flag = false;

recovery.dwin_flag = false;
recovery_flag = true;

auto update_selection = [&](const bool sel) {
HMI_flag.select_flag = sel;
Expand All @@ -4199,6 +4198,7 @@ void EachMomentUpdate() {
DWIN_Draw_String(true, font8x16, Popup_Text_Color, Color_Bg_Window, npos, 252, name);
DWIN_UpdateLCD();

bool recovery_flag = true;
while (recovery_flag) {
EncoderState encoder_diffState = Encoder_ReceiveAnalyze();
if (encoder_diffState != ENCODER_DIFF_NO) {
Expand Down

0 comments on commit 0026430

Please sign in to comment.