Dual Markforged XY First Pass
This commit is contained in:
@@ -1966,10 +1966,15 @@ bool Planner::_populate_block(
|
||||
dm.x = (dist.a > 0); // Axis X direction
|
||||
dm.b = (dist.b + dist.c > 0); // Motor B direction
|
||||
dm.c = (CORESIGN(dist.b - dist.c) > 0); // Motor C direction
|
||||
#elif ENABLED(MARKFORGED_XY)
|
||||
dm.a = (dist.a TERN(MARKFORGED_INVERSE, -, +) dist.b > 0); // Motor A direction
|
||||
dm.b = (dist.b > 0); // Motor B direction
|
||||
TERN_(HAS_Z_AXIS, dm.z = (dist.c > 0)); // Axis Z direction
|
||||
#elif ENABLED(MARKFORGED_XY)
|
||||
if (extruder == 0) {
|
||||
dm.a = (dist.a + dist.b > 0); // Motor A direction
|
||||
dm.b = (dist.b > 0); // Motor B direction
|
||||
}
|
||||
else {
|
||||
dm.a = (dist.a - dist.b > 0); // Motor A direction
|
||||
dm.b = (dist.b> 0); // Motor B direction
|
||||
}
|
||||
#elif ENABLED(MARKFORGED_YX)
|
||||
dm.a = (dist.a > 0); // Motor A direction
|
||||
dm.b = (dist.b TERN(MARKFORGED_INVERSE, -, +) dist.a > 0); // Motor B direction
|
||||
|
||||
@@ -423,9 +423,22 @@ xyze_int8_t Stepper::count_direction{0};
|
||||
#endif
|
||||
|
||||
#if HAS_SYNCED_Y_STEPPERS
|
||||
#define Y_APPLY_DIR(FWD,Q) do{ Y_DIR_WRITE(FWD); Y2_DIR_WRITE(INVERT_DIR(Y2_VS_Y, FWD)); }while(0)
|
||||
#define Y_APPLY_DIR(FWD,Q) do{ Y_DIR_WRITE(FWD); Y2_DIR_WRITE(INVERT_DIR(Y2_VS_Y, FWD)); \
|
||||
if (!extruder_duplication_enabled) { \
|
||||
if (last_moved_extruder) \
|
||||
X_DIR_WRITE(FWD); \
|
||||
else X2_DIR_WRITE((FWD) ^ 1); \
|
||||
}; \
|
||||
}while(0)
|
||||
#if ENABLED(Y_DUAL_ENDSTOPS)
|
||||
#define Y_APPLY_STEP(FWD,Q) DUAL_ENDSTOP_APPLY_STEP(Y,FWD)
|
||||
#define Y_APPLY_STEP(FWD,Q) do { \
|
||||
DUAL_ENDSTOP_APPLY_STEP(Y,FWD); \
|
||||
if (!extruder_duplication_enabled) { \
|
||||
if (last_moved_extruder) \
|
||||
X_STEP_WRITE(FWD); \
|
||||
else X2_STEP_WRITE(FWD); \
|
||||
}; \
|
||||
}while(0)
|
||||
#else
|
||||
#define Y_APPLY_STEP(FWD,Q) do{ Y_STEP_WRITE(FWD); Y2_STEP_WRITE(FWD); }while(0)
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user