-
-
Notifications
You must be signed in to change notification settings - Fork 19.3k
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
MMU3 Feature #26635
MMU3 Feature #26635
Conversation
Hi, Sorry for not dropping a detailed PR message earlier today, I didn't have time for that. So this is the MMU3 feature from PrusaFirmware. I tested the code heavily (albeit with only one printer) and it is working fine (but, I need to do more tests after I rebased the code to Marlin's HEAD to create this PR, I see lot's of things have changed). There are lots of things that I need to drop some note to. But if you were following the #26523 I already reported mostly about my progress there, and the code explains itself. For a short explanation, 95% of the code is migrated from PrusaFirmware and because it is mostly based on Marlin1 (if I'm not misttaken) I had to replace most of the code that are interacting with the rest of the Marlin, i.e. creating menus, querying something from the planner, saving something to the EEPROM etc. othwerwise the code is directly transferred from Prusa firmware. And becasue the code is somewhere in between PrusaFirmware and Marlin I think there are places that we have room for optimization. (just remembered that I was going to update the format to use 2 spaces, will do it in a minute). Anyways, I'm re-reading the code in this PR and I'll drop notes to places where I think I need supervision. |
I'm working on the build test errors for |
Hi there, I think the code is now ready to be reviewed... First, let me say that I'm not a C++ developer, or at least not for the last 10 years or so... So there might be (or definitelly will be) some suboptimal things that I added on top of Prusa's code, especially on the Known Problems & Bugs
and more things TODO
and I think that's all... I really enjoyed working on this, and I wanted to migrate this code to Marlin at the moment Prusa announced it... I was not sure if I was ever be able to do it, and I'm really proud of myself that I was and I'm really greateful both to the Prusa and Marlin community and developers that allowed me to run an MMU3 on my Ender 3 Pro... You guys are great 👍 |
Hi @thisiskeithb, do you need anything for this to be reviewed/merged? |
Thinkyhead will do a review once you're done making changes & he has time. There are quite a few other open PRs and there's still prep going on for the next release. |
7760a63
to
983724b
Compare
Just some friendly feedback. You shouldn't merge the bugfix-2.1.x branch into this PR. You should be doing a git rebase to rebase your changes onto that branch when you want to "pull in" updates. This PR should only contain your commits for the new feature. |
Actually I was trying to do a rebase to update some of my commit messages, and I think I messed up there... |
895dd8c
to
ae950bb
Compare
Is there any easy way to fix this at this stage? I tried doing a rebase again and force pushed to my branch, but I think it didn't work as we want it to be. and also if you look in to the files changed, you'll see only the files that I changed, nothing else. |
ae950bb
to
8387437
Compare
aah thank you @thisiskeithb 👍 |
|
The first hour or two of the review and prep time for this PR will be spent adding the standard Marlin header (with © 2024) to all the new source files and reformatting the code according to our standards (i.e., by using the included "uncrust" script and then following up with some adjustments). It would be a great help if you would go ahead and do this yourself so that we don't have to. At that point it will be "ready for review." |
@eoyilmaz FYI, I am in the process of trying out this PR on my printer. Don't let me hold anything up, just wanted to let everyone know. |
sure sure, this is my first PR to Marlin at this scale... I'll check the contribution guides again, and please do not spend extra time on aything that I can do 👍 |
Marlin/Configuration_adv.h
Outdated
#define MMU2_EXTRUDER_PTFE_LENGTH 42.3f // mm | ||
#define MMU2_EXTRUDER_HEATBREAK_LENGTH 17.7f // mm |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should these values added together represent the distance from the extruder gears to the nozzle tip? Maybe we can clarify this with comments?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I moved them up from around line 4540 where a comment exists already. But yeah a comment would be more descriptive.
Marlin/Configuration_adv.h
Outdated
// Beware - this value is used to initialize the MMU logic layer - it will be sent to the MMU upon line up (written into its 8bit register 0x0b) | ||
// However - in the G-code we can get a request to set the extra load distance at runtime to something else (M708 A0xb Xsomething). | ||
// The printer intercepts such a call and sets its extra load distance to match the new value as well. | ||
#define MMU2_FILAMENT_SENSOR_POSITION 0 // mm |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this the distance from the filament sensor to the gears?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Exactly, and it accepts negative values too (considering your setup it will be beneficial for you).
@thinkyhead as I see, the "uncrust" script adds the Marlin header to all the files (I'll update to 2024), and it contains similar text to the one that exists in: https://github.com/prusa3d/Prusa-Firmware/blob/MK3/Firmware/Firmware.ino Do we need to add anything to that as these files are coming from PrusaFirmware? Or is this enough? |
@thinkyhead all are done 👍 |
c20e825
to
b3b0e5c
Compare
b3b0e5c
to
55653e9
Compare
ae92c63
to
d513215
Compare
I've rebased this PR to bring it up to date with current git checkout bugfix-2.1.x_mmu3_pr
git fetch origin
git reset --hard origin/bugfix-2.1.x_mmu3_pr |
4833a0c
to
9ffa167
Compare
MarlinFirmware/Marlin#26635 Co-Authored-By: Erkan Ozgur Yilmaz <[email protected]>
I'll have this merged shortly for wider testing. Feel free to submit updates to clean up or improve anything, or to add MMU3 menu items for other LCD controllers. In general any values stored in EEPROM that are associated with a G-code should be reported as such so that users can replay that G-code to recover settings. And, if MMU3 settings exist which are stored to EEPROM but which don't have an associated G-code, then a G-code and/or parameters should be created for each of those settings. We will then document those G-codes and other firmwares can choose to adopt them, or not. |
MarlinFirmware/Marlin#26635 Co-Authored-By: Erkan Ozgur Yilmaz <[email protected]>
Description
This adds the MMU3 feature from Prusa Firmware.
Requirements
No special requirements
Benefits
It is now possible to use MMU3 hardware along with the features like SpoolJoin etc.
Related Issues