Browse Source

Extended NanoDLP_Z_Move_Sync feature to G4 and G28, Added optional move_sync for all axis.

robpower 7 years ago
parent
commit
59265034ae
2 changed files with 23 additions and 2 deletions
  1. 4
    0
      Marlin/Configuration_adv.h
  2. 19
    2
      Marlin/Marlin_main.cpp

+ 4
- 0
Marlin/Configuration_adv.h View File

1559
  * [[WaitForDoneMessage]] instead of populating your gcode with M400 commands
1559
  * [[WaitForDoneMessage]] instead of populating your gcode with M400 commands
1560
  */
1560
  */
1561
 //#define NANODLP_Z_SYNC
1561
 //#define NANODLP_Z_SYNC
1562
+#if ENABLED(NANODLP_Z_SYNC)
1563
+  //#define NANODLP_ALL_AXIS  // Enables "Z_move_comp" output on any axis move.
1564
+                              // Default behaviour is limited to Z axis only.
1565
+#endif
1562
 
1566
 
1563
 #endif // CONFIGURATION_ADV_H
1567
 #endif // CONFIGURATION_ADV_H

+ 19
- 2
Marlin/Marlin_main.cpp View File

3364
     #endif
3364
     #endif
3365
 
3365
 
3366
     #if ENABLED(NANODLP_Z_SYNC)
3366
     #if ENABLED(NANODLP_Z_SYNC)
3367
-      // If G0/G1 command include Z-axis, wait for move and output sync text.
3368
-      if (parser.seenval('Z')) {
3367
+      #if ENABLED(NANODLP_ALL_AXIS)
3368
+        #define _MOVE_SYNC true                 // For any move wait and output sync message
3369
+      #else
3370
+        #define _MOVE_SYNC parser.seenval('Z')  // Only for Z move
3371
+      #endif
3372
+      if (_MOVE_SYNC) {
3369
         stepper.synchronize();
3373
         stepper.synchronize();
3370
         SERIAL_ECHOLNPGM(MSG_Z_MOVE_COMP);
3374
         SERIAL_ECHOLNPGM(MSG_Z_MOVE_COMP);
3371
       }
3375
       }
3484
   if (parser.seenval('S')) dwell_ms = parser.value_millis_from_seconds(); // seconds to wait
3488
   if (parser.seenval('S')) dwell_ms = parser.value_millis_from_seconds(); // seconds to wait
3485
 
3489
 
3486
   stepper.synchronize();
3490
   stepper.synchronize();
3491
+  #if ENABLED(NANODLP_Z_SYNC)
3492
+    SERIAL_ECHOLNPGM(MSG_Z_MOVE_COMP);
3493
+  #endif
3487
 
3494
 
3488
   if (!lcd_hasstatus()) LCD_MESSAGEPGM(MSG_DWELL);
3495
   if (!lcd_hasstatus()) LCD_MESSAGEPGM(MSG_DWELL);
3489
 
3496
 
4155
 
4162
 
4156
   report_current_position();
4163
   report_current_position();
4157
 
4164
 
4165
+  #if ENABLED(NANODLP_Z_SYNC)
4166
+    #if ENABLED(NANODLP_ALL_AXIS)
4167
+      #define _HOME_SYNC true                 // For any axis, output sync text.
4168
+    #else
4169
+      #define _HOME_SYNC (home_all || homeZ)  // Only for Z-axis
4170
+    #endif
4171
+    if (_HOME_SYNC)
4172
+      SERIAL_ECHOLNPGM(MSG_Z_MOVE_COMP);
4173
+  #endif
4174
+
4158
   #if ENABLED(DEBUG_LEVELING_FEATURE)
4175
   #if ENABLED(DEBUG_LEVELING_FEATURE)
4159
     if (DEBUGGING(LEVELING)) SERIAL_ECHOLNPGM("<<< gcode_G28");
4176
     if (DEBUGGING(LEVELING)) SERIAL_ECHOLNPGM("<<< gcode_G28");
4160
   #endif
4177
   #endif

Loading…
Cancel
Save