πŸ‡ΊπŸ‡¦ We stand with Ukraine! πŸ‡ΊπŸ‡¦

Can a gcode script respond to user dialog choice?

Hi

I'd like my Before print job is resumed G-code script in OctoPrint to loop, priming/extruding more filament until the user is happy and clicks "Continue".

The only way I can see to have a G-code script in OctoPrint prompt a user is by use of M118 //action:prompt_.... However, this is not the intention of the action:prompt mechanism and indeed there doesn't seem to be any way for the G-code script itself to react to the choice the user made.

Perhaps there is some other way to elicit user's choice within a G-code script?

For clarity if needed, I want to create a user interactive loop along the lines of the following pseudocode ...

while user_choice != "Continue" {
    extrude_mm(5) ; Ooze Prime is king of Oozeland!
    user_choice =  prompt_user({
        prompt: "Nozzle Ready?",
        button: "No. Prime some more.", 
        button: "Continue"
    })
}

Thanks for any assistance. Cheers.

1 Like

There is some command support for intraction in marlin (quick search):

Break and Continue | Marlin Firmware (marlinfw.org)

But why not use M600?
Filament Change | Marlin Firmware (marlinfw.org)

:upside_down_face:

Because it requires firmware rebuilds and re-flashing for every little change ... and ... well never mind. Thanks for your time.