Move resuming nozzle temperature to restore_print_from_ram_and_continue().
Known limitations: Unused code not removed. Unload filament moves extruder to print position.
This commit is contained in:
parent
2abd2a6cab
commit
a5db084b70
2 changed files with 13 additions and 20 deletions
|
@ -536,6 +536,7 @@ static float saved_pos[4] = { 0, 0, 0, 0 };
|
||||||
// Feedrate hopefully derived from an active block of the planner at the time the print has been canceled, in mm/min.
|
// Feedrate hopefully derived from an active block of the planner at the time the print has been canceled, in mm/min.
|
||||||
static float saved_feedrate2 = 0;
|
static float saved_feedrate2 = 0;
|
||||||
static uint8_t saved_active_extruder = 0;
|
static uint8_t saved_active_extruder = 0;
|
||||||
|
static float saved_extruder_temperature = 0.0;
|
||||||
static bool saved_extruder_under_pressure = false;
|
static bool saved_extruder_under_pressure = false;
|
||||||
static bool saved_extruder_relative_mode = false;
|
static bool saved_extruder_relative_mode = false;
|
||||||
static int saved_fanSpeed = 0;
|
static int saved_fanSpeed = 0;
|
||||||
|
@ -8743,6 +8744,7 @@ void stop_and_save_print_to_ram(float z_move, float e_move)
|
||||||
planner_abort_hard(); //abort printing
|
planner_abort_hard(); //abort printing
|
||||||
memcpy(saved_pos, current_position, sizeof(saved_pos));
|
memcpy(saved_pos, current_position, sizeof(saved_pos));
|
||||||
saved_active_extruder = active_extruder; //save active_extruder
|
saved_active_extruder = active_extruder; //save active_extruder
|
||||||
|
saved_extruder_temperature = degTargetHotend(active_extruder);
|
||||||
|
|
||||||
saved_extruder_under_pressure = extruder_under_pressure; //extruder under pressure flag - currently unused
|
saved_extruder_under_pressure = extruder_under_pressure; //extruder under pressure flag - currently unused
|
||||||
saved_extruder_relative_mode = axis_relative_modes[E_AXIS];
|
saved_extruder_relative_mode = axis_relative_modes[E_AXIS];
|
||||||
|
@ -8797,6 +8799,10 @@ void restore_print_from_ram_and_continue(float e_move)
|
||||||
// for (int axis = X_AXIS; axis <= E_AXIS; axis++)
|
// for (int axis = X_AXIS; axis <= E_AXIS; axis++)
|
||||||
// current_position[axis] = st_get_position_mm(axis);
|
// current_position[axis] = st_get_position_mm(axis);
|
||||||
active_extruder = saved_active_extruder; //restore active_extruder
|
active_extruder = saved_active_extruder; //restore active_extruder
|
||||||
|
setTargetHotendSafe(saved_extruder_temperature,saved_active_extruder);
|
||||||
|
heating_status = 1;
|
||||||
|
wait_for_heater(millis(),saved_active_extruder);
|
||||||
|
heating_status = 2;
|
||||||
feedrate = saved_feedrate2; //restore feedrate
|
feedrate = saved_feedrate2; //restore feedrate
|
||||||
axis_relative_modes[E_AXIS] = saved_extruder_relative_mode;
|
axis_relative_modes[E_AXIS] = saved_extruder_relative_mode;
|
||||||
fanSpeed = saved_fanSpeed;
|
fanSpeed = saved_fanSpeed;
|
||||||
|
|
|
@ -5522,30 +5522,17 @@ static void lcd_test_menu()
|
||||||
|
|
||||||
static void pause_print()
|
static void pause_print()
|
||||||
{
|
{
|
||||||
|
lcd_clear();
|
||||||
|
lcd_puts_P(_i("Pausing"));
|
||||||
|
lcd_setstatuspgm(_i("Print paused"));
|
||||||
stop_and_save_print_to_ram(0.0,0.0);
|
stop_and_save_print_to_ram(0.0,0.0);
|
||||||
long_pause();
|
long_pause();
|
||||||
|
lcd_return_to_status();
|
||||||
}
|
}
|
||||||
static void resume_print()
|
static void resume_print()
|
||||||
{
|
{
|
||||||
lcd_set_cursor(0, 0);
|
lcd_return_to_status();
|
||||||
lcdui_print_temp(LCD_STR_THERMOMETER[0], (int)(degHotend(0) + 0.5), (int)(degTargetHotend(0) + 0.5));
|
|
||||||
lcd_space(3);
|
|
||||||
lcd_puts_P(_T(MSG_HEATING));
|
|
||||||
if (!blocks_queued())
|
|
||||||
{
|
|
||||||
if ((0 == menu_data[0]))
|
|
||||||
{
|
|
||||||
char cmd1[30];
|
|
||||||
strcpy(cmd1, "M109 S");
|
|
||||||
strcat(cmd1, ftostr3(HotendTempBckp));
|
|
||||||
enquecommand(cmd1);
|
|
||||||
menu_data[0] = 1;
|
|
||||||
} else if (1 != heating_status)
|
|
||||||
{
|
|
||||||
restore_print_from_ram_and_continue(0.0);
|
restore_print_from_ram_and_continue(0.0);
|
||||||
menu_back();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void lcd_main_menu()
|
static void lcd_main_menu()
|
||||||
|
|
Loading…
Reference in a new issue