Fix CoreXY Homing Routine.

Fixed how stepper ISR figure it out when the head (extruder) is going to
Min or Max direction.
Added Homing to Max Endstops.
This commit is contained in:
alexborro
2015-02-13 14:38:05 -02:00
parent 7866fa161f
commit afc737ca0c
3 changed files with 20 additions and 13 deletions

View File

@ -401,10 +401,11 @@ ISR(TIMER1_COMPA_vect)
// Set direction en check limit switches
#ifndef COREXY
if ((out_bits & (1<<X_AXIS)) != 0) { // stepping along -X axis
if ((out_bits & (1<<X_AXIS)) != 0) // stepping along -X axis
#else
if ((((out_bits & (1<<X_AXIS)) != 0)&&(out_bits & (1<<Y_AXIS)) != 0)) { //-X occurs for -A and -B
if ((out_bits & (1<<X_HEAD)) != 0) //AlexBorro: Head direction in -X axis for CoreXY bots.
#endif
{
CHECK_ENDSTOPS
{
#ifdef DUAL_X_CARRIAGE
@ -425,7 +426,8 @@ ISR(TIMER1_COMPA_vect)
}
}
}
else { // +direction
else
{ // +direction
CHECK_ENDSTOPS
{
#ifdef DUAL_X_CARRIAGE
@ -448,10 +450,11 @@ ISR(TIMER1_COMPA_vect)
}
#ifndef COREXY
if ((out_bits & (1<<Y_AXIS)) != 0) { // -direction
if ((out_bits & (1<<Y_AXIS)) != 0) // -direction
#else
if ((((out_bits & (1<<X_AXIS)) != 0)&&(out_bits & (1<<Y_AXIS)) == 0)) { // -Y occurs for -A and +B
if ((out_bits & (1<<Y_HEAD)) != 0) //AlexBorro: Head direction in -Y axis for CoreXY bots.
#endif
{
CHECK_ENDSTOPS
{
#if defined(Y_MIN_PIN) && Y_MIN_PIN > -1
@ -465,7 +468,8 @@ ISR(TIMER1_COMPA_vect)
#endif
}
}
else { // +direction
else
{ // +direction
CHECK_ENDSTOPS
{
#if defined(Y_MAX_PIN) && Y_MAX_PIN > -1