From 59d39d7655069071800573cc90595b47ffa52670 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Thu, 15 Sep 2016 14:15:08 -0500 Subject: [PATCH] G0 direct move for SCARA --- Marlin/Marlin_main.cpp | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp index 14af7c218..d4faf9b0e 100644 --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -2509,7 +2509,11 @@ bool position_is_reachable(float target[XYZ]) { /** * G0, G1: Coordinated movement of X Y Z E axes */ -inline void gcode_G0_G1() { +inline void gcode_G0_G1( + #if IS_SCARA + bool fast_move=false + #endif +) { if (IsRunning()) { gcode_get_destination(); // For X Y Z E F @@ -2528,7 +2532,11 @@ inline void gcode_G0_G1() { #endif //FWRETRACT - prepare_move_to_destination(); + #if IS_SCARA + fast_move ? prepare_uninterpolated_move_to_destination() : prepare_move_to_destination(); + #else + prepare_move_to_destination(); + #endif } } @@ -6974,7 +6982,11 @@ void process_next_command() { // G0, G1 case 0: case 1: - gcode_G0_G1(); + #if IS_SCARA + gcode_G0_G1(codenum == 0); + #else + gcode_G0_G1(); + #endif break; // G2, G3