M291 oddities on both DWC and PanelDue v3.5.0b1
-
I've noticed a few oddities with some of my macros that use M291 after updating to v3.5.0b1
- M291 no longer replaces a currently displaying message box
I have some macros that continually update using M291 to display heating and filament feeding progress where these steps take a long time.
I now have to explicitly close them at each iteration of the loop using M292 (this is possibly intended, but changed behaviour) - Concatenating string and integer values for the P and R strings is not working as expected. If I use
P"Iteration=",iterations
then the messagebox doesn't display. If I useP{"Iteration=",iterations}
then the curly braces are displayed in the message box like {Iteration=1}
If I concatenate into a variable first then it can be used in M291 - M291 does not display message box on panelDue if it is inside a nested loop.
The macro below displays on DWC, but the part in the nested loop does not display on panelDue
while true if iterations = 5 abort "maximum reached" var text = "Loop" ^ iterations M291 R{var.text} P"Press OK to begin" S3 while true if iterations = 10 break var thisText = "Iteration = " ^ {iterations + 1} M291 R"Counting" P{var.thisText} S0 G4 P500 M292 P0
EDIT:
Forgot to give details.Duet 2 standalone
Duet Web Control 3.5.0-b1
Board: Duet 2 WiFi (2WiFi)
Firmware: RepRapFirmware for Duet 2 WiFi/Ethernet 3.5beta1 (2022-12-23)
Duet WiFi Server Version: 2.1beta2 - M291 no longer replaces a currently displaying message box
-
@OwenD
I've had issues with M291 messages on PD since 3.4.5 tbh. If its more than one in a macro for instance only the first one gets displayed. And when when macro is done the rest gets flodded over the course of a second. Instead of being displayed in the correct order and time, like they do in DWC. -
@OwenD said in M291 oddities on both DWC and PanelDue v3.5.0b1:
Concatenating string and integer values for the P and R strings is not working as expected. If I use P"Iteration=",iterations then the messagebox doesn't display.
You should use:
P{"Iteration="^iterations}
Have you tried that?
"Concatenation" using comma only works in the echo command, and that is because the echo command accepts zero or more comma-separated values, rather than just a single value.
-
@dc42 said in M291 oddities on both DWC and PanelDue v3.5.0b1:
You should use: P{"Iteration="^iterations}
Have you tried that?
"Concatenation" using command only works in the echo command, and that is because the echo command accepts zero or more command-separated values, rather than just a single value.Thanks for clarifying the use of commas vs caret when concatenating.
That part of the listed issues can be considered "operator error " -
@OwenD I'm glad you sussed the unwanted comma->command autocorrect.
-
@OwenD @Exerqtor I have modified the message box handling in 3.5beta2. Please try that version when we release it. In summary:
Whenever a M291 call is made:
- the new message box is added to the end of a queue. The queue length is currently 8 messages.
- any non-blocking messages already in the queue have their timeout reduced to 1 second. This gives the user a chance to see them, without holding up the new message unduly.
- if the queue is already full, the first non blocking message in the queue is removed immediately instead of after 1 second.
- if the queue is already full and there are no non-blocking messages in the queue, the first blocking message is cancelled.
I hope this proves satisfactory.
-
@dc42 said in M291 oddities on both DWC and PanelDue v3.5.0b1:
@OwenD @Exerqtor I have modified the message box handling in 3.5beta2. Please try that version when we release it. In summary:
Whenever a M291 call is made:
- the new message box is added to the end of a queue. The queue length is currently 8 messages.
--SNIP--
- if the queue is already full and there are no non-blocking messages in the queue, the first blocking message is cancelled.
So the queue length of 8 applies to message boxes only, or queued commands?
Trying to understand how there might be 8 blocking messages already in a queue before one of them blocks further messages being addedI hope this proves satisfactory.
Sounds great.
Thanks. -
@OwenD said in M291 oddities on both DWC and PanelDue v3.5.0b1:
Trying to understand how there might be 8 blocking messages already in a queue before one of them blocks further messages being added
8 blocking messages would be unlikely which is probably why dc42 chose that queue length. AFAIK there can only be 1 blocking message per input so you would need to have a blocking message on PanelDue, DWC, UART2, Telnet, and both file queues to get to 6 blocking messages!
-