From 942021cb2bc871a1b84d0f2c3025fdc23d322df1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gu=C3=B0ni=20M=C3=A1r=20Gilbert?= Date: Sat, 18 Mar 2023 12:47:40 +0000 Subject: [PATCH] PFW-1503 Fix an issue where the menu is dismissed in First layer calibraiton When the extruder lifts up after completing the Purge line, the baby stepping is not allowed for a short time. This dismisses the menu. We don't want this behavior, so only apply the Z-axis requirement when printing. Change in memory: Flash: +8 bytes SRAM: 0 bytes --- Firmware/Marlin.h | 4 +++- Firmware/Marlin_main.cpp | 6 +++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/Firmware/Marlin.h b/Firmware/Marlin.h index b7d376255..1cef467d6 100755 --- a/Firmware/Marlin.h +++ b/Firmware/Marlin.h @@ -373,7 +373,9 @@ bool check_fsensor(); //! 1) Z-axis position is less than 2.0mm (only allowed during the first couple of layers) //! 2) Not allowed during Homing (printer busy) //! 3) Not allowed during Mesh Bed Leveling (printer busy) -//! 4) Allowed if there are queued blocks OR there is a print job running +//! 4) Allowed if: +//! - First Layer Calibration is running +//! - OR there are queued blocks, printJob is running and it's not paused, and Z-axis position is less than 2.0mm (only allowed during the first couple of layers) bool babystep_allowed(); extern void calculate_extruder_multipliers(); diff --git a/Firmware/Marlin_main.cpp b/Firmware/Marlin_main.cpp index 1d71c3f01..8b1562955 100644 --- a/Firmware/Marlin_main.cpp +++ b/Firmware/Marlin_main.cpp @@ -549,9 +549,9 @@ bool check_fsensor() { } bool __attribute__((noinline)) babystep_allowed() { - return ( (current_position[Z_AXIS] < Z_HEIGHT_HIDE_LIVE_ADJUST_MENU) - && !homing_flag && !mesh_bed_leveling_flag - && ( blocks_queued() || lcd_commands_type == LcdCommands::Layer1Cal || ( !isPrintPaused && printJobOngoing() )) + return ( !homing_flag + && !mesh_bed_leveling_flag + && ( lcd_commands_type == LcdCommands::Layer1Cal || ( blocks_queued() && !isPrintPaused && printJobOngoing() && (current_position[Z_AXIS] < Z_HEIGHT_HIDE_LIVE_ADJUST_MENU))) ); }