From 6b7a018f9b7125d326519af5aba105ffda28bcb6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gu=C3=B0ni=20M=C3=A1r=20Gilbert?= Date: Sat, 9 Jul 2022 15:06:25 +0000 Subject: [PATCH] PFW-1354 Fix slow button processing (#37) * Fix MK3S buttons being processed too slowly After a button is selected on the MK3S MMU error screen, we need to process it before asking for another MMU Query. Because the MMU Query will make the Error screen return and overwrite the status screen * Add back CheckUserInput for ButtonPushed event --- Firmware/mmu2.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/Firmware/mmu2.cpp b/Firmware/mmu2.cpp index 6f120114a..1c47eab24 100644 --- a/Firmware/mmu2.cpp +++ b/Firmware/mmu2.cpp @@ -678,6 +678,7 @@ void MMU2::manage_response(const bool move_axes, const bool turn_off_nozzle) { } StepStatus MMU2::LogicStep() { + CheckUserInput(); // Process any buttons before proceeding with another MMU Query StepStatus ss = logic.Step(); switch (ss) { case Finished: @@ -686,27 +687,23 @@ StepStatus MMU2::LogicStep() { break; case CommandError: ReportError(logic.Error(), ErrorSourceMMU); - CheckUserInput(); break; case CommunicationTimeout: state = xState::Connecting; ReportError(ErrorCode::MMU_NOT_RESPONDING, ErrorSourcePrinter); - CheckUserInput(); break; case ProtocolError: state = xState::Connecting; ReportError(ErrorCode::PROTOCOL_ERROR, ErrorSourcePrinter); - CheckUserInput(); break; case VersionMismatch: StopKeepPowered(); ReportError(ErrorCode::VERSION_MISMATCH, ErrorSourcePrinter); - CheckUserInput(); break; case ButtonPushed: lastButton = logic.Button(); LogEchoEvent("MMU Button pushed"); - CheckUserInput(); + CheckUserInput(); // Process the button immediately break; default: break;