Skip to content

Commit

Permalink
MMU: Set PAUSED_FOR_USER state on MMU error screen
Browse files Browse the repository at this point in the history
Setting this state notifies PrusaLink/PrusaConnect
that the printer is waiting for user input (attention).

Change in memory:
Flash: +12 bytes
SRAM: 0 bytes
  • Loading branch information
gudnimg committed Oct 28, 2023
1 parent 3b10c61 commit 287e340
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Firmware/mmu2_reporting.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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]];
Expand All @@ -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:
Expand All @@ -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:
Expand Down

0 comments on commit 287e340

Please sign in to comment.