Skip to content
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

feat: Implementation of MMU panel to support single-extruder-multi-material printing using the Happy Hare for any MMU/AFC #1641

Open
wants to merge 59 commits into
base: develop
Choose a base branch
from

Conversation

moggieuk
Copy link

Description

The PR adds an additional "MMU" Panel -- very visual and dynamic to both control and monitor state of MMU. This works with Happy Hare for any MMU or AFC (configuration is through klipper extensions). Prerequisite moonraker support has already been incorporated.

Summary:

  • There is one new "MMU" panel and 4 dialogs launched from the main panel menu.
  • If an MMU is not detected then the panel isn't displayed and the only overlap with existing functionality is in the print start dialog which also tests for existence of MMU.
  • The additions are all tested on mobile, tablet and widescreen on dark and light modes.
  • The only "connective tissue" is on the print start dialog where I detect if this is an MMU print and use my "tool mapper" instead of spoolman which will still appear for single color prints in MMU bypass is selected.
  • This integrates with current spoolman functionality. I made one very small change to the spoolman active spool chooser to allow it to be used for selection purposes without setting active spool
  • Finally, the print start functionality relies on some new metadata from moonraker -- that PR has already been merged into the latest moonraker.
  • All strings are tokenized and in locales/en.yaml
  • I created one additional mixin (mmu.ts) as a base for Mmu components.
  • If an MMU is not detected then the panel isn't displayed and the only overlap with existing functionality is in the print start dialog which also tests for existence of MMU.

The attached screenshots give a flavor of the main panel and a couple of the dialogs.

Mobile & Desktop Screenshots/Recordings

Here is a non-exhaustive selection of screenshots (some dialogs excluded):
Screenshot 2025-03-13 at 11 33 53 AM
Screenshot 2025-03-13 at 11 35 25 AM
Screenshot 2025-03-13 at 11 35 04 AM
Screenshot 2025-03-13 at 11 34 42 AM
Screenshot 2025-03-13 at 11 35 40 AM

Development and user testing has been performed on a public (Happy Hare) discord channel on: https://discord.gg/98TYYUf6f2

Are there any post-deployment tasks we need to perform?

  • The functionality will only be seen if popular Happy Hare klipper extension is installed and configured. This populates printer.mmu and printer.mmu_machine printer variables.
  • The latest moonraker is required for the start print mapping to function correct since new metadata has been added.

Signed-off-by

Signed-off-by: Paul Morgan [email protected]

@moggieuk
Copy link
Author

IMG_43415318456A-1
Example mobile screen

moggieuk and others added 2 commits March 13, 2025 12:25
Signed-off-by: Pedro Lamas <[email protected]>

# Conflicts:
#	src/components/widgets/spoolman/SpoolSelectionDialog.vue
@pedrolamas
Copy link
Member

Hey @moggieuk, thanks for doing this!! 😀

I haven't yet reviewed anything yet (just rebased and fixed some conflicts with the latest changes), but sure looks really cool!!! 😁

@pedrolamas pedrolamas added the FR - Enhancement New feature or request label Mar 13, 2025
@3DCoded
Copy link

3DCoded commented Mar 13, 2025

+1 for this.

The MMU panel is super helpful when monitoring prints, and the new map tool dialog is also great for more complex MMU prints.

@marcelsphone
Copy link

marcelsphone commented Mar 13, 2025

+1

Would love to see this merged. Awesome work!

@moggieuk
Copy link
Author

moggieuk commented Mar 14, 2025

Hey @moggieuk, thanks for doing this!! 😀

I haven't yet reviewed anything yet (just rebased and fixed some conflicts with the latest changes), but sure looks really cool!!! 😁

Ok. Let me update and resolve conflicts later today. Looks like some changes to spoolman causing some problems I need to debug.

@moggieuk moggieuk marked this pull request as ready for review March 14, 2025 14:58
@ningpj
Copy link

ningpj commented Mar 14, 2025

Looks awesome and really appreciate all the effort and time taken to develop native Happy Hare panels

moggieuk and others added 2 commits March 15, 2025 15:47
Signed-off-by: Pedro Lamas <[email protected]>

# Conflicts:
#	src/components/widgets/filesystem/FileSystem.vue
#	src/components/widgets/spoolman/SpoolSelectionDialog.vue
#	src/components/widgets/status/PrinterStatusCard.vue
@pedrolamas
Copy link
Member

@moggieuk I have just done a huge commit to allow the Vuex state store to be typed... while merging the changes to your branch, I cleared all the collisions, but I found a couple of problems I don't know how to fix:

src/components/widgets/mmu/MmuRecoverStateDialog.vue:281:29 - error TS2339: Property 'mmu' does not exist on type 'RootState'.

281     return this.$typedState.mmu.show_recover_state_dialog
                                ~~~

src/components/widgets/mmu/MmuRecoverStateDialog.vue:285:23 - error TS2769: No overload matches this call.
  The last overload gave the following error.
    Argument of type '"mmu/setDialogState"' is not assignable to parameter of type '"analysis/setAnalysisStatus"'.

285     this.$typedCommit('mmu/setDialogState', {
                          ~~~~~~~~~~~~~~~~~~~~

Ignore the mention to "analysis/setAnalysisStatus", that just means that "mmu/setDialogState" doesn not exist!

These 2 errors point to a non-existing mmu module in Vuex, so I guess they are incorrect... can you check on these please?

Signed-off-by: Pedro Lamas <[email protected]>

# Conflicts:
#	src/components/widgets/spoolman/SpoolSelectionDialog.vue
Signed-off-by: Pedro Lamas <[email protected]>

# Conflicts:
#	src/store/config/state.ts
#	src/store/config/types.ts
@Saberjag
Copy link

After getting the MMU panel to show up, I noticed that my Macro panel is now empty. I can still see my macro categories in settings, but no macro buttons.
mmu PANEL2
mmu PANEL

@3DCoded
Copy link

3DCoded commented Mar 21, 2025

@Saberjag ,

That's a bug with DynamicMacros, with a workaround described here in the "Fluidd and KS" dropdnwn.

@pedrolamas
Copy link
Member

@Saberjag ,

That's a bug with DynamicMacros, with a workaround described here in the "Fluidd and KS" dropdnwn.

FWIW, I've just fixed the problem on the develop branch and merged the changes here, so the workaround is no longer required!

@3DCoded
Copy link

3DCoded commented Mar 21, 2025

@Saberjag ,
That's a bug with DynamicMacros, with a workaround described here in the "Fluidd and KS" dropdnwn.

FWIW, I've just fixed the problem on the develop branch and merged the changes here, so the workaround is no longer required!

Thank you!

@pedrolamas
Copy link
Member

@moggieuk I have made a few refactorings around the dialog handling, I think everything is working ok, but can I ask that you take current code for a spin and ensure I haven't broken anything?

FWIW, I don't think there is much more I will be changing, and this is starting to look to me in a good to merge state!

@moggieuk
Copy link
Author

@moggieuk I have made a few refactorings around the dialog handling, I think everything is working ok, but can I ask that you take current code for a spin and ensure I haven't broken anything?

FWIW, I don't think there is much more I will be changing, and this is starting to look to me in a good to merge state!

Sorry, was distracted for a couple of days. I see one problem with the spoolman spool selection...
On the "MmuEditGateMapDialog" dialog if in spoolman mode you can pop up the spoolman spools dialog. Selecting a spool in that previous would pass the spool back to my dialog. This doesn't seem to be happening now.

Everything else looks fine.

@moggieuk
Copy link
Author

moggieuk commented Mar 27, 2025

oh, I also noticed the spoolman spool icon color is now absent. I will try to look to see what might have changed..

Looked like your latest merge fixed the first problem. So just the spoolman icon color not being set in MmuEditGateMapDialog

@pedrolamas
Copy link
Member

Looked like your latest merge fixed the first problem. So just the spoolman icon color not being set in MmuEditGateMapDialog

That shouldn't make any difference, but I did just notice an incorrect boolean check on the spool id, it would fail if it was 0 - fixed it just now!

Signed-off-by: Pedro Lamas <[email protected]>
@pedrolamas
Copy link
Member

oh, I also noticed the spoolman spool icon color is now absent. I will try to look to see what might have changed..

Should be fixed now!

@moggieuk
Copy link
Author

moggieuk commented Mar 27, 2025

Thank you. You beat me to the push ;-)

And thanks again for all your help!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
FR - Enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants