|
|
@ -37,6 +37,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
extern float destination[XYZE];
|
|
|
|
extern float destination[XYZE];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#if ENABLED(G0_FEEDRATE)
|
|
|
|
|
|
|
|
float saved_g0_feedrate_mm_s = MMM_TO_MMS(DEFAULT_G0_FEEDRATE);
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
#if ENABLED(NO_MOTION_BEFORE_HOMING)
|
|
|
|
#if ENABLED(NO_MOTION_BEFORE_HOMING)
|
|
|
|
#define G0_G1_CONDITION !axis_unhomed_error(parser.seen('X'), parser.seen('Y'), parser.seen('Z'))
|
|
|
|
#define G0_G1_CONDITION !axis_unhomed_error(parser.seen('X'), parser.seen('Y'), parser.seen('Z'))
|
|
|
|
#else
|
|
|
|
#else
|
|
|
@ -47,11 +51,24 @@ extern float destination[XYZE];
|
|
|
|
* G0, G1: Coordinated movement of X Y Z E axes
|
|
|
|
* G0, G1: Coordinated movement of X Y Z E axes
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
void GcodeSuite::G0_G1(
|
|
|
|
void GcodeSuite::G0_G1(
|
|
|
|
#if IS_SCARA
|
|
|
|
#if IS_SCARA || ENABLED(G0_FEEDRATE)
|
|
|
|
bool fast_move/*=false*/
|
|
|
|
bool fast_move/*=false*/
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
) {
|
|
|
|
) {
|
|
|
|
|
|
|
|
#if ENABLED(G0_FEEDRATE)
|
|
|
|
|
|
|
|
float saved_g1_feedrate_mm_s;
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
if (IsRunning() && G0_G1_CONDITION) {
|
|
|
|
if (IsRunning() && G0_G1_CONDITION) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#if ENABLED(G0_FEEDRATE)
|
|
|
|
|
|
|
|
if (fast_move) {
|
|
|
|
|
|
|
|
// Save standard feedrate before setting feedrate to fast/g0
|
|
|
|
|
|
|
|
saved_g1_feedrate_mm_s = feedrate_mm_s;
|
|
|
|
|
|
|
|
feedrate_mm_s = saved_g0_feedrate_mm_s;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
get_destination_from_command(); // For X Y Z E F
|
|
|
|
get_destination_from_command(); // For X Y Z E F
|
|
|
|
|
|
|
|
|
|
|
|
#if ENABLED(FWRETRACT) && ENABLED(FWRETRACT_AUTORETRACT)
|
|
|
|
#if ENABLED(FWRETRACT) && ENABLED(FWRETRACT_AUTORETRACT)
|
|
|
@ -77,6 +94,14 @@ void GcodeSuite::G0_G1(
|
|
|
|
prepare_move_to_destination();
|
|
|
|
prepare_move_to_destination();
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#if ENABLED(G0_FEEDRATE)
|
|
|
|
|
|
|
|
// save G0 feedrate, and restore standard feedrate as soon as possible
|
|
|
|
|
|
|
|
if (fast_move) {
|
|
|
|
|
|
|
|
saved_g0_feedrate_mm_s = feedrate_mm_s;
|
|
|
|
|
|
|
|
feedrate_mm_s = saved_g1_feedrate_mm_s;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
#if ENABLED(NANODLP_Z_SYNC)
|
|
|
|
#if ENABLED(NANODLP_Z_SYNC)
|
|
|
|
#if ENABLED(NANODLP_ALL_AXIS)
|
|
|
|
#if ENABLED(NANODLP_ALL_AXIS)
|
|
|
|
#define _MOVE_SYNC parser.seenval('X') || parser.seenval('Y') || parser.seenval('Z') // For any move wait and output sync message
|
|
|
|
#define _MOVE_SYNC parser.seenval('X') || parser.seenval('Y') || parser.seenval('Z') // For any move wait and output sync message
|
|
|
|