From f03922f7cf036efa403d570f0420761507eb37ff Mon Sep 17 00:00:00 2001 From: Alex Voinea Date: Tue, 22 Feb 2022 15:26:03 +0100 Subject: [PATCH] Fix repeated autoload menu --- Firmware/Filament_sensor.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Firmware/Filament_sensor.h b/Firmware/Filament_sensor.h index 52b75dd4f..6cd1f7b66 100644 --- a/Firmware/Filament_sensor.h +++ b/Firmware/Filament_sensor.h @@ -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);