grblHAL / core

grblHAL core code and master Wiki
Other
305 stars 74 forks source link

Debug statements inside macros prints immediately when read #413

Open karoria opened 6 months ago

karoria commented 6 months ago

Hi @terjeio I noticed that (debug,____) statements inside any macro file prints immediately when they are read by planner and not when they are actually executed. I mean they are out of sync and hence doesn't solve the purpose of debugging. Am I missing something or there is work in progress in this matter? Regards, Ravi

terjeio commented 6 months ago

For now add a short G4 delay before the debug message. I'll consider adding it to the data sent downstream to the planner/step execution later but it might be a bit complicated since, for motion commands, there can be many line segments that has to complete before the message can be output.

karoria commented 6 months ago

Ok. Does a G4 delay make the debug statements synchronous with previuos and next commands? In which cases adding G4 delay might help?

terjeio commented 6 months ago

Yes, try G4P0.1 for a 100 ms delay.