Merge remote-tracking branch 'upstream/development' into development
This commit is contained in:
@ -85,18 +85,32 @@ static volatile bool endstop_z_hit = false;
|
||||
int motor_current_setting[3] = DEFAULT_PWM_MOTOR_CURRENT;
|
||||
#endif
|
||||
|
||||
static bool old_x_min_endstop = false,
|
||||
old_x_max_endstop = false,
|
||||
old_y_min_endstop = false,
|
||||
old_y_max_endstop = false,
|
||||
old_z_min_endstop = false,
|
||||
#ifndef Z_DUAL_ENDSTOPS
|
||||
old_z_max_endstop = false;
|
||||
#else
|
||||
old_z_max_endstop = false,
|
||||
old_z2_min_endstop = false,
|
||||
old_z2_max_endstop = false;
|
||||
#endif
|
||||
#if defined(X_MIN_PIN) && X_MIN_PIN >= 0
|
||||
static bool old_x_min_endstop = false;
|
||||
#endif
|
||||
#if defined(X_MAX_PIN) && X_MAX_PIN >= 0
|
||||
static bool old_x_max_endstop = false;
|
||||
#endif
|
||||
#if defined(Y_MIN_PIN) && Y_MIN_PIN >= 0
|
||||
static bool old_y_min_endstop = false;
|
||||
#endif
|
||||
#if defined(Y_MAX_PIN) && Y_MAX_PIN >= 0
|
||||
static bool old_y_max_endstop = false;
|
||||
#endif
|
||||
#if defined(Z_MIN_PIN) && Z_MIN_PIN >= 0
|
||||
static bool old_z_min_endstop = false;
|
||||
#endif
|
||||
#if defined(Z_MAX_PIN) && Z_MAX_PIN >= 0
|
||||
static bool old_z_max_endstop = false;
|
||||
#endif
|
||||
#ifdef Z_DUAL_ENDSTOPS
|
||||
#if defined(Z2_MIN_PIN) && Z2_MIN_PIN >= 0
|
||||
static bool old_z2_min_endstop = false;
|
||||
#endif
|
||||
#if defined(Z2_MAX_PIN) && Z2_MAX_PIN >= 0
|
||||
static bool old_z2_max_endstop = false;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef Z_PROBE_AND_ENDSTOP
|
||||
static bool old_z_probe_endstop = false;
|
||||
@ -449,7 +463,7 @@ ISR(TIMER1_COMPA_vect) {
|
||||
#ifdef COREXY
|
||||
// Head direction in -X axis for CoreXY bots.
|
||||
// If DeltaX == -DeltaY, the movement is only in Y axis
|
||||
if (current_block->steps[A_AXIS] != current_block->steps[B_AXIS] || (TEST(out_bits, A_AXIS) == TEST(out_bits, B_AXIS)))
|
||||
if ((current_block->steps[A_AXIS] != current_block->steps[B_AXIS]) || (TEST(out_bits, A_AXIS) == TEST(out_bits, B_AXIS))) {
|
||||
if (TEST(out_bits, X_HEAD))
|
||||
#else
|
||||
if (TEST(out_bits, X_AXIS)) // stepping along -X axis (regular cartesians bot)
|
||||
@ -477,9 +491,10 @@ ISR(TIMER1_COMPA_vect) {
|
||||
}
|
||||
}
|
||||
#ifdef COREXY
|
||||
}
|
||||
// Head direction in -Y axis for CoreXY bots.
|
||||
// If DeltaX == DeltaY, the movement is only in X axis
|
||||
if (current_block->steps[A_AXIS] != current_block->steps[B_AXIS] || (TEST(out_bits, A_AXIS) != TEST(out_bits, B_AXIS)))
|
||||
if ((current_block->steps[A_AXIS] != current_block->steps[B_AXIS]) || (TEST(out_bits, A_AXIS) != TEST(out_bits, B_AXIS))) {
|
||||
if (TEST(out_bits, Y_HEAD))
|
||||
#else
|
||||
if (TEST(out_bits, Y_AXIS)) // -direction
|
||||
@ -494,6 +509,9 @@ ISR(TIMER1_COMPA_vect) {
|
||||
UPDATE_ENDSTOP(y, Y, max, MAX);
|
||||
#endif
|
||||
}
|
||||
#ifdef COREXY
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
if (TEST(out_bits, Z_AXIS)) { // -direction
|
||||
@ -1227,8 +1245,8 @@ void microstep_init() {
|
||||
pinMode(E0_MS1_PIN,OUTPUT);
|
||||
pinMode(E0_MS2_PIN,OUTPUT);
|
||||
const uint8_t microstep_modes[] = MICROSTEP_MODES;
|
||||
for (int i = 0; i < sizeof(microstep_modes) / sizeof(microstep_modes[0]); i++)
|
||||
microstep_mode(i, microstep_modes[i]);
|
||||
for (uint16_t i = 0; i < sizeof(microstep_modes) / sizeof(microstep_modes[0]); i++)
|
||||
microstep_mode(i, microstep_modes[i]);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user