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
This commit is contained in:
gudnimg 2023-10-28 19:31:32 +00:00
parent 3b10c6130e
commit 287e340117
1 changed files with 3 additions and 0 deletions

View File

@ -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: