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

Ability to choose option at print startup #1337

Closed
oRudi07 opened this issue Jan 31, 2024 · 9 comments
Closed

Ability to choose option at print startup #1337

oRudi07 opened this issue Jan 31, 2024 · 9 comments
Labels
FR - Enhancement New feature or request

Comments

@oRudi07
Copy link

oRudi07 commented Jan 31, 2024

Is your feature request related to a problem? Please describe

Is there a way to program fluidd to query before starting a print? In Start_macro I have the options to run a completely new Bed_Mesh or load a specific profile or just create a Bed_mesh within the boundaries of the part to be printed. Currently I'm commenting out the options that are not wanted at startup. It would be nicer if a window would open when I started printing where I could select the option

Describe the solution you'd like

nothing

Describe alternatives you've considered

No response

Additional information

No response

@oRudi07 oRudi07 added the FR - Enhancement New feature or request label Jan 31, 2024
@pedrolamas
Copy link
Member

pedrolamas commented Jan 31, 2024

Hi @oRudi07 , macro prompt dialogs are supported in Fluidd, though this requires that you have the latest Fluidd and fluidd-config (or mainsail-config).

Please check #1262 for examples and details.

@oRudi07
Copy link
Author

oRudi07 commented Jan 31, 2024

Hi, thats what i am looking for.
But I need some help to get this in my config. I wrote these macros:

[gcode_macro SHOW_OPTION_BED_MESH]
gcode:
    RESPOND TYPE=command MSG="action:prompt_begin BedMesh"
    RESPOND TYPE=command MSG="action:prompt_text How to level?"
    RESPOND TYPE=command MSG="action:prompt_button_group_start"
    RESPOND TYPE=command MSG="action:prompt_button Load Default|LOAD_SAVED_BM|info"
    RESPOND TYPE=command MSG="action:prompt_button whole bed|BM_WHOLE_WHOLE|info"
    RESPOND TYPE=command MSG="action:prompt_button only part|BM_ONLY_PART|info"
    RESPOND TYPE=command MSG="action:prompt_button_group_end"
    RESPOND TYPE=command MSG="action:prompt_button_group_start"
    RESPOND TYPE=command MSG="action:prompt_button CANCEL|CANCEL_PRINT|warning"
    RESPOND TYPE=command MSG="action:prompt_button_group_end"
    RESPOND TYPE=command MSG="action:prompt_show"


[gcode_macro LOAD_SAVED_BM]
gcode:
    BED_MESH_CLEAR
    BED_MESH_PROFILE LOAD="default"
    

[gcode_macro BM_WHOLE_WHOLE]
gcode:
     BED_MESH_CLEAR
     BED_MESH_CALIBRATE
     BED_MESH_PROFILE SAVE=x1
    

[gcode_macro BM_ONLY_PART]
gcode:
    BED_MESH_CLEAR
    BED_MESH_CALIBRATE PRINT_MIN={params.PRINT_MIN} PRINT_MAX={params.PRINT_MAX} FORCE_NEW_MESH=True
    BED_MESH_PROFILE SAVE=x1

Then, in START_PRINT, I call SHOW_OPTION_BED_MESH. The window appears with configured buttons, but after ckicking one option nothing happens -and during the window appears, theSTART_PRINT macro continues to be processed

What else do I have to do?

@pedrolamas
Copy link
Member

I would say that you now need 2 changes:

  • on the PRINT_START macro, add a PAUSE as the last command (so after SHOW_OPTION_BED_MESH)
  • on each of the option macros, add a RESUME to continue the print.

Note: I have not tested this, but in theory, it should work...

@oRudi07
Copy link
Author

oRudi07 commented Jan 31, 2024

Thanks for the answer. One more question: how to get the window closed after clicking an option?

@pedrolamas
Copy link
Member

Use RESPOND TYPE=command MSG="action:prompt_end" to close the dialog.

@oRudi07
Copy link
Author

oRudi07 commented Jan 31, 2024

also found out in the meantime.
Thank you very much

@pedrolamas
Copy link
Member

Given the above, I think we got a good compromise for this feature by using the macro prompt dialogs!

As such, I am now closing this ticket.

@pedrolamas pedrolamas closed this as not planned Won't fix, can't repro, duplicate, stale Feb 1, 2024
@oRudi07
Copy link
Author

oRudi07 commented Feb 1, 2024

One more thing: If i want to pause a makro (pause the gcode from processing), i cannot use PAUSE because thie is the macro pause....

@pedrolamas
Copy link
Member

There is a limit to what is possible with the current Klipper provided support...

Anything more than the described above, I think we will need upstream support added directly in Klipper.

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

No branches or pull requests

2 participants