From 6f915ee401451068720a0fcb3af565ff3e916a91 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gu=C3=B0ni=20M=C3=A1r=20Gilbert?= Date: Sat, 4 May 2024 00:22:17 +0000 Subject: [PATCH] MMU: Add workaround for broken Tune button If the MMU is processing a command, the Tune button can't be executed. Change in memory: Flash: +16 bytes SRAM: 0 bytes --- Firmware/mmu2_reporting.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Firmware/mmu2_reporting.cpp b/Firmware/mmu2_reporting.cpp index 86db073343..428136b3ad 100644 --- a/Firmware/mmu2_reporting.cpp +++ b/Firmware/mmu2_reporting.cpp @@ -464,6 +464,15 @@ void tuneIdlerStallguardThresholdMenu() { } void tuneIdlerStallguardThreshold() { + if ((CommandInProgress)mmu2.GetCommandInProgress() != NoCommand) + { + // Workaround to mitigate an issue where the Tune menu doesn't + // work if the MMU is running a command. For example the Idler + // homing fails during toolchange. + // To save the print, make the Tune button unresponsive for now. + return; + } + putErrorScreenToSleep = true; menu_submenu(tuneIdlerStallguardThresholdMenu); }