Fix repeated autoload menu

This commit is contained in:
Alex Voinea 2022-02-22 15:26:03 +01:00 committed by D.R.racer
parent 45e43137a5
commit f03922f7cf
1 changed files with 2 additions and 2 deletions

View File

@ -69,7 +69,7 @@ protected:
};
void triggerFilamentInserted() {
if (autoLoadEnabled/* && (eFilamentAction == FilamentAction::None) */ && !(moves_planned() || IS_SD_PRINTING || usb_timer.running() || (lcd_commands_type == LcdCommands::Layer1Cal) || eeprom_read_byte((uint8_t*)EEPROM_WIZARD_ACTIVE))) {
if (autoLoadEnabled && (eFilamentAction == FilamentAction::None) && !(moves_planned() || IS_SD_PRINTING || usb_timer.running() || (lcd_commands_type == LcdCommands::Layer1Cal) || eeprom_read_byte((uint8_t*)EEPROM_WIZARD_ACTIVE))) {
eFilamentAction = FilamentAction::AutoLoad;
if(target_temperature[0] >= EXTRUDE_MINTEMP){
bFilamentPreheatState = true;
@ -82,7 +82,7 @@ protected:
}
void triggerFilamentRemoved() {
if (runoutEnabled/* && (eFilamentAction == FilamentAction::None) */ && !saved_printing && (moves_planned() || IS_SD_PRINTING || usb_timer.running() || (lcd_commands_type == LcdCommands::Layer1Cal) || eeprom_read_byte((uint8_t*)EEPROM_WIZARD_ACTIVE))) {
if (runoutEnabled && (eFilamentAction == FilamentAction::None) && !saved_printing && (moves_planned() || IS_SD_PRINTING || usb_timer.running() || (lcd_commands_type == LcdCommands::Layer1Cal) || eeprom_read_byte((uint8_t*)EEPROM_WIZARD_ACTIVE))) {
runoutEnabled = false;
autoLoadEnabled = false;
stop_and_save_print_to_ram(0, 0);