|
@@ -165,6 +165,12 @@ public:
|
|
|
/// Method to read-only mmu_print_saved
|
|
|
bool MMU_PRINT_SAVED() const { return mmu_print_saved != SavedState::None; }
|
|
|
|
|
|
+ /// Automagically "press" a Retry button if we have any retry attempts left
|
|
|
+ bool RetryIfPossible(uint16_t ec);
|
|
|
+
|
|
|
+ /// Reset the retryAttempts back to the default value
|
|
|
+ void ResetRetryAttempts();
|
|
|
+
|
|
|
private:
|
|
|
/// Perform software self-reset of the MMU (sends an X0 command)
|
|
|
void ResetX0();
|
|
@@ -222,13 +228,13 @@ private:
|
|
|
|
|
|
/// Check for any button/user input coming from the printer's UI
|
|
|
void CheckUserInput();
|
|
|
-
|
|
|
+
|
|
|
/// Entry check of all external commands.
|
|
|
/// It can wait until the MMU becomes ready.
|
|
|
/// Optionally, it can also emit/display an error screen and the user can decide what to do next.
|
|
|
/// @returns false if the MMU is not ready to perform the command (for whatever reason)
|
|
|
bool WaitForMMUReady();
|
|
|
-
|
|
|
+
|
|
|
ProtocolLogic logic; ///< implementation of the protocol logic layer
|
|
|
int extruder; ///< currently active slot in the MMU ... somewhat... not sure where to get it from yet
|
|
|
uint8_t previous_extruder; ///< last active slot in the MMU, useful for M600
|
|
@@ -254,7 +260,7 @@ private:
|
|
|
/// unlike the mid-print ToolChange commands, which only load the first ~30mm and then the G-code takes over.
|
|
|
bool loadingToNozzle;
|
|
|
|
|
|
-
|
|
|
+ uint8_t retryAttempts;
|
|
|
};
|
|
|
|
|
|
/// following Marlin's way of doing stuff - one and only instance of MMU implementation in the code base
|