RRF3.5 Beta 1 : M291 new options
-
With RRF3.5 beta, it is possible to request values or choices from the user in a macro. This is great, but how do you get the value that the user has entered to use in the following lines of the macro. Is this possible?
For example : I ask the user to enter the temperature needed and I would like to setup the new temp by a M104 S
M291 P"Enter the temperature of the head" S5 L150 H480 F300
-
@Philippe71 The documentation here explains how it works:
https://docs.duet3d.com/en/User_manual/Reference/Gcodes#m291-display-message-and-optionally-wait-for-responseI updated it to point to the input constant:
https://docs.duet3d.com/en/User_manual/Reference/Gcode_meta_commands#named-constants
Which you can then use, for example in the line after the M291. I would add some logic to check that "result" was "0" and I think the following should work
M104 S{input}Although you should be using M568 rather them M104 now:
https://docs.duet3d.com/en/User_manual/Reference/Gcodes#m568-set-tool-settings -
@T3P3Tony
Will the list of choices be displayed as buttons, or radio buttons / check boxes?
If buttons, is there still an OK/Cancel button?
If not buttons, can you set a default choice or does it return null if no selection of cancelled?
I know I should wait for the release
But some of this may need to be documented -
Ha, I was about to ask the same, thanks for updating the documentation!