Merge pull request #8337 from robpower/NanoDLP_Z_Move_Sync

[1.1.x] Added optional NanoDLP Z movement synchronization
master
Scott Lahteine 7 years ago committed by GitHub
commit 664d386623
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1502,4 +1502,13 @@
// tweaks made to the configuration are affecting the printer in real-time. // tweaks made to the configuration are affecting the printer in real-time.
#endif #endif
/**
* NanoDLP Sync support
*
* Add support for Synchronized Z moves when using with NanoDLP. G0/G1 axis moves will output "Z_move_comp"
* string to enable synchronization with DLP projector exposure. This change will allow to use
* [[WaitForDoneMessage]] instead of populating your gcode with M400 commands
*/
//#define NANODLP_Z_SYNC
#endif // CONFIGURATION_ADV_H #endif // CONFIGURATION_ADV_H

@ -3430,6 +3430,14 @@ inline void gcode_G0_G1(
#else #else
prepare_move_to_destination(); prepare_move_to_destination();
#endif #endif
#if ENABLED(NANODLP_Z_SYNC)
// If G0/G1 command include Z-axis, wait for move and output sync text.
if (parser.seenval('Z')) {
stepper.synchronize();
SERIAL_ECHOLNPGM(MSG_Z_MOVE_COMP);
}
#endif
} }
} }

@ -1502,4 +1502,13 @@
// tweaks made to the configuration are affecting the printer in real-time. // tweaks made to the configuration are affecting the printer in real-time.
#endif #endif
/**
* NanoDLP Sync support
*
* Add support for Synchronized Z moves when using with NanoDLP. G0/G1 axis moves will output "Z_move_comp"
* string to enable synchronization with DLP projector exposure. This change will allow to use
* [[WaitForDoneMessage]] instead of populating your gcode with M400 commands
*/
//#define NANODLP_Z_SYNC
#endif // CONFIGURATION_ADV_H #endif // CONFIGURATION_ADV_H

@ -1502,4 +1502,13 @@
// tweaks made to the configuration are affecting the printer in real-time. // tweaks made to the configuration are affecting the printer in real-time.
#endif #endif
/**
* NanoDLP Sync support
*
* Add support for Synchronized Z moves when using with NanoDLP. G0/G1 axis moves will output "Z_move_comp"
* string to enable synchronization with DLP projector exposure. This change will allow to use
* [[WaitForDoneMessage]] instead of populating your gcode with M400 commands
*/
//#define NANODLP_Z_SYNC
#endif // CONFIGURATION_ADV_H #endif // CONFIGURATION_ADV_H

@ -1502,4 +1502,13 @@
// tweaks made to the configuration are affecting the printer in real-time. // tweaks made to the configuration are affecting the printer in real-time.
#endif #endif
/**
* NanoDLP Sync support
*
* Add support for Synchronized Z moves when using with NanoDLP. G0/G1 axis moves will output "Z_move_comp"
* string to enable synchronization with DLP projector exposure. This change will allow to use
* [[WaitForDoneMessage]] instead of populating your gcode with M400 commands
*/
//#define NANODLP_Z_SYNC
#endif // CONFIGURATION_ADV_H #endif // CONFIGURATION_ADV_H

@ -1502,4 +1502,13 @@
// tweaks made to the configuration are affecting the printer in real-time. // tweaks made to the configuration are affecting the printer in real-time.
#endif #endif
/**
* NanoDLP Sync support
*
* Add support for Synchronized Z moves when using with NanoDLP. G0/G1 axis moves will output "Z_move_comp"
* string to enable synchronization with DLP projector exposure. This change will allow to use
* [[WaitForDoneMessage]] instead of populating your gcode with M400 commands
*/
//#define NANODLP_Z_SYNC
#endif // CONFIGURATION_ADV_H #endif // CONFIGURATION_ADV_H

@ -1499,4 +1499,13 @@
// tweaks made to the configuration are affecting the printer in real-time. // tweaks made to the configuration are affecting the printer in real-time.
#endif #endif
/**
* NanoDLP Sync support
*
* Add support for Synchronized Z moves when using with NanoDLP. G0/G1 axis moves will output "Z_move_comp"
* string to enable synchronization with DLP projector exposure. This change will allow to use
* [[WaitForDoneMessage]] instead of populating your gcode with M400 commands
*/
//#define NANODLP_Z_SYNC
#endif // CONFIGURATION_ADV_H #endif // CONFIGURATION_ADV_H

@ -1502,4 +1502,13 @@
// tweaks made to the configuration are affecting the printer in real-time. // tweaks made to the configuration are affecting the printer in real-time.
#endif #endif
/**
* NanoDLP Sync support
*
* Add support for Synchronized Z moves when using with NanoDLP. G0/G1 axis moves will output "Z_move_comp"
* string to enable synchronization with DLP projector exposure. This change will allow to use
* [[WaitForDoneMessage]] instead of populating your gcode with M400 commands
*/
//#define NANODLP_Z_SYNC
#endif // CONFIGURATION_ADV_H #endif // CONFIGURATION_ADV_H

@ -1502,4 +1502,13 @@
// tweaks made to the configuration are affecting the printer in real-time. // tweaks made to the configuration are affecting the printer in real-time.
#endif #endif
/**
* NanoDLP Sync support
*
* Add support for Synchronized Z moves when using with NanoDLP. G0/G1 axis moves will output "Z_move_comp"
* string to enable synchronization with DLP projector exposure. This change will allow to use
* [[WaitForDoneMessage]] instead of populating your gcode with M400 commands
*/
//#define NANODLP_Z_SYNC
#endif // CONFIGURATION_ADV_H #endif // CONFIGURATION_ADV_H

@ -1505,4 +1505,13 @@
// tweaks made to the configuration are affecting the printer in real-time. // tweaks made to the configuration are affecting the printer in real-time.
#endif #endif
/**
* NanoDLP Sync support
*
* Add support for Synchronized Z moves when using with NanoDLP. G0/G1 axis moves will output "Z_move_comp"
* string to enable synchronization with DLP projector exposure. This change will allow to use
* [[WaitForDoneMessage]] instead of populating your gcode with M400 commands
*/
//#define NANODLP_Z_SYNC
#endif // CONFIGURATION_ADV_H #endif // CONFIGURATION_ADV_H

@ -1502,4 +1502,13 @@
// tweaks made to the configuration are affecting the printer in real-time. // tweaks made to the configuration are affecting the printer in real-time.
#endif #endif
/**
* NanoDLP Sync support
*
* Add support for Synchronized Z moves when using with NanoDLP. G0/G1 axis moves will output "Z_move_comp"
* string to enable synchronization with DLP projector exposure. This change will allow to use
* [[WaitForDoneMessage]] instead of populating your gcode with M400 commands
*/
//#define NANODLP_Z_SYNC
#endif // CONFIGURATION_ADV_H #endif // CONFIGURATION_ADV_H

@ -1502,4 +1502,13 @@
// tweaks made to the configuration are affecting the printer in real-time. // tweaks made to the configuration are affecting the printer in real-time.
#endif #endif
/**
* NanoDLP Sync support
*
* Add support for Synchronized Z moves when using with NanoDLP. G0/G1 axis moves will output "Z_move_comp"
* string to enable synchronization with DLP projector exposure. This change will allow to use
* [[WaitForDoneMessage]] instead of populating your gcode with M400 commands
*/
//#define NANODLP_Z_SYNC
#endif // CONFIGURATION_ADV_H #endif // CONFIGURATION_ADV_H

@ -1502,4 +1502,13 @@
// tweaks made to the configuration are affecting the printer in real-time. // tweaks made to the configuration are affecting the printer in real-time.
#endif #endif
/**
* NanoDLP Sync support
*
* Add support for Synchronized Z moves when using with NanoDLP. G0/G1 axis moves will output "Z_move_comp"
* string to enable synchronization with DLP projector exposure. This change will allow to use
* [[WaitForDoneMessage]] instead of populating your gcode with M400 commands
*/
//#define NANODLP_Z_SYNC
#endif // CONFIGURATION_ADV_H #endif // CONFIGURATION_ADV_H

@ -1499,4 +1499,13 @@
// tweaks made to the configuration are affecting the printer in real-time. // tweaks made to the configuration are affecting the printer in real-time.
#endif #endif
/**
* NanoDLP Sync support
*
* Add support for Synchronized Z moves when using with NanoDLP. G0/G1 axis moves will output "Z_move_comp"
* string to enable synchronization with DLP projector exposure. This change will allow to use
* [[WaitForDoneMessage]] instead of populating your gcode with M400 commands
*/
//#define NANODLP_Z_SYNC
#endif // CONFIGURATION_ADV_H #endif // CONFIGURATION_ADV_H

@ -1506,4 +1506,13 @@
// tweaks made to the configuration are affecting the printer in real-time. // tweaks made to the configuration are affecting the printer in real-time.
#endif #endif
/**
* NanoDLP Sync support
*
* Add support for Synchronized Z moves when using with NanoDLP. G0/G1 axis moves will output "Z_move_comp"
* string to enable synchronization with DLP projector exposure. This change will allow to use
* [[WaitForDoneMessage]] instead of populating your gcode with M400 commands
*/
//#define NANODLP_Z_SYNC
#endif // CONFIGURATION_ADV_H #endif // CONFIGURATION_ADV_H

@ -1502,4 +1502,13 @@
// tweaks made to the configuration are affecting the printer in real-time. // tweaks made to the configuration are affecting the printer in real-time.
#endif #endif
/**
* NanoDLP Sync support
*
* Add support for Synchronized Z moves when using with NanoDLP. G0/G1 axis moves will output "Z_move_comp"
* string to enable synchronization with DLP projector exposure. This change will allow to use
* [[WaitForDoneMessage]] instead of populating your gcode with M400 commands
*/
//#define NANODLP_Z_SYNC
#endif // CONFIGURATION_ADV_H #endif // CONFIGURATION_ADV_H

@ -1502,4 +1502,13 @@
// tweaks made to the configuration are affecting the printer in real-time. // tweaks made to the configuration are affecting the printer in real-time.
#endif #endif
/**
* NanoDLP Sync support
*
* Add support for Synchronized Z moves when using with NanoDLP. G0/G1 axis moves will output "Z_move_comp"
* string to enable synchronization with DLP projector exposure. This change will allow to use
* [[WaitForDoneMessage]] instead of populating your gcode with M400 commands
*/
//#define NANODLP_Z_SYNC
#endif // CONFIGURATION_ADV_H #endif // CONFIGURATION_ADV_H

@ -1469,4 +1469,13 @@
// tweaks made to the configuration are affecting the printer in real-time. // tweaks made to the configuration are affecting the printer in real-time.
#endif #endif
/**
* NanoDLP Sync support
*
* Add support for Synchronized Z moves when using with NanoDLP. G0/G1 axis moves will output "Z_move_comp"
* string to enable synchronization with DLP projector exposure. This change will allow to use
* [[WaitForDoneMessage]] instead of populating your gcode with M400 commands
*/
//#define NANODLP_Z_SYNC
#endif // CONFIGURATION_ADV_H #endif // CONFIGURATION_ADV_H

@ -1502,4 +1502,13 @@
// tweaks made to the configuration are affecting the printer in real-time. // tweaks made to the configuration are affecting the printer in real-time.
#endif #endif
/**
* NanoDLP Sync support
*
* Add support for Synchronized Z moves when using with NanoDLP. G0/G1 axis moves will output "Z_move_comp"
* string to enable synchronization with DLP projector exposure. This change will allow to use
* [[WaitForDoneMessage]] instead of populating your gcode with M400 commands
*/
//#define NANODLP_Z_SYNC
#endif // CONFIGURATION_ADV_H #endif // CONFIGURATION_ADV_H

@ -1510,4 +1510,13 @@
// tweaks made to the configuration are affecting the printer in real-time. // tweaks made to the configuration are affecting the printer in real-time.
#endif #endif
/**
* NanoDLP Sync support
*
* Add support for Synchronized Z moves when using with NanoDLP. G0/G1 axis moves will output "Z_move_comp"
* string to enable synchronization with DLP projector exposure. This change will allow to use
* [[WaitForDoneMessage]] instead of populating your gcode with M400 commands
*/
//#define NANODLP_Z_SYNC
#endif // CONFIGURATION_ADV_H #endif // CONFIGURATION_ADV_H

@ -1502,4 +1502,13 @@
// tweaks made to the configuration are affecting the printer in real-time. // tweaks made to the configuration are affecting the printer in real-time.
#endif #endif
/**
* NanoDLP Sync support
*
* Add support for Synchronized Z moves when using with NanoDLP. G0/G1 axis moves will output "Z_move_comp"
* string to enable synchronization with DLP projector exposure. This change will allow to use
* [[WaitForDoneMessage]] instead of populating your gcode with M400 commands
*/
//#define NANODLP_Z_SYNC
#endif // CONFIGURATION_ADV_H #endif // CONFIGURATION_ADV_H

@ -1504,4 +1504,13 @@
// tweaks made to the configuration are affecting the printer in real-time. // tweaks made to the configuration are affecting the printer in real-time.
#endif #endif
/**
* NanoDLP Sync support
*
* Add support for Synchronized Z moves when using with NanoDLP. G0/G1 axis moves will output "Z_move_comp"
* string to enable synchronization with DLP projector exposure. This change will allow to use
* [[WaitForDoneMessage]] instead of populating your gcode with M400 commands
*/
//#define NANODLP_Z_SYNC
#endif // CONFIGURATION_ADV_H #endif // CONFIGURATION_ADV_H

@ -1504,4 +1504,13 @@
// tweaks made to the configuration are affecting the printer in real-time. // tweaks made to the configuration are affecting the printer in real-time.
#endif #endif
/**
* NanoDLP Sync support
*
* Add support for Synchronized Z moves when using with NanoDLP. G0/G1 axis moves will output "Z_move_comp"
* string to enable synchronization with DLP projector exposure. This change will allow to use
* [[WaitForDoneMessage]] instead of populating your gcode with M400 commands
*/
//#define NANODLP_Z_SYNC
#endif // CONFIGURATION_ADV_H #endif // CONFIGURATION_ADV_H

@ -1504,4 +1504,13 @@
// tweaks made to the configuration are affecting the printer in real-time. // tweaks made to the configuration are affecting the printer in real-time.
#endif #endif
/**
* NanoDLP Sync support
*
* Add support for Synchronized Z moves when using with NanoDLP. G0/G1 axis moves will output "Z_move_comp"
* string to enable synchronization with DLP projector exposure. This change will allow to use
* [[WaitForDoneMessage]] instead of populating your gcode with M400 commands
*/
//#define NANODLP_Z_SYNC
#endif // CONFIGURATION_ADV_H #endif // CONFIGURATION_ADV_H

@ -1504,4 +1504,13 @@
// tweaks made to the configuration are affecting the printer in real-time. // tweaks made to the configuration are affecting the printer in real-time.
#endif #endif
/**
* NanoDLP Sync support
*
* Add support for Synchronized Z moves when using with NanoDLP. G0/G1 axis moves will output "Z_move_comp"
* string to enable synchronization with DLP projector exposure. This change will allow to use
* [[WaitForDoneMessage]] instead of populating your gcode with M400 commands
*/
//#define NANODLP_Z_SYNC
#endif // CONFIGURATION_ADV_H #endif // CONFIGURATION_ADV_H

@ -1509,4 +1509,13 @@
// tweaks made to the configuration are affecting the printer in real-time. // tweaks made to the configuration are affecting the printer in real-time.
#endif #endif
/**
* NanoDLP Sync support
*
* Add support for Synchronized Z moves when using with NanoDLP. G0/G1 axis moves will output "Z_move_comp"
* string to enable synchronization with DLP projector exposure. This change will allow to use
* [[WaitForDoneMessage]] instead of populating your gcode with M400 commands
*/
//#define NANODLP_Z_SYNC
#endif // CONFIGURATION_ADV_H #endif // CONFIGURATION_ADV_H

@ -1504,4 +1504,13 @@
// tweaks made to the configuration are affecting the printer in real-time. // tweaks made to the configuration are affecting the printer in real-time.
#endif #endif
/**
* NanoDLP Sync support
*
* Add support for Synchronized Z moves when using with NanoDLP. G0/G1 axis moves will output "Z_move_comp"
* string to enable synchronization with DLP projector exposure. This change will allow to use
* [[WaitForDoneMessage]] instead of populating your gcode with M400 commands
*/
//#define NANODLP_Z_SYNC
#endif // CONFIGURATION_ADV_H #endif // CONFIGURATION_ADV_H

@ -1503,4 +1503,13 @@
// tweaks made to the configuration are affecting the printer in real-time. // tweaks made to the configuration are affecting the printer in real-time.
#endif #endif
/**
* NanoDLP Sync support
*
* Add support for Synchronized Z moves when using with NanoDLP. G0/G1 axis moves will output "Z_move_comp"
* string to enable synchronization with DLP projector exposure. This change will allow to use
* [[WaitForDoneMessage]] instead of populating your gcode with M400 commands
*/
//#define NANODLP_Z_SYNC
#endif // CONFIGURATION_ADV_H #endif // CONFIGURATION_ADV_H

@ -1502,4 +1502,13 @@
// tweaks made to the configuration are affecting the printer in real-time. // tweaks made to the configuration are affecting the printer in real-time.
#endif #endif
/**
* NanoDLP Sync support
*
* Add support for Synchronized Z moves when using with NanoDLP. G0/G1 axis moves will output "Z_move_comp"
* string to enable synchronization with DLP projector exposure. This change will allow to use
* [[WaitForDoneMessage]] instead of populating your gcode with M400 commands
*/
//#define NANODLP_Z_SYNC
#endif // CONFIGURATION_ADV_H #endif // CONFIGURATION_ADV_H

@ -1502,4 +1502,13 @@
// tweaks made to the configuration are affecting the printer in real-time. // tweaks made to the configuration are affecting the printer in real-time.
#endif #endif
/**
* NanoDLP Sync support
*
* Add support for Synchronized Z moves when using with NanoDLP. G0/G1 axis moves will output "Z_move_comp"
* string to enable synchronization with DLP projector exposure. This change will allow to use
* [[WaitForDoneMessage]] instead of populating your gcode with M400 commands
*/
//#define NANODLP_Z_SYNC
#endif // CONFIGURATION_ADV_H #endif // CONFIGURATION_ADV_H

@ -1492,4 +1492,13 @@
// tweaks made to the configuration are affecting the printer in real-time. // tweaks made to the configuration are affecting the printer in real-time.
#endif #endif
/**
* NanoDLP Sync support
*
* Add support for Synchronized Z moves when using with NanoDLP. G0/G1 axis moves will output "Z_move_comp"
* string to enable synchronization with DLP projector exposure. This change will allow to use
* [[WaitForDoneMessage]] instead of populating your gcode with M400 commands
*/
//#define NANODLP_Z_SYNC
#endif // CONFIGURATION_ADV_H #endif // CONFIGURATION_ADV_H

@ -144,6 +144,7 @@
#define MSG_BUSY_PROCESSING "busy: processing" #define MSG_BUSY_PROCESSING "busy: processing"
#define MSG_BUSY_PAUSED_FOR_USER "busy: paused for user" #define MSG_BUSY_PAUSED_FOR_USER "busy: paused for user"
#define MSG_BUSY_PAUSED_FOR_INPUT "busy: paused for input" #define MSG_BUSY_PAUSED_FOR_INPUT "busy: paused for input"
#define MSG_Z_MOVE_COMP "Z_move_comp"
#define MSG_RESEND "Resend: " #define MSG_RESEND "Resend: "
#define MSG_UNKNOWN_COMMAND "Unknown command: \"" #define MSG_UNKNOWN_COMMAND "Unknown command: \""
#define MSG_ACTIVE_EXTRUDER "Active Extruder: " #define MSG_ACTIVE_EXTRUDER "Active Extruder: "

@ -429,6 +429,10 @@
#define NORM_E_DIR() { switch (current_block->active_extruder) { case 0: E0_DIR_WRITE(!INVERT_E0_DIR); break; case 1: E0_DIR_WRITE(INVERT_E0_DIR); break; case 2: E1_DIR_WRITE(!INVERT_E1_DIR); break; case 3: E1_DIR_WRITE(INVERT_E1_DIR); } } #define NORM_E_DIR() { switch (current_block->active_extruder) { case 0: E0_DIR_WRITE(!INVERT_E0_DIR); break; case 1: E0_DIR_WRITE(INVERT_E0_DIR); break; case 2: E1_DIR_WRITE(!INVERT_E1_DIR); break; case 3: E1_DIR_WRITE(INVERT_E1_DIR); } }
#define REV_E_DIR() { switch (current_block->active_extruder) { case 0: E0_DIR_WRITE(INVERT_E0_DIR); break; case 1: E0_DIR_WRITE(!INVERT_E0_DIR); break; case 2: E1_DIR_WRITE(INVERT_E1_DIR); break; case 3: E1_DIR_WRITE(!INVERT_E1_DIR); } } #define REV_E_DIR() { switch (current_block->active_extruder) { case 0: E0_DIR_WRITE(INVERT_E0_DIR); break; case 1: E0_DIR_WRITE(!INVERT_E0_DIR); break; case 2: E1_DIR_WRITE(INVERT_E1_DIR); break; case 3: E1_DIR_WRITE(!INVERT_E1_DIR); } }
#endif #endif
#elif ENABLED(MK2_MULTIPLEXER) // Even-numbered steppers are reversed
#define E_STEP_WRITE(v) E0_STEP_WRITE(v)
#define NORM_E_DIR() E0_DIR_WRITE(TEST(current_block->active_extruder, 0) ? !INVERT_E0_DIR: INVERT_E0_DIR)
#define REV_E_DIR() E0_DIR_WRITE(TEST(current_block->active_extruder, 0) ? INVERT_E0_DIR: !INVERT_E0_DIR)
#elif EXTRUDERS > 4 #elif EXTRUDERS > 4
#define E_STEP_WRITE(v) { switch (current_block->active_extruder) { case 0: E0_STEP_WRITE(v); break; case 1: E1_STEP_WRITE(v); break; case 2: E2_STEP_WRITE(v); break; case 3: E3_STEP_WRITE(v); break; case 4: E4_STEP_WRITE(v); } } #define E_STEP_WRITE(v) { switch (current_block->active_extruder) { case 0: E0_STEP_WRITE(v); break; case 1: E1_STEP_WRITE(v); break; case 2: E2_STEP_WRITE(v); break; case 3: E3_STEP_WRITE(v); break; case 4: E4_STEP_WRITE(v); } }
#define NORM_E_DIR() { switch (current_block->active_extruder) { case 0: E0_DIR_WRITE(!INVERT_E0_DIR); break; case 1: E1_DIR_WRITE(!INVERT_E1_DIR); break; case 2: E2_DIR_WRITE(!INVERT_E2_DIR); break; case 3: E3_DIR_WRITE(!INVERT_E3_DIR); break; case 4: E4_DIR_WRITE(!INVERT_E4_DIR); } } #define NORM_E_DIR() { switch (current_block->active_extruder) { case 0: E0_DIR_WRITE(!INVERT_E0_DIR); break; case 1: E1_DIR_WRITE(!INVERT_E1_DIR); break; case 2: E2_DIR_WRITE(!INVERT_E2_DIR); break; case 3: E3_DIR_WRITE(!INVERT_E3_DIR); break; case 4: E4_DIR_WRITE(!INVERT_E4_DIR); } }
@ -472,14 +476,8 @@
#endif #endif
#else #else
#define E_STEP_WRITE(v) E0_STEP_WRITE(v) #define E_STEP_WRITE(v) E0_STEP_WRITE(v)
#if ENABLED(MK2_MULTIPLEXER)
// Even-numbered steppers are reversed
#define NORM_E_DIR() E0_DIR_WRITE(TEST(current_block->active_extruder, 0) ? !INVERT_E0_DIR: INVERT_E0_DIR)
#define REV_E_DIR() E0_DIR_WRITE(TEST(current_block->active_extruder, 0) ? INVERT_E0_DIR: !INVERT_E0_DIR)
#else
#define NORM_E_DIR() E0_DIR_WRITE(!INVERT_E0_DIR) #define NORM_E_DIR() E0_DIR_WRITE(!INVERT_E0_DIR)
#define REV_E_DIR() E0_DIR_WRITE(INVERT_E0_DIR) #define REV_E_DIR() E0_DIR_WRITE(INVERT_E0_DIR)
#endif #endif
#endif
#endif // STEPPER_INDIRECTION_H #endif // STEPPER_INDIRECTION_H

Loading…
Cancel
Save