From 287e3401171566c9213417940ee42b75d7baf0d1 Mon Sep 17 00:00:00 2001 From: gudnimg Date: Sat, 28 Oct 2023 19:31:32 +0000 Subject: [PATCH] MMU: Set PAUSED_FOR_USER state on MMU error screen Setting this state notifies PrusaLink/PrusaConnect that the printer is waiting for user input (attention). Change in memory: Flash: +12 bytes SRAM: 0 bytes --- Firmware/mmu2_reporting.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Firmware/mmu2_reporting.cpp b/Firmware/mmu2_reporting.cpp index a44f03947..3e3d69dc9 100644 --- a/Firmware/mmu2_reporting.cpp +++ b/Firmware/mmu2_reporting.cpp @@ -248,6 +248,7 @@ void ReportErrorHook(CommandInProgress /*cip*/, ErrorCode ec, uint8_t /*es*/) { switch ((uint8_t)ReportErrorHookState) { case (uint8_t)ReportErrorHookStates::RENDER_ERROR_SCREEN: + KEEPALIVE_STATE(PAUSED_FOR_USER); ReportErrorHookStaticRender(ei); ReportErrorHookState = ReportErrorHookStates::MONITOR_SELECTION; [[fallthrough]]; @@ -270,6 +271,7 @@ void ReportErrorHook(CommandInProgress /*cip*/, ErrorCode ec, uint8_t /*es*/) { sound_wait_for_user_reset(); // Reset the state in case a new error is reported is_mmu_error_monitor_active = false; + KEEPALIVE_STATE(IN_HANDLER); ReportErrorHookState = ReportErrorHookStates::RENDER_ERROR_SCREEN; break; default: @@ -283,6 +285,7 @@ void ReportErrorHook(CommandInProgress /*cip*/, ErrorCode ec, uint8_t /*es*/) { sound_wait_for_user_reset(); // Reset the state in case a new error is reported is_mmu_error_monitor_active = false; + KEEPALIVE_STATE(IN_HANDLER); ReportErrorHookState = ReportErrorHookStates::RENDER_ERROR_SCREEN; break; default: