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

Feature Request: T0(x) Macro retrieve filament colours #248

Open
mochoandre opened this issue Mar 26, 2024 · 8 comments
Open

Feature Request: T0(x) Macro retrieve filament colours #248

mochoandre opened this issue Mar 26, 2024 · 8 comments
Labels
believe fixed The bug is believed fixed in latest release enhancement New feature or request

Comments

@mochoandre
Copy link

mochoandre commented Mar 26, 2024

Hello,
Is it possible for tools macros in mmu_macro_vars.cfg retrieve filament colours so mainsail/fluid can automatically retrieve those colors?
I am doing like

[gcode_macro T0]
gcode: MMU_CHANGE_TOOL TOOL=0
variable_color: "000000"
[gcode_macro T1]
gcode: MMU_CHANGE_TOOL TOOL=1
variable_color: "ffffff"
[gcode_macro T2]
gcode: MMU_CHANGE_TOOL TOOL=2
variable_color: "f20303"
[gcode_macro T3]
gcode: MMU_CHANGE_TOOL TOOL=3
variable_color: "2d8f02"
...

but during update Happy Hare rewrites file.
Any other way to make mainsail and fluid present the colors?

@moggieuk
Copy link
Owner

moggieuk commented Apr 5, 2024

I had no idea that Mainsail/Fluidd tried to obtain filament color this way...!?!

Let me look at what these UI's do to see how to address this -- honestly it is a strange way to look for color because it assumes that "Txx" is a macro. What if it was a built in command? Also, it should be static in this way, it needs to be dynamic based on either the gate_map or slicer_tool_map. Anyway, let me have a look..

Edit: Well, that's cool! Ok. I will figure out a way to make it dynamic... Are there any other attributes that Mainsail/Fluidd read in this way?

@moggieuk moggieuk added the enhancement New feature or request label Apr 5, 2024
@moggieuk
Copy link
Owner

moggieuk commented Apr 5, 2024

I've been playing a bit with this:

--------- Slicer MMU Tool Summary ---------
3 color print
T7 (Gate 7, ABS, ff5500, 245°C)
T0 (Gate 0, ABS, ff0000, 240°C)
T1 (Gate 1, ABS, 00ff00, 240°C)
Initial Tool: T0
-------------------------------------------
c

But one problem is that you have to refresh Mainsail (at least) because it doesn't monitor these variables.
I also need to add a way to set slicer color for each tool without making the tool part of the print.

@mochoandre
Copy link
Author

Let me look at what these UI's do to see how to address this -- honestly it is a strange way to look for color because it assumes that "Txx" is a macro. What if it was a built in command? Also, it should be static in this way, it needs to be dynamic based on either the gate_map or slicer_tool_map. Anyway, let me have a look..

I Wish I could help you because you have done a really magnificent work With Happy Hare and Klipercreen but I just found out this searching trough google. I Have no coding Skills unfortunatly.

Thank you very much for all, You Rock!

@moggieuk
Copy link
Owner

moggieuk commented Apr 7, 2024

Ok. It's implemented. Just posted in the forums. Copied here:
Still v2.5.1 but in fixing a couple bugs reported under Issues I added a new "feature" to automatically set the tool colors in Mainsail / Fluidd. Now all slicer tool info is stored in HH although only those used in print with be reported with MMU_SLICER_TOOL_MAP unless you specify the DETAIL=1 option:

> MMU_SLICER_TOOL_MAP DETAIL=1
--------- Slicer MMU Tool Summary ---------
2 color print
T0 (Gate 0, PLA, red, 200°C)
T1 (Gate 1, ABS+, green, 201°C)
T2 (Gate 2, ABS, grey, 202°C) Not used
T3 (Gate 3, ASA, blue, 203°C) Not used
T4 (Gate 4, ABS, orange, 240°C) Not used
T5 (Gate 5, ABS, lt_green, 240°C) Not used
T6 (Gate 6, ABS, black, 240°C) Not used
T7 (Gate 7, ABS, yellow, 240°C) Not used
T8 (Gate 8, PETG, grey, 208°C) Not used
Initial Tool: T0
-------------------------------------------

Note that owing to the way Mainsail works it will not dynamically adjust the extruder colors... I going to see if I can twist an arm, but until then you can just refresh your browser and the colors will appear as soon as the print starts...

@moggieuk
Copy link
Owner

moggieuk commented Apr 7, 2024

mainsail_colors

@moggieuk moggieuk added the believe fixed The bug is believed fixed in latest release label Apr 7, 2024
@ningpj
Copy link
Contributor

ningpj commented Apr 7, 2024

nice....i had been manually overwriting these post updates. works fine with fluidd env and can see all gate colour references are hex now so happy days :-)

@moggieuk
Copy link
Owner

moggieuk commented Apr 8, 2024

Does Fluidd dynamically update the colors when they change or do you need to refresh your browser?

@zhangxiaokang7788
Copy link

Good idea.If slicer program can surport for ttg ,i think it will be better.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
believe fixed The bug is believed fixed in latest release enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants