Skip to content

Update Prusa MMU3 #27719

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 22 commits into
base: bugfix-2.1.x
Choose a base branch
from

Conversation

classicrocker883
Copy link
Contributor

@classicrocker883 classicrocker883 commented Mar 3, 2025

Description

Basically, since this was originally MMU2 stuff, I've updated to the correct MMU3 stuff

  • The old .yaml file no worky. - src\feature\mmu3\mmu_hw\check-pce.sh
  • Added a new error code that wasnt there before
  • Updated error MSG_ | TITLE_, and DESC_ - language_en.h

Note

Originally, this code was taken from prusa3d/Prusa-Firmware/tree/MK3/Firmware/mmu2 + files included from the previous Firmware directory, updated last by #26635 as to work with MMU3.
However, this repo has support for MMU2S
The two share a common firmware - in their Releases, one asset is MMU2S_MMU3_FW3.0.3+896.hex
and from the README file:

# Prusa-Firmware-MMU
The currently supported models are:

- Original Prusa MMU3
- Original Prusa MMU2S

Maybe @eoyilmaz or @thinkyhead or someone else can review this,
but perhaps HAS_PRUSA_MMU2S is closer related to HAS_PRUSA_MMU3 - I mean according to @prusa3d thats what it seems like


Furthermore

I am unsure of a few things, such as the ButtonOperations
According to prusa3d/Prusa-Error-Codes, there has been some removed from enum class ButtonOperations in button_operations.h . Things like Skip was added, and MoreInfo removed. So I'm not so sure how to deal with this in the remaining files. I left MoreInfo, because some things do use it, I just dont know how or if it (still) works for the printer/MMU side, or was meant only for MMU2
Also, in the updated mmu-error-codes.yaml, it seems button options like Tune and such were dropped so I'm wondering how that works on the Prusa's side.

Requirements

  • MarlinUI
  • Prusa MMU3

Benefits

  • Update/fix non-working URL
  • Add/rename error codes to work with updated MMU3 firmware

Configurations

Related Issues

Just wanted to point this out

not sure if this needs change, but
apparently a couple things have been declared but are unused:

  • two_choices
  • button_op_middle
Marlin\src\feature\mmu3\mmu3_reporting.cpp: In function 'void MMU3::ReportErrorHookStaticRender(uint8_t)':
Marlin\src\feature\mmu3\mmu3_reporting.cpp:299:12: warning: variable 'two_choices' set but not used [-Wunused-but-set-variable]
       bool two_choices = false;
            ^~~~~~~~~~~
Marlin\src\feature\mmu3\mmu3_reporting.cpp:304:21: warning: unused variable 'button_op_middle' [-Wunused-variable]
                     button_op_middle = BUTTON_OP_MIDDLE(button_operation);
                     ^~~~~~~~~~~~~~~~

@classicrocker883 classicrocker883 marked this pull request as draft March 15, 2025 13:20
@thinkyhead thinkyhead force-pushed the bugfix-2.1.x branch 3 times, most recently from 4354891 to efa1758 Compare March 28, 2025 01:57
@classicrocker883 classicrocker883 marked this pull request as ready for review April 2, 2025 10:50
@thinkyhead thinkyhead force-pushed the bugfix-2.1.x-March3 branch from 103a8f4 to 8954ea0 Compare April 20, 2025 16:15
@thinkyhead thinkyhead force-pushed the bugfix-2.1.x-March3 branch from 6457bf6 to cfcc8ab Compare April 20, 2025 17:09
@thinkyhead thinkyhead requested a review from Copilot April 24, 2025 03:09
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR updates the firmware support from MMU2 to MMU3 by aligning error codes, status messages, configuration checks, and button operations with the updated Prusa MMU3 specifications. Key changes include:

  • Updated error titles and descriptions in language_en.h to match MMU3 error semantics.
  • Revised configuration validation and register mappings in SanityCheck.h and registers.h.
  • Updated button operation definitions and error code handling in buttons.h, mmu3_error_converter.cpp, and mmu3.cpp.

Reviewed Changes

Copilot reviewed 10 out of 11 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
Marlin/src/lcd/language/language_en.h Adjusted error message identifiers and descriptions
Marlin/src/inc/SanityCheck.h Updated error messages to include MMU3 in configuration checks
Marlin/src/feature/mmu3/mmu_hw/registers.h Fixed register mapping value formatting
Marlin/src/feature/mmu3/mmu_hw/progress_codes.h Revised progress code definitions
Marlin/src/feature/mmu3/mmu_hw/errors_list.h Updated error codes and comments
Marlin/src/feature/mmu3/mmu_hw/error_codes.h Removed deprecated FILAMENT_CHANGE error code
Marlin/src/feature/mmu3/mmu_hw/buttons.h Updated button operations, deprecating unused definitions
Marlin/src/feature/mmu3/mmu3_reporting.h Adjusted enum type for command progress representation
Marlin/src/feature/mmu3/mmu3_error_converter.cpp Modified error code mapping to reflect MMU3 changes
Marlin/src/feature/mmu3/mmu3.cpp Removed obsolete error checks and added clarification comments
Files not reviewed (1)
  • Marlin/src/feature/mmu3/mmu_hw/check-pce.sh: Language not supported
Comments suppressed due to low confidence (1)

Marlin/src/feature/mmu3/mmu_hw/buttons.h:44

  • [nitpick] If the commented-out button operations (Load, Eject, Tune) are no longer needed, consider removing them entirely to avoid confusion.
//Load        = 5, //

thinkyhead and others added 3 commits April 23, 2025 22:12
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@classicrocker883
Copy link
Contributor Author

Reminder: Not sure on the status of Buttons::TuneMMU. in mm3/mm3.cpp
// TODO: May go unutilized, but it's here for now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants