diff --git a/config.h b/config.h index 72aad6f..211c34b 100755 --- a/config.h +++ b/config.h @@ -63,7 +63,7 @@ #define SPINDLE_DIRECTION_DDR DDRB #define SPINDLE_DIRECTION_PORT PORTB -#define SPINDLE_DIRECTION_BIT 5 // Uno Digital Pin 13 +#define SPINDLE_DIRECTION_BIT 5 // Uno Digital Pin 13 (NOTE: D13 can't be pulled-high input due to LED.) #define COOLANT_FLOOD_DDR DDRC #define COOLANT_FLOOD_PORT PORTC diff --git a/motion_control.c b/motion_control.c index 431aac3..27c2cc5 100755 --- a/motion_control.c +++ b/motion_control.c @@ -217,14 +217,13 @@ void mc_go_home() if (sys.abort) { sys.state = STATE_ALARM; // Homing routine did not complete. return; - } else { - sys.state = STATE_IDLE; // Otherwise, homed and zero out machine position. } // The machine should now be homed and machine zero has been located. Upon completion, // reset system position and sync internal position vectors. clear_vector_float(sys.position); // Set machine zero sys_sync_current_position(); + sys.state = STATE_IDLE; // Set system state to IDLE to complete motion and indicate homed. // Pull-off all axes from limit switches before continuing motion. This provides some initial // clearance off the switches and should also help prevent them from falsely tripping when