From 5844172af13e11b03c8b80f6d6ebf2b6b64ff181 Mon Sep 17 00:00:00 2001 From: Sonny Jeon Date: Fri, 9 Nov 2012 16:25:42 -0700 Subject: [PATCH] Fixed homing cycle hanging after locating switches. --- motion_control.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/motion_control.c b/motion_control.c index 995d27c..431aac3 100755 --- a/motion_control.c +++ b/motion_control.c @@ -217,6 +217,8 @@ 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, @@ -242,7 +244,7 @@ void mc_go_home() // If hard limits feature enabled, re-enable hard limits interrupt after homing cycle. if (bit_istrue(settings.flags,BITFLAG_HARD_LIMIT_ENABLE)) { PCICR |= (1 << LIMIT_INT); } - sys.state = STATE_IDLE; // Finished! + // Finished! }