Fix button enum

This commit is contained in:
VintagePC 2022-06-18 12:59:55 -04:00 committed by D.R.racer
parent d9676eff25
commit c07a5f396d
2 changed files with 3 additions and 2 deletions

View File

@ -21,9 +21,9 @@ enum class ButtonOperations : uint8_t {
/// Button codes + extended actions performed on the printer's side /// Button codes + extended actions performed on the printer's side
enum Buttons : uint8_t { enum Buttons : uint8_t {
Left = 0, Right = 0,
Middle, Middle,
Right, Left,
// performed on the printer's side // performed on the printer's side
RestartMMU, RestartMMU,

View File

@ -238,6 +238,7 @@ StepStatus Command::Step() {
// The user pushed a button on the MMU. Save it, do what we need to do // The user pushed a button on the MMU. Save it, do what we need to do
// to prepare, then pass it back to the MMU so it can work its magic. // to prepare, then pass it back to the MMU so it can work its magic.
logic->buttonCode = static_cast<Buttons>(logic->rsp.paramValue); logic->buttonCode = static_cast<Buttons>(logic->rsp.paramValue);
SendAndUpdateFilamentSensor();
return ButtonPushed; return ButtonPushed;
case ResponseMsgParamCodes::Finished: case ResponseMsgParamCodes::Finished:
logic->progressCode = ProgressCode::OK; logic->progressCode = ProgressCode::OK;