Extract duplicate code into function. Saves 106B flash.
This commit is contained in:
parent
4bfa3d7e0b
commit
bf57a59147
|
|
@ -497,3 +497,4 @@ void M600_load_filament_movements();
|
||||||
void M600_wait_for_user(float HotendTempBckp);
|
void M600_wait_for_user(float HotendTempBckp);
|
||||||
void M600_check_state(float nozzle_temp);
|
void M600_check_state(float nozzle_temp);
|
||||||
void load_filament_final_feed();
|
void load_filament_final_feed();
|
||||||
|
void marlin_wait_for_click();
|
||||||
|
|
|
||||||
|
|
@ -4962,13 +4962,7 @@ if((eSoundMode==e_SOUND_MODE_LOUD)||(eSoundMode==e_SOUND_MODE_ONCE))
|
||||||
KEEPALIVE_STATE(IN_HANDLER);
|
KEEPALIVE_STATE(IN_HANDLER);
|
||||||
lcd_ignore_click(false);
|
lcd_ignore_click(false);
|
||||||
}else{
|
}else{
|
||||||
KEEPALIVE_STATE(PAUSED_FOR_USER);
|
marlin_wait_for_click();
|
||||||
while(!lcd_clicked()){
|
|
||||||
manage_heater();
|
|
||||||
manage_inactivity(true);
|
|
||||||
lcd_update(0);
|
|
||||||
}
|
|
||||||
KEEPALIVE_STATE(IN_HANDLER);
|
|
||||||
}
|
}
|
||||||
if (IS_SD_PRINTING)
|
if (IS_SD_PRINTING)
|
||||||
LCD_MESSAGERPGM(_T(MSG_RESUMING_PRINT));
|
LCD_MESSAGERPGM(_T(MSG_RESUMING_PRINT));
|
||||||
|
|
@ -9615,4 +9609,22 @@ if((eSoundMode==e_SOUND_MODE_LOUD)||(eSoundMode==e_SOUND_MODE_ONCE))
|
||||||
lcd_update_enable(false);
|
lcd_update_enable(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//! @brief Wait for click
|
||||||
|
//!
|
||||||
|
//! Set
|
||||||
|
void marlin_wait_for_click()
|
||||||
|
{
|
||||||
|
int busy_state_backup = busy_state;
|
||||||
|
KEEPALIVE_STATE(PAUSED_FOR_USER);
|
||||||
|
lcd_consume_click();
|
||||||
|
while(!lcd_clicked())
|
||||||
|
{
|
||||||
|
manage_heater();
|
||||||
|
manage_inactivity(true);
|
||||||
|
lcd_update(0);
|
||||||
|
}
|
||||||
|
KEEPALIVE_STATE(busy_state);
|
||||||
|
}
|
||||||
|
|
||||||
#define FIL_LOAD_LENGTH 60
|
#define FIL_LOAD_LENGTH 60
|
||||||
|
|
|
||||||
|
|
@ -1518,14 +1518,7 @@ void mmu_continue_loading(bool blocking)
|
||||||
|
|
||||||
if (blocking)
|
if (blocking)
|
||||||
{
|
{
|
||||||
KEEPALIVE_STATE(PAUSED_FOR_USER);
|
marlin_wait_for_click();
|
||||||
lcd_consume_click();
|
|
||||||
while(!lcd_clicked()){
|
|
||||||
manage_heater();
|
|
||||||
manage_inactivity(true);
|
|
||||||
lcd_update(0);
|
|
||||||
}
|
|
||||||
KEEPALIVE_STATE(IN_HANDLER);
|
|
||||||
restore_print_from_ram_and_continue(0);
|
restore_print_from_ram_and_continue(0);
|
||||||
mmu_command(MmuCmd::T0 + tmp_extruder);
|
mmu_command(MmuCmd::T0 + tmp_extruder);
|
||||||
manage_response(true, true, MMU_TCODE_MOVE);
|
manage_response(true, true, MMU_TCODE_MOVE);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue