Skip to content

Commit

Permalink
MK3 sync Prusa-Error-Codes (MarlinFirmware#4238)
Browse files Browse the repository at this point in the history
* Sync PEC `FINDA_DIDNT_GO_OFF` to `FINDA_FILAMENT_STUCK`

* Sync PEC `FSENSOR_DIDNT_GO_OFF` to `FSENSOR_FILAMENT_STUCK`

* Sync PEC `PULLEY_STALLED` to `PULLEY_CANNOT_MOVE`

* Sync PEC `SELECTOR_CANNOT_MOVE` update text

* Sync PEC `IDLER_CANNOT_MOVE` update text

* Sync PEC `PULLEY_WARNING_TMC_TOO_HOT` to `WARNING_TMC_PULLEY_TOO_HOT`

* Snyc PEC `RestartMMU` to `ResetMMU`
Also related text

* Sync PEC `SELECTOR_WARNING_TMC_TOO_HOT` to `WARNING_TMC_SELECTOR_TOO_HOT`

* Sync PEC `IDLER_WARNING_TMC_TOO_HOT` to `WARNING_TMC_IDLER_TOO_HOT`

* Sync PEC `PULLEY_TMC_OVERHEAT_ERROR` to `TMC_PULLEY_OVERHEAT_ERROR`

* Sync PEC `SELECTOR_TMC_OVERHEAT_ERROR` to `TMC_SELECTOR_OVERHEAT_ERROR`

* Sync PEC `IDLER_TMC_OVERHEAT_ERROR` to `TMC_IDLER_OVERHEAT_ERROR`

* Sync PEC `PULLEY_TMC_DRIVER_ERROR` to `TMC_PULLEY_DRIVER_ERROR`
Also releated text

* Sync PEC `SELECTOR_TMC_DRIVER_ERROR` to `TMC_SELECTOR_DRIVER_ERROR`
Also related text

* Sync PEC `IDLER_TMC_DRIVER_ERROR` to `TMC_IDLER_DRIVER_ERROR`
Also related text

* Sync PEC `PULLEY_TMC_DRIVER_RESET` to `TMC_PULLEY_DRIVER_RESET`

* Sync PEC `SELECTOR_TMC_DRIVER_RESET` to `TMC_SELECTOR_DRIVER_RESET`

* Sync PEC `IDLER_TMC_DRIVER_RESET` to `TMC_IDLER_DRIVER_RESET`

* Sync PEC `PULLEY_TMC_UNDERVOLTAGE_ERROR` to `TMC_PULLEY_UNDERVOLTAGE_ERROR`

* Sync PEC `SELECTOR_TMC_UNDERVOLTAGE_ERROR` to `TMC_SELECTOR_UNDERVOLTAGE_ERROR`

* Sync PEC `IDLER_TMC_UNDERVOLTAGE_ERROR` to `TMC_IDLER_UNDERVOLTAGE_ERROR`

* Sync PEC `PULLEY_TMC_DRIVER_SHORTED` to `TMC_PULLEY_DRIVER_SHORTED`
Also related text

* Sync PEC `SELECTOR_TMC_DRIVER_SHORTED` to `TMC_SELECTOR_DRIVER_SHORTED`
Also related text

* Sync PEC `IDLER_TMC_DRIVER_SHORTED` to `TMC_IDLER_DRIVER_SHORTED`
Also related text

* Sync PEC `PULLEY_SELFTEST_FAILED` to `MMU_PULLEY_SELFTEST_FAILED`
Also related text

* Sync PEC `SELECTOR_SELFTEST_FAILED` to `MMU_SELECTOR_SELFTEST_FAILED`
Also releated text

* Sync PEC `IDLER_SELFTEST_FAILED` to `MMU_IDLER_SELFTEST_FAILED`
Also related text

* Sync PEC fix MMU_MMU
Update MMU MCU UNDERPOWER

* Sync PEC `FIL_ALREADY_LOADED` to `FILAMENT_ALREADY_LOADED`
Also related text

* Add Prusa Error Codes check script

* Remove `:` at FINDA and FSENSOR as it is in other tiles

* Sync
FSENSOR_DIDNT_TRIGGER
MSG_DESC_SELECTOR_CANNOT_MOVE
MSG_DESC_IDLER_CANNOT_MOVE
MSG_DESC_FW_UPDATE_NEEDED
FILAMENT_ALREADY_LOADED

* Add MMU UNKOWN_ERROR PEC
  • Loading branch information
3d-gussner authored Jun 21, 2023
1 parent ded448d commit b5bd9eb
Show file tree
Hide file tree
Showing 20 changed files with 1,706 additions and 1,507 deletions.
2 changes: 1 addition & 1 deletion Firmware/mmu2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -722,7 +722,7 @@ void MMU2::CheckUserInput() {
break;
}
break;
case RestartMMU:
case ResetMMU:
Reset(ResetPin); // we cannot do power cycle on the MK3
// ... but mmu2_power.cpp knows this and triggers a soft-reset instead.
break;
Expand Down
4 changes: 2 additions & 2 deletions Firmware/mmu2/buttons.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ enum class ButtonOperations : uint8_t {
NoOperation = 0,
Retry = 1,
Continue = 2,
RestartMMU = 3,
ResetMMU = 3,
Unload = 4,
StopPrint = 5,
DisableMMU = 6,
Expand All @@ -26,7 +26,7 @@ enum Buttons : uint8_t {
Left,

// performed on the printer's side
RestartMMU,
ResetMMU,
StopPrint,
DisableMMU,

Expand Down
55 changes: 55 additions & 0 deletions Firmware/mmu2/check-pce.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
#!/bin/bash

# download Prusa Error Codes for MMU
#wget https://raw.githubusercontent.com/3d-gussner/Prusa-Error-Codes/master/04_MMU/error-codes.yaml --output-document=error-codes.yaml
wget https://raw.githubusercontent.com/prusa3d/Prusa-Error-Codes/master/04_MMU/error-codes.yaml --output-document=error-codes.yaml

oifs="$IFS" ## save original IFS
IFS=$'\n' ## set IFS to break on newline
codes=($(cat error-codes.yaml |grep "code:" |cut -d '"' -f2))
titles=($(cat error-codes.yaml |grep 'title:' |cut -d '"' -f2))
texts=($(cat error-codes.yaml |grep "text:" |cut -d '"' -f2))
actions=($(cat error-codes.yaml |grep "action:" |cut -d ':' -f2))
ids=($(cat error-codes.yaml |grep "id:" |cut -d '"' -f2))
IFS="$oifs" ## restore original IFS

filename=errors_list.h

clear
for ((i = 0; i < ${#codes[@]}; i++)) do
code=${codes[i]}
id=$(cat $filename |grep "${code#04*}" | cut -d "=" -f1 | cut -d "_" -f3- |cut -d " " -f1)
title=$(cat $filename |grep "${id}" |grep --max-count=1 "MSG_TITLE" |cut -d '"' -f2)
text=$(cat $filename |grep "${id}" |grep --max-count=1 "MSG_DESC" |cut -d '"' -f2)
action1=$(cat $filename |grep "),//$id"| cut -d "," -f1)
action2=$(cat $filename |grep "),//$id"| cut -d "," -f2)
action1=$(echo $action1 | cut -d ":" -f2- |cut -d ":" -f2)
action2=$(echo $action2 | cut -d ":" -f2- |cut -d ":" -f2 |cut -d ")" -f1)
if [ "$action2" == "NoOperation" ]; then
action=" [$action1]"
else
action=" [$action1,$action2]"
fi
echo -n "code: $code |"
if [ "$id" != "${ids[i]}" ]; then
echo -n "$(tput setaf 1) $id $(tput sgr0) # $(tput setaf 2)${ids[i]}$(tput sgr0)|"
else
echo -n " $id |"
fi
if [ "$title" != "${titles[i]}" ]; then
echo -n "$(tput setaf 1) $title $(tput sgr0) # $(tput setaf 2)${titles[i]}$(tput sgr0)|"
else
echo -n " $title |"
fi
if [ "$text" != "${texts[i]}" ]; then
echo -n "$(tput setaf 1) $text $(tput sgr0) # $(tput setaf 2)${texts[i]}$(tput sgr0)|"
else
echo -n " $text |"
fi
if [ "$action" != "${actions[i]}" ]; then
echo -n "$(tput setaf 1) $action $(tput sgr0) # $(tput setaf 2)${actions[i]}$(tput sgr0)|"
else
echo -n " $action |"
fi
echo
done
322 changes: 170 additions & 152 deletions Firmware/mmu2/errors_list.h

Large diffs are not rendered by default.

116 changes: 58 additions & 58 deletions Firmware/mmu2_error_converter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,20 +31,20 @@ static constexpr uint8_t FindErrorIndex(uint16_t pec) {

// check that the searching algoritm works
static_assert( FindErrorIndex(ERR_MECHANICAL_FINDA_DIDNT_TRIGGER) == 0);
static_assert( FindErrorIndex(ERR_MECHANICAL_FINDA_DIDNT_GO_OFF) == 1);
static_assert( FindErrorIndex(ERR_MECHANICAL_FINDA_FILAMENT_STUCK) == 1);
static_assert( FindErrorIndex(ERR_MECHANICAL_FSENSOR_DIDNT_TRIGGER) == 2);
static_assert( FindErrorIndex(ERR_MECHANICAL_FSENSOR_DIDNT_GO_OFF) == 3);
static_assert( FindErrorIndex(ERR_MECHANICAL_FSENSOR_FILAMENT_STUCK) == 3);

uint8_t PrusaErrorCodeIndex(uint16_t ec) {
switch (ec) {
case (uint16_t)ErrorCode::FINDA_DIDNT_SWITCH_ON:
return FindErrorIndex(ERR_MECHANICAL_FINDA_DIDNT_TRIGGER);
case (uint16_t)ErrorCode::FINDA_DIDNT_SWITCH_OFF:
return FindErrorIndex(ERR_MECHANICAL_FINDA_DIDNT_GO_OFF);
return FindErrorIndex(ERR_MECHANICAL_FINDA_FILAMENT_STUCK);
case (uint16_t)ErrorCode::FSENSOR_DIDNT_SWITCH_ON:
return FindErrorIndex(ERR_MECHANICAL_FSENSOR_DIDNT_TRIGGER);
case (uint16_t)ErrorCode::FSENSOR_DIDNT_SWITCH_OFF:
return FindErrorIndex(ERR_MECHANICAL_FSENSOR_DIDNT_GO_OFF);
return FindErrorIndex(ERR_MECHANICAL_FSENSOR_FILAMENT_STUCK);
case (uint16_t)ErrorCode::FSENSOR_TOO_EARLY:
return FindErrorIndex(ERR_MECHANICAL_FSENSOR_TOO_EARLY);
case (uint16_t)ErrorCode::FINDA_FLICKERS:
Expand Down Expand Up @@ -93,61 +93,61 @@ uint8_t PrusaErrorCodeIndex(uint16_t ec) {
// and to keep the code size down.
if (ec & (uint16_t)ErrorCode::TMC_PULLEY_BIT) {
if ((ec & (uint16_t)ErrorCode::MMU_SOLDERING_NEEDS_ATTENTION) == (uint16_t)ErrorCode::MMU_SOLDERING_NEEDS_ATTENTION)
return FindErrorIndex(ERR_ELECTRICAL_PULLEY_SELFTEST_FAILED);
return FindErrorIndex(ERR_ELECTRICAL_MMU_PULLEY_SELFTEST_FAILED);
} else if (ec & (uint16_t)ErrorCode::TMC_SELECTOR_BIT) {
if ((ec & (uint16_t)ErrorCode::MMU_SOLDERING_NEEDS_ATTENTION) == (uint16_t)ErrorCode::MMU_SOLDERING_NEEDS_ATTENTION)
return FindErrorIndex(ERR_ELECTRICAL_SELECTOR_SELFTEST_FAILED);
return FindErrorIndex(ERR_ELECTRICAL_MMU_SELECTOR_SELFTEST_FAILED);
} else if (ec & (uint16_t)ErrorCode::TMC_IDLER_BIT) {
if ((ec & (uint16_t)ErrorCode::MMU_SOLDERING_NEEDS_ATTENTION) == (uint16_t)ErrorCode::MMU_SOLDERING_NEEDS_ATTENTION)
return FindErrorIndex(ERR_ELECTRICAL_IDLER_SELFTEST_FAILED);
return FindErrorIndex(ERR_ELECTRICAL_MMU_IDLER_SELFTEST_FAILED);
}

// TMC-related errors - multiple of these can occur at once
// - in such a case we report the first which gets found/converted into Prusa-Error-Codes (usually the fact, that one TMC has an issue is serious enough)
// By carefully ordering the checks here we can prioritize the errors being reported to the user.
if (ec & (uint16_t)ErrorCode::TMC_PULLEY_BIT) {
if (ec & (uint16_t)ErrorCode::TMC_IOIN_MISMATCH)
return FindErrorIndex(ERR_ELECTRICAL_PULLEY_TMC_DRIVER_ERROR);
return FindErrorIndex(ERR_ELECTRICAL_TMC_PULLEY_DRIVER_ERROR);
if (ec & (uint16_t)ErrorCode::TMC_RESET)
return FindErrorIndex(ERR_ELECTRICAL_PULLEY_TMC_DRIVER_RESET);
return FindErrorIndex(ERR_ELECTRICAL_TMC_PULLEY_DRIVER_RESET);
if (ec & (uint16_t)ErrorCode::TMC_UNDERVOLTAGE_ON_CHARGE_PUMP)
return FindErrorIndex(ERR_ELECTRICAL_PULLEY_TMC_UNDERVOLTAGE_ERROR);
return FindErrorIndex(ERR_ELECTRICAL_TMC_PULLEY_UNDERVOLTAGE_ERROR);
if (ec & (uint16_t)ErrorCode::TMC_SHORT_TO_GROUND)
return FindErrorIndex(ERR_ELECTRICAL_PULLEY_TMC_DRIVER_SHORTED);
return FindErrorIndex(ERR_ELECTRICAL_TMC_PULLEY_DRIVER_SHORTED);
if (ec & (uint16_t)ErrorCode::TMC_OVER_TEMPERATURE_WARN)
return FindErrorIndex(ERR_TEMPERATURE_PULLEY_WARNING_TMC_TOO_HOT);
return FindErrorIndex(ERR_TEMPERATURE_WARNING_TMC_PULLEY_TOO_HOT);
if (ec & (uint16_t)ErrorCode::TMC_OVER_TEMPERATURE_ERROR)
return FindErrorIndex(ERR_TEMPERATURE_PULLEY_TMC_OVERHEAT_ERROR);
return FindErrorIndex(ERR_TEMPERATURE_TMC_PULLEY_OVERHEAT_ERROR);
} else if (ec & (uint16_t)ErrorCode::TMC_SELECTOR_BIT) {
if (ec & (uint16_t)ErrorCode::TMC_IOIN_MISMATCH)
return FindErrorIndex(ERR_ELECTRICAL_SELECTOR_TMC_DRIVER_ERROR);
return FindErrorIndex(ERR_ELECTRICAL_TMC_SELECTOR_DRIVER_ERROR);
if (ec & (uint16_t)ErrorCode::TMC_RESET)
return FindErrorIndex(ERR_ELECTRICAL_SELECTOR_TMC_DRIVER_RESET);
return FindErrorIndex(ERR_ELECTRICAL_TMC_SELECTOR_DRIVER_RESET);
if (ec & (uint16_t)ErrorCode::TMC_UNDERVOLTAGE_ON_CHARGE_PUMP)
return FindErrorIndex(ERR_ELECTRICAL_SELECTOR_TMC_UNDERVOLTAGE_ERROR);
return FindErrorIndex(ERR_ELECTRICAL_TMC_SELECTOR_UNDERVOLTAGE_ERROR);
if (ec & (uint16_t)ErrorCode::TMC_SHORT_TO_GROUND)
return FindErrorIndex(ERR_ELECTRICAL_SELECTOR_TMC_DRIVER_SHORTED);
return FindErrorIndex(ERR_ELECTRICAL_TMC_SELECTOR_DRIVER_SHORTED);
if (ec & (uint16_t)ErrorCode::TMC_OVER_TEMPERATURE_WARN)
return FindErrorIndex(ERR_TEMPERATURE_SELECTOR_WARNING_TMC_TOO_HOT);
return FindErrorIndex(ERR_TEMPERATURE_WARNING_TMC_SELECTOR_TOO_HOT);
if (ec & (uint16_t)ErrorCode::TMC_OVER_TEMPERATURE_ERROR)
return FindErrorIndex(ERR_TEMPERATURE_SELECTOR_TMC_OVERHEAT_ERROR);
return FindErrorIndex(ERR_TEMPERATURE_TMC_SELECTOR_OVERHEAT_ERROR);
} else if (ec & (uint16_t)ErrorCode::TMC_IDLER_BIT) {
if (ec & (uint16_t)ErrorCode::TMC_IOIN_MISMATCH)
return FindErrorIndex(ERR_ELECTRICAL_IDLER_TMC_DRIVER_ERROR);
return FindErrorIndex(ERR_ELECTRICAL_TMC_IDLER_DRIVER_ERROR);
if (ec & (uint16_t)ErrorCode::TMC_RESET)
return FindErrorIndex(ERR_ELECTRICAL_IDLER_TMC_DRIVER_RESET);
return FindErrorIndex(ERR_ELECTRICAL_TMC_IDLER_DRIVER_RESET);
if (ec & (uint16_t)ErrorCode::TMC_UNDERVOLTAGE_ON_CHARGE_PUMP)
return FindErrorIndex(ERR_ELECTRICAL_IDLER_TMC_UNDERVOLTAGE_ERROR);
return FindErrorIndex(ERR_ELECTRICAL_TMC_IDLER_UNDERVOLTAGE_ERROR);
if (ec & (uint16_t)ErrorCode::TMC_SHORT_TO_GROUND)
return FindErrorIndex(ERR_ELECTRICAL_IDLER_TMC_DRIVER_SHORTED);
return FindErrorIndex(ERR_ELECTRICAL_TMC_IDLER_DRIVER_SHORTED);
if (ec & (uint16_t)ErrorCode::TMC_OVER_TEMPERATURE_WARN)
return FindErrorIndex(ERR_TEMPERATURE_IDLER_WARNING_TMC_TOO_HOT);
return FindErrorIndex(ERR_TEMPERATURE_WARNING_TMC_IDLER_TOO_HOT);
if (ec & (uint16_t)ErrorCode::TMC_OVER_TEMPERATURE_ERROR)
return FindErrorIndex(ERR_TEMPERATURE_IDLER_TMC_OVERHEAT_ERROR);
return FindErrorIndex(ERR_TEMPERATURE_TMC_IDLER_OVERHEAT_ERROR);
}

// if nothing got caught, return a generic runtime error
return FindErrorIndex(ERR_SYSTEM_FW_RUNTIME_ERROR);
return FindErrorIndex(ERR_OTHER_UNKNOWN_ERROR);
}

uint16_t PrusaErrorCode(uint8_t i){
Expand Down Expand Up @@ -195,14 +195,14 @@ Buttons ButtonAvailable(uint16_t ec) {
uint8_t ei = PrusaErrorCodeIndex(ec);

// The list of responses which occur in mmu error dialogs
// Return button index or perform some action on the MK3 by itself (like restart MMU)
// Return button index or perform some action on the MK3 by itself (like Reset MMU)
// Based on Prusa-Error-Codes errors_list.h
// So far hardcoded, but shall be generated in the future
switch ( PrusaErrorCode(ei) ) {
case ERR_MECHANICAL_FINDA_DIDNT_TRIGGER:
case ERR_MECHANICAL_FINDA_DIDNT_GO_OFF:
case ERR_MECHANICAL_FINDA_FILAMENT_STUCK:
case ERR_MECHANICAL_FSENSOR_DIDNT_TRIGGER:
case ERR_MECHANICAL_FSENSOR_DIDNT_GO_OFF:
case ERR_MECHANICAL_FSENSOR_FILAMENT_STUCK:
case ERR_MECHANICAL_FSENSOR_TOO_EARLY:
case ERR_MECHANICAL_INSPECT_FINDA:
case ERR_MECHANICAL_SELECTOR_CANNOT_HOME:
Expand All @@ -228,49 +228,49 @@ Buttons ButtonAvailable(uint16_t ec) {
break;
}
break;
case ERR_TEMPERATURE_PULLEY_WARNING_TMC_TOO_HOT:
case ERR_TEMPERATURE_SELECTOR_WARNING_TMC_TOO_HOT:
case ERR_TEMPERATURE_IDLER_WARNING_TMC_TOO_HOT:
case ERR_TEMPERATURE_WARNING_TMC_PULLEY_TOO_HOT:
case ERR_TEMPERATURE_WARNING_TMC_SELECTOR_TOO_HOT:
case ERR_TEMPERATURE_WARNING_TMC_IDLER_TOO_HOT:
switch (buttonSelectedOperation) {
case ButtonOperations::Continue: // "Continue"
return Left;
case ButtonOperations::RestartMMU: // "Restart MMU"
return RestartMMU;
case ButtonOperations::ResetMMU: // "Reset MMU"
return ResetMMU;
default:
break;
}
break;

case ERR_TEMPERATURE_PULLEY_TMC_OVERHEAT_ERROR:
case ERR_TEMPERATURE_SELECTOR_TMC_OVERHEAT_ERROR:
case ERR_TEMPERATURE_IDLER_TMC_OVERHEAT_ERROR:
case ERR_TEMPERATURE_TMC_PULLEY_OVERHEAT_ERROR:
case ERR_TEMPERATURE_TMC_SELECTOR_OVERHEAT_ERROR:
case ERR_TEMPERATURE_TMC_IDLER_OVERHEAT_ERROR:

case ERR_ELECTRICAL_PULLEY_TMC_DRIVER_ERROR:
case ERR_ELECTRICAL_SELECTOR_TMC_DRIVER_ERROR:
case ERR_ELECTRICAL_IDLER_TMC_DRIVER_ERROR:
case ERR_ELECTRICAL_TMC_PULLEY_DRIVER_ERROR:
case ERR_ELECTRICAL_TMC_SELECTOR_DRIVER_ERROR:
case ERR_ELECTRICAL_TMC_IDLER_DRIVER_ERROR:

case ERR_ELECTRICAL_PULLEY_TMC_DRIVER_RESET:
case ERR_ELECTRICAL_SELECTOR_TMC_DRIVER_RESET:
case ERR_ELECTRICAL_IDLER_TMC_DRIVER_RESET:
case ERR_ELECTRICAL_TMC_PULLEY_DRIVER_RESET:
case ERR_ELECTRICAL_TMC_SELECTOR_DRIVER_RESET:
case ERR_ELECTRICAL_TMC_IDLER_DRIVER_RESET:

case ERR_ELECTRICAL_PULLEY_TMC_UNDERVOLTAGE_ERROR:
case ERR_ELECTRICAL_SELECTOR_TMC_UNDERVOLTAGE_ERROR:
case ERR_ELECTRICAL_IDLER_TMC_UNDERVOLTAGE_ERROR:
case ERR_ELECTRICAL_TMC_PULLEY_UNDERVOLTAGE_ERROR:
case ERR_ELECTRICAL_TMC_SELECTOR_UNDERVOLTAGE_ERROR:
case ERR_ELECTRICAL_TMC_IDLER_UNDERVOLTAGE_ERROR:

case ERR_ELECTRICAL_PULLEY_TMC_DRIVER_SHORTED:
case ERR_ELECTRICAL_SELECTOR_TMC_DRIVER_SHORTED:
case ERR_ELECTRICAL_IDLER_TMC_DRIVER_SHORTED:
case ERR_ELECTRICAL_TMC_PULLEY_DRIVER_SHORTED:
case ERR_ELECTRICAL_TMC_SELECTOR_DRIVER_SHORTED:
case ERR_ELECTRICAL_TMC_IDLER_DRIVER_SHORTED:

case ERR_ELECTRICAL_PULLEY_SELFTEST_FAILED:
case ERR_ELECTRICAL_SELECTOR_SELFTEST_FAILED:
case ERR_ELECTRICAL_IDLER_SELFTEST_FAILED:
case ERR_ELECTRICAL_MMU_PULLEY_SELFTEST_FAILED:
case ERR_ELECTRICAL_MMU_SELECTOR_SELFTEST_FAILED:
case ERR_ELECTRICAL_MMU_IDLER_SELFTEST_FAILED:

case ERR_SYSTEM_QUEUE_FULL:
case ERR_SYSTEM_FW_RUNTIME_ERROR:
case ERR_ELECTRICAL_MCU_UNDERVOLTAGE_VCC:
switch (buttonSelectedOperation) {
case ButtonOperations::RestartMMU: // "Restart MMU"
return RestartMMU;
case ButtonOperations::ResetMMU: // "Reset MMU"
return ResetMMU;
default:
break;
}
Expand All @@ -281,8 +281,8 @@ Buttons ButtonAvailable(uint16_t ec) {
switch (buttonSelectedOperation) {
case ButtonOperations::DisableMMU: // "Disable"
return DisableMMU;
case ButtonOperations::RestartMMU: // "RestartMMU"
return RestartMMU;
case ButtonOperations::ResetMMU: // "ResetMMU"
return ResetMMU;
default:
break;
}
Expand All @@ -302,8 +302,8 @@ Buttons ButtonAvailable(uint16_t ec) {
switch (buttonSelectedOperation) {
case ButtonOperations::StopPrint: // "Stop print"
return StopPrint;
case ButtonOperations::RestartMMU: // "Restart MMU"
return RestartMMU;
case ButtonOperations::ResetMMU: // "Reset MMU"
return ResetMMU;
default:
break;
}
Expand Down
2 changes: 1 addition & 1 deletion Firmware/mmu2_protocol_logic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ namespace MMU2 {
/// Changing the supportedMmuVersion numbers requires patching MSG_DESC_FW_UPDATE_NEEDED and all its related translations by hand.
///
/// The message reads:
/// "The MMU firmware version incompatible with the printer's FW. Update to version 2.1.6."
/// "MMU FW version is incompatible with printer FW.Update to version 2.1.9."
///
/// Currently, this is not possible to perform automatically at compile time with the existing languages/translations infrastructure.
/// To save space a "dumb" solution was chosen + a few static_assert checks in errors_list.h preventing the code from compiling when the string doesn't match.
Expand Down
Loading

0 comments on commit b5bd9eb

Please sign in to comment.