0
0
Fork 0
mirror of https://github.com/MarlinFirmware/Marlin.git synced 2025-01-31 06:02:16 +00:00

🩹 Fix Core Kinematics BABYSTEP_XY

This commit is contained in:
Scott Lahteine 2023-04-20 17:21:59 -05:00
parent 91cce2a7b3
commit 335ba32a0e
2 changed files with 20 additions and 20 deletions

View file

@ -3627,7 +3627,7 @@ void Stepper::report_positions() {
#if DISABLED(DELTA) #if DISABLED(DELTA)
#define BABYSTEP_AXIS(AXIS, INV, DIR) do{ \ #define BABYSTEP_AXIS(AXIS, DIR, INV) do{ \
const uint8_t old_dir = _READ_DIR(AXIS); \ const uint8_t old_dir = _READ_DIR(AXIS); \
_ENABLE_AXIS(AXIS); \ _ENABLE_AXIS(AXIS); \
DIR_WAIT_BEFORE(); \ DIR_WAIT_BEFORE(); \
@ -3646,12 +3646,12 @@ void Stepper::report_positions() {
#if IS_CORE #if IS_CORE
#define BABYSTEP_CORE(A, B, INV, DIR, ALT) do{ \ #define BABYSTEP_CORE(A, B, DIR, INV, ALT) do{ \
const xy_byte_t old_dir = { _READ_DIR(A), _READ_DIR(B) }; \ const xy_byte_t old_dir = { _READ_DIR(A), _READ_DIR(B) }; \
_ENABLE_AXIS(A); _ENABLE_AXIS(B); \ _ENABLE_AXIS(A); _ENABLE_AXIS(B); \
DIR_WAIT_BEFORE(); \ DIR_WAIT_BEFORE(); \
_APPLY_DIR(A, INVERT_DIR(A, (DIR)^(INV)); \ _APPLY_DIR(A, INVERT_DIR(A, (DIR)^(INV))); \
_APPLY_DIR(B, INVERT_DIR(B, (DIR)^(INV)^(ALT)); \ _APPLY_DIR(B, INVERT_DIR(B, (DIR)^(INV)^(ALT))); \
DIR_WAIT_AFTER(); \ DIR_WAIT_AFTER(); \
_SAVE_START(); \ _SAVE_START(); \
_APPLY_STEP(A, _STEP_STATE(A), true); \ _APPLY_STEP(A, _STEP_STATE(A), true); \
@ -3678,21 +3678,21 @@ void Stepper::report_positions() {
case X_AXIS: case X_AXIS:
#if CORE_IS_XY #if CORE_IS_XY
BABYSTEP_CORE(X, Y, 0, direction, 0); BABYSTEP_CORE(X, Y, direction, 0, 0);
#elif CORE_IS_XZ #elif CORE_IS_XZ
BABYSTEP_CORE(X, Z, 0, direction, 0); BABYSTEP_CORE(X, Z, direction, 0, 0);
#else #else
BABYSTEP_AXIS(X, 0, direction); BABYSTEP_AXIS(X, direction, 0);
#endif #endif
break; break;
case Y_AXIS: case Y_AXIS:
#if CORE_IS_XY #if CORE_IS_XY
BABYSTEP_CORE(X, Y, 1, !direction, (CORESIGN(1)>0)); BABYSTEP_CORE(X, Y, !direction, 1, (CORESIGN(1)>0));
#elif CORE_IS_YZ #elif CORE_IS_YZ
BABYSTEP_CORE(Y, Z, 0, direction, (CORESIGN(1)<0)); BABYSTEP_CORE(Y, Z, direction, 0, (CORESIGN(1)<0));
#else #else
BABYSTEP_AXIS(Y, 0, direction); BABYSTEP_AXIS(Y, direction, 0);
#endif #endif
break; break;
@ -3701,11 +3701,11 @@ void Stepper::report_positions() {
case Z_AXIS: { case Z_AXIS: {
#if CORE_IS_XZ #if CORE_IS_XZ
BABYSTEP_CORE(X, Z, BABYSTEP_INVERT_Z, direction, (CORESIGN(1)<0)); BABYSTEP_CORE(X, Z, direction, BABYSTEP_INVERT_Z, (CORESIGN(1)<0));
#elif CORE_IS_YZ #elif CORE_IS_YZ
BABYSTEP_CORE(Y, Z, BABYSTEP_INVERT_Z, direction, (CORESIGN(1)<0)); BABYSTEP_CORE(Y, Z, direction, BABYSTEP_INVERT_Z, (CORESIGN(1)<0));
#elif DISABLED(DELTA) #elif DISABLED(DELTA)
BABYSTEP_AXIS(Z, BABYSTEP_INVERT_Z, direction); BABYSTEP_AXIS(Z, direction, BABYSTEP_INVERT_Z);
#else // DELTA #else // DELTA
@ -3781,22 +3781,22 @@ void Stepper::report_positions() {
} break; } break;
#if HAS_I_AXIS #if HAS_I_AXIS
case I_AXIS: BABYSTEP_AXIS(I, 0, direction); break; case I_AXIS: BABYSTEP_AXIS(I, direction, 0); break;
#endif #endif
#if HAS_J_AXIS #if HAS_J_AXIS
case J_AXIS: BABYSTEP_AXIS(J, 0, direction); break; case J_AXIS: BABYSTEP_AXIS(J, direction, 0); break;
#endif #endif
#if HAS_K_AXIS #if HAS_K_AXIS
case K_AXIS: BABYSTEP_AXIS(K, 0, direction); break; case K_AXIS: BABYSTEP_AXIS(K, direction, 0); break;
#endif #endif
#if HAS_U_AXIS #if HAS_U_AXIS
case U_AXIS: BABYSTEP_AXIS(U, 0, direction); break; case U_AXIS: BABYSTEP_AXIS(U, direction, 0); break;
#endif #endif
#if HAS_V_AXIS #if HAS_V_AXIS
case V_AXIS: BABYSTEP_AXIS(V, 0, direction); break; case V_AXIS: BABYSTEP_AXIS(V, direction, 0); break;
#endif #endif
#if HAS_W_AXIS #if HAS_W_AXIS
case W_AXIS: BABYSTEP_AXIS(W, 0, direction); break; case W_AXIS: BABYSTEP_AXIS(W, direction, 0); break;
#endif #endif
default: break; default: break;

View file

@ -116,7 +116,7 @@ opt_set MOTHERBOARD BOARD_RAMBO \
FAN_MIN_PWM 50 FAN_KICKSTART_TIME 100 \ FAN_MIN_PWM 50 FAN_KICKSTART_TIME 100 \
XY_FREQUENCY_LIMIT 15 XY_FREQUENCY_LIMIT 15
opt_enable COREYX USE_XMAX_PLUG MIXING_EXTRUDER GRADIENT_MIX \ opt_enable COREYX USE_XMAX_PLUG MIXING_EXTRUDER GRADIENT_MIX \
BABYSTEPPING BABYSTEP_DISPLAY_TOTAL FILAMENT_LCD_DISPLAY \ BABYSTEPPING BABYSTEP_XY BABYSTEP_DISPLAY_TOTAL FILAMENT_LCD_DISPLAY \
REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER MENU_ADDAUTOSTART SDSUPPORT SDCARD_SORT_ALPHA \ REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER MENU_ADDAUTOSTART SDSUPPORT SDCARD_SORT_ALPHA \
ENDSTOP_NOISE_THRESHOLD FAN_SOFT_PWM \ ENDSTOP_NOISE_THRESHOLD FAN_SOFT_PWM \
FIX_MOUNTED_PROBE PROBING_ESTEPPERS_OFF PROBE_OFFSET_WIZARD \ FIX_MOUNTED_PROBE PROBING_ESTEPPERS_OFF PROBE_OFFSET_WIZARD \