grblHAL / core

grblHAL core code and master Wiki
Other
320 stars 84 forks source link

Allow enqueuing gcode outside of normal input stream when in alarm state #181

Closed dresco closed 2 years ago

dresco commented 2 years ago

Adds STATE_ALARM to the valid states for allowing gcode from outside of the normal input stream. I've been using this to allow my panel plugin to unlock the controller from an alarm state (typically after starting the controller with motor power disabled).

terjeio commented 2 years ago

You can execute system commands such as $X by calling system_execute_line() directly. I would prefer that you do that instead of modifying the enqueue function. If changing the enqueue function anyway it should return false for non-system commands (including jog commands) when in alarm state.

dresco commented 2 years ago

You can execute system commands such as $X by calling system_execute_line() directly.

Many thanks, I'll try that instead..