Closed dc42 closed 1 year ago
Simple test script to demonstrate the problem:
if true
M291 S2 P"Press OK"
echo "got ok"
Another example:
if true
M120
M121
echo "got ok"
In both cases the "got ok" message is not echoed, unless either it is not indented wrt the previous M291 or M121 command, or another echo command that is not indented is inserted before it.
Fixed in 3.5-dev branch.
Duet Forum Discussion Thread
https://forum.duet3d.com/topic/33363/writing-variables-to-a-file-problems-with-nested-echo-commands
Which Duet products are you using?
Firmware Version
3.5.0-beta.4
Duet Web Control Version
3.5.0-beta.4
Are you using a Single Board Computer (RaspberryPi) with your Duet?
What happened?
Additional indentation between a M291 command in an if-block and a following nested if-block appears to cause the nested if-block not to be executed. Un-indenting the if-block relative to the M291 command solved it. Inserting an un-indented echo command between the M291 command and the indented if-block also solved it.