Merge pull request #8790 from robpower/NanoDLP_Sync_improvement

[1.1.x] Extended NanoDLP_Z_Move_Sync to G4 & G28,Added option for all axis.
master
Scott Lahteine 7 years ago committed by GitHub
commit 4277fcb32c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1559,5 +1559,9 @@
* [[WaitForDoneMessage]] instead of populating your gcode with M400 commands * [[WaitForDoneMessage]] instead of populating your gcode with M400 commands
*/ */
//#define NANODLP_Z_SYNC //#define NANODLP_Z_SYNC
#if ENABLED(NANODLP_Z_SYNC)
//#define NANODLP_ALL_AXIS // Enables "Z_move_comp" output on any axis move.
// Default behaviour is limited to Z axis only.
#endif
#endif // CONFIGURATION_ADV_H #endif // CONFIGURATION_ADV_H

@ -3364,8 +3364,12 @@ inline void gcode_G0_G1(
#endif #endif
#if ENABLED(NANODLP_Z_SYNC) #if ENABLED(NANODLP_Z_SYNC)
// If G0/G1 command include Z-axis, wait for move and output sync text. #if ENABLED(NANODLP_ALL_AXIS)
if (parser.seenval('Z')) { #define _MOVE_SYNC true // For any move wait and output sync message
#else
#define _MOVE_SYNC parser.seenval('Z') // Only for Z move
#endif
if (_MOVE_SYNC) {
stepper.synchronize(); stepper.synchronize();
SERIAL_ECHOLNPGM(MSG_Z_MOVE_COMP); SERIAL_ECHOLNPGM(MSG_Z_MOVE_COMP);
} }
@ -3484,6 +3488,9 @@ inline void gcode_G4() {
if (parser.seenval('S')) dwell_ms = parser.value_millis_from_seconds(); // seconds to wait if (parser.seenval('S')) dwell_ms = parser.value_millis_from_seconds(); // seconds to wait
stepper.synchronize(); stepper.synchronize();
#if ENABLED(NANODLP_Z_SYNC)
SERIAL_ECHOLNPGM(MSG_Z_MOVE_COMP);
#endif
if (!lcd_hasstatus()) LCD_MESSAGEPGM(MSG_DWELL); if (!lcd_hasstatus()) LCD_MESSAGEPGM(MSG_DWELL);
@ -4155,6 +4162,16 @@ inline void gcode_G28(const bool always_home_all) {
report_current_position(); report_current_position();
#if ENABLED(NANODLP_Z_SYNC)
#if ENABLED(NANODLP_ALL_AXIS)
#define _HOME_SYNC true // For any axis, output sync text.
#else
#define _HOME_SYNC (home_all || homeZ) // Only for Z-axis
#endif
if (_HOME_SYNC)
SERIAL_ECHOLNPGM(MSG_Z_MOVE_COMP);
#endif
#if ENABLED(DEBUG_LEVELING_FEATURE) #if ENABLED(DEBUG_LEVELING_FEATURE)
if (DEBUGGING(LEVELING)) SERIAL_ECHOLNPGM("<<< gcode_G28"); if (DEBUGGING(LEVELING)) SERIAL_ECHOLNPGM("<<< gcode_G28");
#endif #endif

@ -1559,5 +1559,9 @@
* [[WaitForDoneMessage]] instead of populating your gcode with M400 commands * [[WaitForDoneMessage]] instead of populating your gcode with M400 commands
*/ */
//#define NANODLP_Z_SYNC //#define NANODLP_Z_SYNC
#if ENABLED(NANODLP_Z_SYNC)
//#define NANODLP_ALL_AXIS // Enables "Z_move_comp" output on any axis move.
// Default behaviour is limited to Z axis only.
#endif
#endif // CONFIGURATION_ADV_H #endif // CONFIGURATION_ADV_H

@ -1559,5 +1559,9 @@
* [[WaitForDoneMessage]] instead of populating your gcode with M400 commands * [[WaitForDoneMessage]] instead of populating your gcode with M400 commands
*/ */
//#define NANODLP_Z_SYNC //#define NANODLP_Z_SYNC
#if ENABLED(NANODLP_Z_SYNC)
//#define NANODLP_ALL_AXIS // Enables "Z_move_comp" output on any axis move.
// Default behaviour is limited to Z axis only.
#endif
#endif // CONFIGURATION_ADV_H #endif // CONFIGURATION_ADV_H

@ -1559,5 +1559,9 @@
* [[WaitForDoneMessage]] instead of populating your gcode with M400 commands * [[WaitForDoneMessage]] instead of populating your gcode with M400 commands
*/ */
//#define NANODLP_Z_SYNC //#define NANODLP_Z_SYNC
#if ENABLED(NANODLP_Z_SYNC)
//#define NANODLP_ALL_AXIS // Enables "Z_move_comp" output on any axis move.
// Default behaviour is limited to Z axis only.
#endif
#endif // CONFIGURATION_ADV_H #endif // CONFIGURATION_ADV_H

@ -1559,5 +1559,9 @@
* [[WaitForDoneMessage]] instead of populating your gcode with M400 commands * [[WaitForDoneMessage]] instead of populating your gcode with M400 commands
*/ */
//#define NANODLP_Z_SYNC //#define NANODLP_Z_SYNC
#if ENABLED(NANODLP_Z_SYNC)
//#define NANODLP_ALL_AXIS // Enables "Z_move_comp" output on any axis move.
// Default behaviour is limited to Z axis only.
#endif
#endif // CONFIGURATION_ADV_H #endif // CONFIGURATION_ADV_H

@ -1559,5 +1559,9 @@
* [[WaitForDoneMessage]] instead of populating your gcode with M400 commands * [[WaitForDoneMessage]] instead of populating your gcode with M400 commands
*/ */
//#define NANODLP_Z_SYNC //#define NANODLP_Z_SYNC
#if ENABLED(NANODLP_Z_SYNC)
//#define NANODLP_ALL_AXIS // Enables "Z_move_comp" output on any axis move.
// Default behaviour is limited to Z axis only.
#endif
#endif // CONFIGURATION_ADV_H #endif // CONFIGURATION_ADV_H

@ -1559,5 +1559,9 @@
* [[WaitForDoneMessage]] instead of populating your gcode with M400 commands * [[WaitForDoneMessage]] instead of populating your gcode with M400 commands
*/ */
//#define NANODLP_Z_SYNC //#define NANODLP_Z_SYNC
#if ENABLED(NANODLP_Z_SYNC)
//#define NANODLP_ALL_AXIS // Enables "Z_move_comp" output on any axis move.
// Default behaviour is limited to Z axis only.
#endif
#endif // CONFIGURATION_ADV_H #endif // CONFIGURATION_ADV_H

@ -1559,5 +1559,9 @@
* [[WaitForDoneMessage]] instead of populating your gcode with M400 commands * [[WaitForDoneMessage]] instead of populating your gcode with M400 commands
*/ */
//#define NANODLP_Z_SYNC //#define NANODLP_Z_SYNC
#if ENABLED(NANODLP_Z_SYNC)
//#define NANODLP_ALL_AXIS // Enables "Z_move_comp" output on any axis move.
// Default behaviour is limited to Z axis only.
#endif
#endif // CONFIGURATION_ADV_H #endif // CONFIGURATION_ADV_H

@ -1562,5 +1562,9 @@
* [[WaitForDoneMessage]] instead of populating your gcode with M400 commands * [[WaitForDoneMessage]] instead of populating your gcode with M400 commands
*/ */
//#define NANODLP_Z_SYNC //#define NANODLP_Z_SYNC
#if ENABLED(NANODLP_Z_SYNC)
//#define NANODLP_ALL_AXIS // Enables "Z_move_comp" output on any axis move.
// Default behaviour is limited to Z axis only.
#endif
#endif // CONFIGURATION_ADV_H #endif // CONFIGURATION_ADV_H

@ -1559,5 +1559,9 @@
* [[WaitForDoneMessage]] instead of populating your gcode with M400 commands * [[WaitForDoneMessage]] instead of populating your gcode with M400 commands
*/ */
//#define NANODLP_Z_SYNC //#define NANODLP_Z_SYNC
#if ENABLED(NANODLP_Z_SYNC)
//#define NANODLP_ALL_AXIS // Enables "Z_move_comp" output on any axis move.
// Default behaviour is limited to Z axis only.
#endif
#endif // CONFIGURATION_ADV_H #endif // CONFIGURATION_ADV_H

@ -1559,5 +1559,9 @@
* [[WaitForDoneMessage]] instead of populating your gcode with M400 commands * [[WaitForDoneMessage]] instead of populating your gcode with M400 commands
*/ */
//#define NANODLP_Z_SYNC //#define NANODLP_Z_SYNC
#if ENABLED(NANODLP_Z_SYNC)
//#define NANODLP_ALL_AXIS // Enables "Z_move_comp" output on any axis move.
// Default behaviour is limited to Z axis only.
#endif
#endif // CONFIGURATION_ADV_H #endif // CONFIGURATION_ADV_H

@ -1559,5 +1559,9 @@
* [[WaitForDoneMessage]] instead of populating your gcode with M400 commands * [[WaitForDoneMessage]] instead of populating your gcode with M400 commands
*/ */
//#define NANODLP_Z_SYNC //#define NANODLP_Z_SYNC
#if ENABLED(NANODLP_Z_SYNC)
//#define NANODLP_ALL_AXIS // Enables "Z_move_comp" output on any axis move.
// Default behaviour is limited to Z axis only.
#endif
#endif // CONFIGURATION_ADV_H #endif // CONFIGURATION_ADV_H

@ -1559,5 +1559,9 @@
* [[WaitForDoneMessage]] instead of populating your gcode with M400 commands * [[WaitForDoneMessage]] instead of populating your gcode with M400 commands
*/ */
//#define NANODLP_Z_SYNC //#define NANODLP_Z_SYNC
#if ENABLED(NANODLP_Z_SYNC)
//#define NANODLP_ALL_AXIS // Enables "Z_move_comp" output on any axis move.
// Default behaviour is limited to Z axis only.
#endif
#endif // CONFIGURATION_ADV_H #endif // CONFIGURATION_ADV_H

@ -1560,5 +1560,9 @@
* [[WaitForDoneMessage]] instead of populating your gcode with M400 commands * [[WaitForDoneMessage]] instead of populating your gcode with M400 commands
*/ */
//#define NANODLP_Z_SYNC //#define NANODLP_Z_SYNC
#if ENABLED(NANODLP_Z_SYNC)
//#define NANODLP_ALL_AXIS // Enables "Z_move_comp" output on any axis move.
// Default behaviour is limited to Z axis only.
#endif
#endif // CONFIGURATION_ADV_H #endif // CONFIGURATION_ADV_H

@ -1559,5 +1559,9 @@
* [[WaitForDoneMessage]] instead of populating your gcode with M400 commands * [[WaitForDoneMessage]] instead of populating your gcode with M400 commands
*/ */
//#define NANODLP_Z_SYNC //#define NANODLP_Z_SYNC
#if ENABLED(NANODLP_Z_SYNC)
//#define NANODLP_ALL_AXIS // Enables "Z_move_comp" output on any axis move.
// Default behaviour is limited to Z axis only.
#endif
#endif // CONFIGURATION_ADV_H #endif // CONFIGURATION_ADV_H

@ -1559,5 +1559,9 @@
* [[WaitForDoneMessage]] instead of populating your gcode with M400 commands * [[WaitForDoneMessage]] instead of populating your gcode with M400 commands
*/ */
//#define NANODLP_Z_SYNC //#define NANODLP_Z_SYNC
#if ENABLED(NANODLP_Z_SYNC)
//#define NANODLP_ALL_AXIS // Enables "Z_move_comp" output on any axis move.
// Default behaviour is limited to Z axis only.
#endif
#endif // CONFIGURATION_ADV_H #endif // CONFIGURATION_ADV_H

@ -1526,5 +1526,9 @@
* [[WaitForDoneMessage]] instead of populating your gcode with M400 commands * [[WaitForDoneMessage]] instead of populating your gcode with M400 commands
*/ */
//#define NANODLP_Z_SYNC //#define NANODLP_Z_SYNC
#if ENABLED(NANODLP_Z_SYNC)
//#define NANODLP_ALL_AXIS // Enables "Z_move_comp" output on any axis move.
// Default behaviour is limited to Z axis only.
#endif
#endif // CONFIGURATION_ADV_H #endif // CONFIGURATION_ADV_H

@ -1559,5 +1559,9 @@
* [[WaitForDoneMessage]] instead of populating your gcode with M400 commands * [[WaitForDoneMessage]] instead of populating your gcode with M400 commands
*/ */
//#define NANODLP_Z_SYNC //#define NANODLP_Z_SYNC
#if ENABLED(NANODLP_Z_SYNC)
//#define NANODLP_ALL_AXIS // Enables "Z_move_comp" output on any axis move.
// Default behaviour is limited to Z axis only.
#endif
#endif // CONFIGURATION_ADV_H #endif // CONFIGURATION_ADV_H

@ -1570,5 +1570,9 @@
* [[WaitForDoneMessage]] instead of populating your gcode with M400 commands * [[WaitForDoneMessage]] instead of populating your gcode with M400 commands
*/ */
//#define NANODLP_Z_SYNC //#define NANODLP_Z_SYNC
#if ENABLED(NANODLP_Z_SYNC)
//#define NANODLP_ALL_AXIS // Enables "Z_move_comp" output on any axis move.
// Default behaviour is limited to Z axis only.
#endif
#endif // CONFIGURATION_ADV_H #endif // CONFIGURATION_ADV_H

@ -1559,5 +1559,9 @@
* [[WaitForDoneMessage]] instead of populating your gcode with M400 commands * [[WaitForDoneMessage]] instead of populating your gcode with M400 commands
*/ */
//#define NANODLP_Z_SYNC //#define NANODLP_Z_SYNC
#if ENABLED(NANODLP_Z_SYNC)
//#define NANODLP_ALL_AXIS // Enables "Z_move_comp" output on any axis move.
// Default behaviour is limited to Z axis only.
#endif
#endif // CONFIGURATION_ADV_H #endif // CONFIGURATION_ADV_H

@ -1561,5 +1561,9 @@
* [[WaitForDoneMessage]] instead of populating your gcode with M400 commands * [[WaitForDoneMessage]] instead of populating your gcode with M400 commands
*/ */
//#define NANODLP_Z_SYNC //#define NANODLP_Z_SYNC
#if ENABLED(NANODLP_Z_SYNC)
//#define NANODLP_ALL_AXIS // Enables "Z_move_comp" output on any axis move.
// Default behaviour is limited to Z axis only.
#endif
#endif // CONFIGURATION_ADV_H #endif // CONFIGURATION_ADV_H

@ -1561,5 +1561,9 @@
* [[WaitForDoneMessage]] instead of populating your gcode with M400 commands * [[WaitForDoneMessage]] instead of populating your gcode with M400 commands
*/ */
//#define NANODLP_Z_SYNC //#define NANODLP_Z_SYNC
#if ENABLED(NANODLP_Z_SYNC)
//#define NANODLP_ALL_AXIS // Enables "Z_move_comp" output on any axis move.
// Default behaviour is limited to Z axis only.
#endif
#endif // CONFIGURATION_ADV_H #endif // CONFIGURATION_ADV_H

@ -1561,5 +1561,9 @@
* [[WaitForDoneMessage]] instead of populating your gcode with M400 commands * [[WaitForDoneMessage]] instead of populating your gcode with M400 commands
*/ */
//#define NANODLP_Z_SYNC //#define NANODLP_Z_SYNC
#if ENABLED(NANODLP_Z_SYNC)
//#define NANODLP_ALL_AXIS // Enables "Z_move_comp" output on any axis move.
// Default behaviour is limited to Z axis only.
#endif
#endif // CONFIGURATION_ADV_H #endif // CONFIGURATION_ADV_H

@ -1561,5 +1561,9 @@
* [[WaitForDoneMessage]] instead of populating your gcode with M400 commands * [[WaitForDoneMessage]] instead of populating your gcode with M400 commands
*/ */
//#define NANODLP_Z_SYNC //#define NANODLP_Z_SYNC
#if ENABLED(NANODLP_Z_SYNC)
//#define NANODLP_ALL_AXIS // Enables "Z_move_comp" output on any axis move.
// Default behaviour is limited to Z axis only.
#endif
#endif // CONFIGURATION_ADV_H #endif // CONFIGURATION_ADV_H

@ -1561,5 +1561,9 @@
* [[WaitForDoneMessage]] instead of populating your gcode with M400 commands * [[WaitForDoneMessage]] instead of populating your gcode with M400 commands
*/ */
//#define NANODLP_Z_SYNC //#define NANODLP_Z_SYNC
#if ENABLED(NANODLP_Z_SYNC)
//#define NANODLP_ALL_AXIS // Enables "Z_move_comp" output on any axis move.
// Default behaviour is limited to Z axis only.
#endif
#endif // CONFIGURATION_ADV_H #endif // CONFIGURATION_ADV_H

@ -1566,5 +1566,9 @@
* [[WaitForDoneMessage]] instead of populating your gcode with M400 commands * [[WaitForDoneMessage]] instead of populating your gcode with M400 commands
*/ */
//#define NANODLP_Z_SYNC //#define NANODLP_Z_SYNC
#if ENABLED(NANODLP_Z_SYNC)
//#define NANODLP_ALL_AXIS // Enables "Z_move_comp" output on any axis move.
// Default behaviour is limited to Z axis only.
#endif
#endif // CONFIGURATION_ADV_H #endif // CONFIGURATION_ADV_H

@ -1561,5 +1561,9 @@
* [[WaitForDoneMessage]] instead of populating your gcode with M400 commands * [[WaitForDoneMessage]] instead of populating your gcode with M400 commands
*/ */
//#define NANODLP_Z_SYNC //#define NANODLP_Z_SYNC
#if ENABLED(NANODLP_Z_SYNC)
//#define NANODLP_ALL_AXIS // Enables "Z_move_comp" output on any axis move.
// Default behaviour is limited to Z axis only.
#endif
#endif // CONFIGURATION_ADV_H #endif // CONFIGURATION_ADV_H

@ -1560,5 +1560,9 @@
* [[WaitForDoneMessage]] instead of populating your gcode with M400 commands * [[WaitForDoneMessage]] instead of populating your gcode with M400 commands
*/ */
//#define NANODLP_Z_SYNC //#define NANODLP_Z_SYNC
#if ENABLED(NANODLP_Z_SYNC)
//#define NANODLP_ALL_AXIS // Enables "Z_move_comp" output on any axis move.
// Default behaviour is limited to Z axis only.
#endif
#endif // CONFIGURATION_ADV_H #endif // CONFIGURATION_ADV_H

@ -1559,5 +1559,9 @@
* [[WaitForDoneMessage]] instead of populating your gcode with M400 commands * [[WaitForDoneMessage]] instead of populating your gcode with M400 commands
*/ */
//#define NANODLP_Z_SYNC //#define NANODLP_Z_SYNC
#if ENABLED(NANODLP_Z_SYNC)
//#define NANODLP_ALL_AXIS // Enables "Z_move_comp" output on any axis move.
// Default behaviour is limited to Z axis only.
#endif
#endif // CONFIGURATION_ADV_H #endif // CONFIGURATION_ADV_H

@ -1559,5 +1559,9 @@
* [[WaitForDoneMessage]] instead of populating your gcode with M400 commands * [[WaitForDoneMessage]] instead of populating your gcode with M400 commands
*/ */
//#define NANODLP_Z_SYNC //#define NANODLP_Z_SYNC
#if ENABLED(NANODLP_Z_SYNC)
//#define NANODLP_ALL_AXIS // Enables "Z_move_comp" output on any axis move.
// Default behaviour is limited to Z axis only.
#endif
#endif // CONFIGURATION_ADV_H #endif // CONFIGURATION_ADV_H

@ -1549,5 +1549,9 @@
* [[WaitForDoneMessage]] instead of populating your gcode with M400 commands * [[WaitForDoneMessage]] instead of populating your gcode with M400 commands
*/ */
//#define NANODLP_Z_SYNC //#define NANODLP_Z_SYNC
#if ENABLED(NANODLP_Z_SYNC)
//#define NANODLP_ALL_AXIS // Enables "Z_move_comp" output on any axis move.
// Default behaviour is limited to Z axis only.
#endif
#endif // CONFIGURATION_ADV_H #endif // CONFIGURATION_ADV_H

Loading…
Cancel
Save