From c1ec80817c75de631aaf412ffb2b6eb983ed38b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gu=C3=B0ni=20M=C3=A1r=20Gilbert?= Date: Fri, 13 May 2022 19:18:32 +0000 Subject: [PATCH] Update the error menu after merging new changes Will test this tomorrow --- Firmware/mmu2/errors_list.h | 12 +++++------- Firmware/mmu2_reporting.cpp | 13 +++---------- 2 files changed, 8 insertions(+), 17 deletions(-) diff --git a/Firmware/mmu2/errors_list.h b/Firmware/mmu2/errors_list.h index 4f1665a6b..e68652dba 100644 --- a/Firmware/mmu2/errors_list.h +++ b/Firmware/mmu2/errors_list.h @@ -266,12 +266,11 @@ static const char * const errorDescs[] PROGMEM = { enum class ButtonOperations : uint8_t { NoOperation = 0, Retry = 1, - SlowLoad = 2, - Continue = 3, - RestartMMU = 4, - Unload = 5, - StopPrint = 6, - DisableMMU = 7, + Continue = 2, + RestartMMU = 3, + Unload = 4, + StopPrint = 5, + DisableMMU = 6, }; // we have max 3 buttons/operations to select from @@ -291,7 +290,6 @@ static const char btnMore[] PROGMEM_I1 = ISTR("More\x01"); // Used to parse the buttons from Btns(). static const char * const btnOperation[] PROGMEM = { btnRetry, - btnSlowLoad, btnContinue, btnRestartMMU, btnUnload, diff --git a/Firmware/mmu2_reporting.cpp b/Firmware/mmu2_reporting.cpp index 721eb7e04..db5e62cf0 100644 --- a/Firmware/mmu2_reporting.cpp +++ b/Firmware/mmu2_reporting.cpp @@ -37,7 +37,7 @@ void ReportErrorHook(CommandInProgress cip, uint16_t ec) { const uint8_t button_low_nibble = BUTTON_OP_LO_NIBBLE(button_operation); // Check if the menu should have three or two choices - if (button_low_nibble == (uint8_t)ButtonOperations::NoOperation) + if (button_high_nibble == (uint8_t)ButtonOperations::NoOperation) { // Two operations not specified, the error menu should only show two choices two_choices = true; @@ -58,9 +58,7 @@ back_to_choices: NULL, // NULL, since title screen is not in PROGMEM false, false, - two_choices ? - static_cast(pgm_read_ptr(&btnOperation[button_high_nibble - 1])) - : static_cast(pgm_read_ptr(&btnOperation[button_low_nibble - 1])), + static_cast(pgm_read_ptr(&btnOperation[button_low_nibble - 1])), two_choices ? btnMore : static_cast(pgm_read_ptr(&btnOperation[button_high_nibble - 1])), @@ -86,7 +84,6 @@ back_to_choices: switch (button_high_nibble) { case (uint8_t)ButtonOperations::Retry: - case (uint8_t)ButtonOperations::SlowLoad: case (uint8_t)ButtonOperations::Continue: case (uint8_t)ButtonOperations::RestartMMU: case (uint8_t)ButtonOperations::Unload: @@ -100,13 +97,9 @@ back_to_choices: } else { // TODO: User selected the left most choice, not sure what to do. // At the moment just return to the status screen - switch ( two_choices ? - button_high_nibble - : button_low_nibble - ) + switch (button_low_nibble) { case (uint8_t)ButtonOperations::Retry: - case (uint8_t)ButtonOperations::SlowLoad: case (uint8_t)ButtonOperations::Continue: case (uint8_t)ButtonOperations::RestartMMU: case (uint8_t)ButtonOperations::Unload: