Enable volatile home support in task

Allow motion to accept unhome command even if disabled

Signed-off-by: Michael Geszkiewicz <micges@wp.pl>
This commit is contained in:
Michael Geszkiewicz 2009-12-24 02:25:20 +01:00
parent a9495decb3
commit 0a7f2d34fc
2 changed files with 4 additions and 7 deletions

View file

@ -1243,13 +1243,10 @@ check_stuff ( "before command_handler()" );
rtapi_print_msg(RTAPI_MSG_DBG, "UNHOME");
rtapi_print_msg(RTAPI_MSG_DBG, " %d", joint_num);
if (emcmotStatus->motion_state != EMCMOT_MOTION_FREE) {
reportError("must be in joint mode to unhome");
if ((emcmotStatus->motion_state != EMCMOT_MOTION_FREE) && (emcmotStatus->motion_state != EMCMOT_MOTION_DISABLED)) {
reportError("must be in joint mode or disabled to unhome");
return;
}
if (!GET_MOTION_ENABLE_FLAG()) {
break;
}
if (joint_num < 0) {
/* we want all or none, so these checks need to all be done first.

View file

@ -198,7 +198,7 @@ int emcTaskSetState(int state)
emcTaskAbort();
emcIoAbort();
emcSpindleAbort();
// emcAxisUnhome(-2); // only those joints which are volatile_home
emcAxisUnhome(-2); // only those joints which are volatile_home
emcTaskPlanSynch();
break;
@ -234,7 +234,7 @@ int emcTaskSetState(int state)
emcTaskAbort();
emcIoAbort();
emcSpindleAbort();
// emcAxisUnhome(-2); // only those joints which are volatile_home
emcAxisUnhome(-2); // only those joints which are volatile_home
emcTaskPlanSynch();
break;