Implement NO_MOTION_BEFORE_HOMING option

This commit is contained in:
Scott Lahteine
2017-10-01 21:34:58 -05:00
parent 965b0ab53e
commit 90af1fe5ee
8 changed files with 35 additions and 19 deletions

View File

@ -33,7 +33,7 @@
* G42: Move X & Y axes to mesh coordinates (I & J)
*/
void GcodeSuite::G42() {
if (IsRunning()) {
if (MOTION_CONDITIONS) {
const bool hasI = parser.seenval('I');
const int8_t ix = hasI ? parser.value_int() : 0;
const bool hasJ = parser.seenval('J');

View File

@ -41,7 +41,7 @@ void GcodeSuite::G0_G1(
bool fast_move/*=false*/
#endif
) {
if (IsRunning()) {
if (MOTION_CONDITIONS) {
get_destination_from_command(); // For X Y Z E F
#if ENABLED(FWRETRACT)

View File

@ -211,7 +211,7 @@ void plan_arc(
* G3 X20 Y12 R14 ; CCW circle with r=14 ending at X20 Y12
*/
void GcodeSuite::G2_G3(const bool clockwise) {
if (IsRunning()) {
if (MOTION_CONDITIONS) {
#if ENABLED(SF_ARC_FIX)
const bool relative_mode_backup = relative_mode;

View File

@ -50,7 +50,7 @@ void plan_cubic_move(const float offset[4]) {
* G5: Cubic B-spline
*/
void GcodeSuite::G5() {
if (IsRunning()) {
if (MOTION_CONDITIONS) {
#if ENABLED(CNC_WORKSPACE_PLANES)
if (workspace_plane != PLANE_XY) {