Kaynağa Gözat

Fix button enum

VintagePC 1 yıl önce
ebeveyn
işleme
c07a5f396d
2 değiştirilmiş dosya ile 3 ekleme ve 2 silme
  1. 2 2
      Firmware/mmu2/buttons.h
  2. 1 0
      Firmware/mmu2_protocol_logic.cpp

+ 2 - 2
Firmware/mmu2/buttons.h

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

+ 1 - 0
Firmware/mmu2_protocol_logic.cpp

@@ -238,6 +238,7 @@ StepStatus Command::Step() {
             // 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.
             logic->buttonCode = static_cast<Buttons>(logic->rsp.paramValue);
+            SendAndUpdateFilamentSensor();
             return ButtonPushed;
         case ResponseMsgParamCodes::Finished:
             logic->progressCode = ProgressCode::OK;