@chrishamm Sorry for the later reply on this, I forgot about it and got no notifications!
Here is a minimal setup that reproduces my issue. In this setup, I use a separate connection to intercept and to send commands. If I use a single intercept connection, the issue still happens, but less often.
Also, note that the message box shows up on the PanelDue in about 50% of the cases when sending M2000. But in the the other cases, the message box only pops up in the web interface. I didn't manage to see if it was correlated to something else, as it seemed pretty random to me.
#!/usr/bin/python3
from dsf.connections import InterceptConnection, InterceptionMode, CommandConnection
from dsf.object_model.messages import MessageType
if __name__ == "__main__":
try:
intercept = InterceptConnection(InterceptionMode.PRE, filters=['M2000'])
command = CommandConnection()
command.connect()
intercept.connect()
while True:
code = intercept.receive_code()
try:
if code.short_str() == 'M2000':
command.perform_simple_code('M291 S2 P"Test" X1 Y1 Z1')
print(command.perform_simple_code('M409 K"state" F"d99fn"'))
intercept.resolve_code(MessageType.Success)
except Exception as e:
intercept.resolve_code(MessageType.Error, str(e))
finally:
intercept.close()
command.close()
The output of M409 K"state" F"d99fn" is the following:
{"key":"state","flags":"d99fn","result":{"currentTool":2,"gpOut":[],"laserPwm":null,"msUpTime":646,"status":"idle","time":"2024-10-14T11:27:13","upTime":2238}}
I don't see any messageBox value inside it.