Browse Source

V2 Extended NanoDLP_Z_Move_Sync to G4 & G28,Added all axis option.

robpower 7 years ago
parent
commit
5595098063

+ 6
- 3
Marlin/Configuration_adv.h View File

1541
 #endif
1541
 #endif
1542
 
1542
 
1543
 /**
1543
 /**
1544
- * NanoDLP Synch support
1544
+ * NanoDLP Sync support
1545
  *
1545
  *
1546
  * Add support for Synchronized Z moves when using with NanoDLP. G0/G1 axis moves will output "Z_move_comp"
1546
  * Add support for Synchronized Z moves when using with NanoDLP. G0/G1 axis moves will output "Z_move_comp"
1547
  * string to enable synchronization with DLP projector exposure. This change will allow to use
1547
  * string to enable synchronization with DLP projector exposure. This change will allow to use
1548
  * [[WaitForDoneMessage]] instead of populating your gcode with M400 commands
1548
  * [[WaitForDoneMessage]] instead of populating your gcode with M400 commands
1549
- *
1550
  */
1549
  */
1551
- //#define NANODLP_Z_SYNC
1550
+//#define NANODLP_Z_SYNC
1551
+#if ENABLED(NANODLP_Z_SYNC)
1552
+  //#define NANODLP_ALL_AXIS  // Enables "Z_move_comp" output on any axis move.
1553
+                              // Default behaviour is limited to Z axis only.
1554
+#endif
1552
 
1555
 
1553
 #endif // CONFIGURATION_ADV_H
1556
 #endif // CONFIGURATION_ADV_H

+ 9
- 0
Marlin/src/gcode/calibrate/G28.cpp View File

325
   lcd_refresh();
325
   lcd_refresh();
326
 
326
 
327
   report_current_position();
327
   report_current_position();
328
+  #if ENABLED(NANODLP_Z_SYNC)
329
+    #if ENABLED(NANODLP_ALL_AXIS)
330
+      #define _HOME_SYNC true                 // For any axis, output sync text.
331
+    #else
332
+      #define _HOME_SYNC (home_all || homeZ)  // Only for Z-axis
333
+    #endif
334
+    if (_HOME_SYNC)
335
+      SERIAL_ECHOLNPGM(MSG_Z_MOVE_COMP);
336
+  #endif
328
 
337
 
329
   #if ENABLED(DEBUG_LEVELING_FEATURE)
338
   #if ENABLED(DEBUG_LEVELING_FEATURE)
330
     if (DEBUGGING(LEVELING)) SERIAL_ECHOLNPGM("<<< G28");
339
     if (DEBUGGING(LEVELING)) SERIAL_ECHOLNPGM("<<< G28");

+ 6
- 2
Marlin/src/gcode/motion/G0_G1.cpp View File

78
     #endif
78
     #endif
79
 
79
 
80
     #if ENABLED(NANODLP_Z_SYNC)
80
     #if ENABLED(NANODLP_Z_SYNC)
81
-      // If G0/G1 command include Z-axis, wait for move and output sync text.
82
-      if (parser.seenval('Z')) {
81
+      #if ENABLED(NANODLP_ALL_AXIS)
82
+        #define _MOVE_SYNC true                 // For any move wait and output sync message
83
+      #else
84
+        #define _MOVE_SYNC parser.seenval('Z')  // Only for Z move
85
+      #endif
86
+      if (_MOVE_SYNC) {
83
         stepper.synchronize();
87
         stepper.synchronize();
84
         SERIAL_ECHOLNPGM(MSG_Z_MOVE_COMP);
88
         SERIAL_ECHOLNPGM(MSG_Z_MOVE_COMP);
85
       }
89
       }

+ 3
- 0
Marlin/src/gcode/motion/G4.cpp View File

34
   if (parser.seenval('S')) dwell_ms = parser.value_millis_from_seconds(); // seconds to wait
34
   if (parser.seenval('S')) dwell_ms = parser.value_millis_from_seconds(); // seconds to wait
35
 
35
 
36
   stepper.synchronize();
36
   stepper.synchronize();
37
+  #if ENABLED(NANODLP_Z_SYNC)
38
+    SERIAL_ECHOLNPGM(MSG_Z_MOVE_COMP);
39
+  #endif
37
 
40
 
38
   if (!lcd_hasstatus()) LCD_MESSAGEPGM(MSG_DWELL);
41
   if (!lcd_hasstatus()) LCD_MESSAGEPGM(MSG_DWELL);
39
 
42
 

Loading…
Cancel
Save