Skip to content

Commit

Permalink
improve refuel feature
Browse files Browse the repository at this point in the history
remove plr when cancel resume
  • Loading branch information
smith3d committed Oct 12, 2020
1 parent a2aed1c commit b2aebb1
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions Marlin/src/lcd/dwin/e3v2/dwin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3450,11 +3450,10 @@ void HMI_Refuel(void){
return;
}
#endif
if (!planner.is_full()) {
planner.synchronize(); // Wait for planner moves to finish!
planner.buffer_line(current_position, MMM_TO_MMS(FEEDRATE_E), active_extruder);
}
current_position.e = current_position.e + HMI_ValueStruct.Move_E_scale / 10;
sprintf_P(gcode_string, PSTR("G1 E%.2f"), (HMI_ValueStruct.Move_E_scale/10));
gcode.process_subcommands_now_P("G1 F150");
gcode.process_subcommands_now_P("G92 E0");
gcode.process_subcommands_now_P(PSTR(gcode_string ));
break;
case 3: //Retreat
#ifdef PREVENT_COLD_EXTRUSION
Expand All @@ -3465,11 +3464,10 @@ void HMI_Refuel(void){
return;
}
#endif
if (!planner.is_full()) {
planner.synchronize(); // Wait for planner moves to finish!
planner.buffer_line(current_position, MMM_TO_MMS(FEEDRATE_E), active_extruder);
}
current_position.e = current_position.e - HMI_ValueStruct.Move_E_scale / 10;
sprintf_P(gcode_string, PSTR("G1 E-%.2f"), (HMI_ValueStruct.Move_E_scale/10));
gcode.process_subcommands_now_P("G1 F150");
gcode.process_subcommands_now_P("G92 E0");
gcode.process_subcommands_now_P(PSTR(gcode_string ));
break;
}
}
Expand Down Expand Up @@ -4052,6 +4050,8 @@ void EachMomentUpdate() {
if (encoder_diffState == ENCODER_DIFF_ENTER) {
recovery_flag = false;
if (HMI_flag.select_flag) break;
gcode.process_subcommands_now_P(PSTR("M21"));//Reload SD Card
recovery.purge();
TERN_(POWER_LOSS_RECOVERY, queue.inject_P(PSTR("M1000C")));
HMI_StartFrame(true);
return;
Expand Down

0 comments on commit b2aebb1

Please sign in to comment.