synthetos / g2

g2core - The Next Generation
Other
623 stars 295 forks source link

Job Kill g2 vs TinyG #404

Open MitchBradley opened 5 years ago

MitchBradley commented 5 years ago

Background: CNCjs supports both g2core and TinyG from one chunk of code. To stop a running job, it sends "!%" - feedhold and flush. On recent versions of g2core, that sequence has the problem that it leaves the spindle running. Bare ! pauses the spindle correctly, but then it comes back on when the stop sequence is issued. To fix this on g2core, it works to send "!^d" - feedhold and kill job. But the TinyG docs don't mention ^d, so I don't know if it is supported. What is the best way to support both g2core and TinyG in this situation? One possibility would be to recognize which one is running and issue a different sequence. Another might be to issue a combined sequence like "!^d%", in hopes that TinyG would ignore the ^d and still do the right thing.

cheton commented 5 years ago

May I know whether we should use different approaches for TinyG and g2core?

For example:

[TinyG] Commands can be sent together in a single transmission:

!%

[g2core] Send each command on a single line:

!
^d