Browse Source

G0 direct move for SCARA

Scott Lahteine 9 years ago
parent
commit
59d39d7655
1 changed files with 15 additions and 3 deletions
  1. 15
    3
      Marlin/Marlin_main.cpp

+ 15
- 3
Marlin/Marlin_main.cpp View File

@@ -2509,7 +2509,11 @@ bool position_is_reachable(float target[XYZ]) {
2509 2509
 /**
2510 2510
  * G0, G1: Coordinated movement of X Y Z E axes
2511 2511
  */
2512
-inline void gcode_G0_G1() {
2512
+inline void gcode_G0_G1(
2513
+  #if IS_SCARA
2514
+    bool fast_move=false
2515
+  #endif
2516
+) {
2513 2517
   if (IsRunning()) {
2514 2518
     gcode_get_destination(); // For X Y Z E F
2515 2519
 
@@ -2528,7 +2532,11 @@ inline void gcode_G0_G1() {
2528 2532
 
2529 2533
     #endif //FWRETRACT
2530 2534
 
2531
-    prepare_move_to_destination();
2535
+    #if IS_SCARA
2536
+      fast_move ? prepare_uninterpolated_move_to_destination() : prepare_move_to_destination();
2537
+    #else
2538
+      prepare_move_to_destination();
2539
+    #endif
2532 2540
   }
2533 2541
 }
2534 2542
 
@@ -6974,7 +6982,11 @@ void process_next_command() {
6974 6982
       // G0, G1
6975 6983
       case 0:
6976 6984
       case 1:
6977
-        gcode_G0_G1();
6985
+        #if IS_SCARA
6986
+          gcode_G0_G1(codenum == 0);
6987
+        #else
6988
+          gcode_G0_G1();
6989
+        #endif
6978 6990
         break;
6979 6991
 
6980 6992
       // G2, G3

Loading…
Cancel
Save