Open rkoe opened 6 years ago
I believe you've found a bug. You should get back: {r:{msg:"test message"}, f:[…]}
-Rob
On Apr 26, 2018, at 4:45 PM, Roland Koebler notifications@github.com wrote:
The Gcode-wiki-page (https://github.com/synthetos/g2/wiki/Gcodes https://github.com/synthetos/g2/wiki/Gcodes) lists a "gcode message": (msg ...)
Gcode messages are comments that begin with the characters msg (case insensitive). These will be echoed to the operator.
How are they echoed to the operator? g2core does not send any message; so is this the task of the g-code-sender, and should the wiki-text be modified to:
Gcode messages are comments that begin with the characters msg (case insensitive). The g-code-sender should echo them to the operator.
Example:
G0X0 (msg test message) G0X100 — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/synthetos/g2/issues/344, or mute the thread https://github.com/notifications/unsubscribe-auth/AAXj0VsX7Em7LsrjLReWddmz3aJhjb9fks5tsj_dgaJpZM4ToHGV.
But when should I get this back?
{r:{msg:...}}
looks wrong and would break line mode.{r:{msg:...}}
, but then it would break the g-code-sequence.@rkoe That's a valid question. I believe it should be in the {r:...} for the line itself, so it would be when queued, but not in line with motion.
You may be right that the message is returned on parsing - I have not checked. But think the more correct behaviour is to queue the message response to the motion, then send the message synchronized with the motion. This way it supports messages to the operator to do things like change tools, turn things on and off along with commands like M0 or M1.
If that's the case, the message would need to be returned "out of band", such as in a status report or exception report. Or a new OOB category simply called "message".
I don't think that the message is returned at all. There is a function cm_message() that adds a message to the response object, but that function is not called anywhere that I can find.
The Gcode-wiki-page (https://github.com/synthetos/g2/wiki/Gcodes) lists a "gcode message": (msg ...)
How are they echoed to the operator? g2core does not send any message; so is this the task of the g-code-sender, and should the wiki-text be modified to:
Example: