From d027c894be188cd40ca25a9978f73ec85eaddf95 Mon Sep 17 00:00:00 2001 From: sarusani Date: Tue, 20 Aug 2024 14:58:59 +0200 Subject: [PATCH] Exit Nozzle Change if filament is loaded Abort Nozzle change if fsensor is enabled and filament is present. --- Firmware/ultralcd.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Firmware/ultralcd.cpp b/Firmware/ultralcd.cpp index 629c8801ed..1d2d3da537 100644 --- a/Firmware/ultralcd.cpp +++ b/Firmware/ultralcd.cpp @@ -984,6 +984,16 @@ void lcd_commands() break; case 3: #ifndef QUICK_NOZZLE_CHANGE +#ifdef FILAMENT_SENSOR + if (fsensor.isEnabled() && fsensor.getFilamentPresent()) { + lcd_show_fullscreen_message_and_wait_P(_T(MSG_UNLOAD_FILAMENT_REPEAT)); + lcd_commands_step = 0; + lcd_commands_type = LcdCommands::Idle; + SetPrinterState(PrinterState::Idle); + lcd_setstatuspgm(MSG_WELCOME); + break; + } +#endif //FILAMENT_SENSOR lcd_show_fullscreen_message_and_wait_P(_T(MSG_NOZZLE_CNG_READ_HELP)); enquecommand_P(G28W); enquecommand_P(PSTR("G1 X125 Z200 F1000"));