Add Timeout and default behavior to M291 S3 message boxes
-
I tried out the message boxes today for the first time. On my printer, I use a long gantry leveling procedure that only needs to run for the first print of the day (as motors don't get deactivated in my config).
I used the M291 S3 message box to ask the user whether they want to execute the gantry leveling or not. If the user presses ok, the leveling is executed, if he presses cancel, the print is resumed without the leveling.
I would like to add a timeout and a default action to this message box. I.e. if the user does not press ok or cancel after 10 seconds, the firmware will act as if the user pressed "ok" and execute the gantry leveling. This will avoid times where I forget about the message box which would leave the printer idle for long periods of time.
Would this be possible to add?
Thanks in advance!
FH
-
Perhaps an S4 mode which was blocking like S3, but allowed a time out set with T. I think there should be at least one mode type that is completely blocking.
-
This will need some more thought, because the message box may be displayed on multiple devices. So the timeout would have to be implemented on the Duet, then notification sent to all display devices that the message box has timed out. Currently the timeout is handled on the display devices, because they don't need to perform any action on timeout other than to clear the message. Also there is the possibility that the Duet might time out but before a device has been notified, the user presses OK or Cancel.
-
@Phaedrux my idea was to keep the orignal functionality of S3 if no timeout is specified, and allow to the dialogue to time out on its own if a non-zero timeout is passed via the gcode. That way we could avoid having an extra type.
@dc42 I was not aware of these complications. If this is too tricky to implement you can safely ignore this request of course.