Extract duplicate code into function. Saves 106B flash.
This commit is contained in:
parent
4bfa3d7e0b
commit
bf57a59147
3 changed files with 21 additions and 15 deletions
|
@ -497,3 +497,4 @@ void M600_load_filament_movements();
|
|||
void M600_wait_for_user(float HotendTempBckp);
|
||||
void M600_check_state(float nozzle_temp);
|
||||
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);
|
||||
lcd_ignore_click(false);
|
||||
}else{
|
||||
KEEPALIVE_STATE(PAUSED_FOR_USER);
|
||||
while(!lcd_clicked()){
|
||||
manage_heater();
|
||||
manage_inactivity(true);
|
||||
lcd_update(0);
|
||||
}
|
||||
KEEPALIVE_STATE(IN_HANDLER);
|
||||
marlin_wait_for_click();
|
||||
}
|
||||
if (IS_SD_PRINTING)
|
||||
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);
|
||||
}
|
||||
|
||||
|
||||
//! @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
|
||||
|
|
|
@ -1518,14 +1518,7 @@ void mmu_continue_loading(bool blocking)
|
|||
|
||||
if (blocking)
|
||||
{
|
||||
KEEPALIVE_STATE(PAUSED_FOR_USER);
|
||||
lcd_consume_click();
|
||||
while(!lcd_clicked()){
|
||||
manage_heater();
|
||||
manage_inactivity(true);
|
||||
lcd_update(0);
|
||||
}
|
||||
KEEPALIVE_STATE(IN_HANDLER);
|
||||
marlin_wait_for_click();
|
||||
restore_print_from_ram_and_continue(0);
|
||||
mmu_command(MmuCmd::T0 + tmp_extruder);
|
||||
manage_response(true, true, MMU_TCODE_MOVE);
|
||||
|
|
Loading…
Add table
Reference in a new issue