Merge 2.8 to master (inhibit task mode set if jogging)
This commit is contained in:
commit
0b5f57d6fa
7 changed files with 26 additions and 1 deletions
|
|
@ -275,6 +275,16 @@ void emcmotController(void *arg, long period)
|
||||||
prototypes"
|
prototypes"
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
static bool joint_jog_is_active(void) {
|
||||||
|
int jno;
|
||||||
|
for (jno = 0; jno < EMCMOT_MAX_AXIS; jno++) {
|
||||||
|
if ( (&joints[jno])->kb_jjog_active || (&joints[jno])->wheel_jjog_active) {
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
static void handle_kinematicsSwitch(void) {
|
static void handle_kinematicsSwitch(void) {
|
||||||
int joint_num;
|
int joint_num;
|
||||||
int hal_switchkins_type = 0;
|
int hal_switchkins_type = 0;
|
||||||
|
|
@ -2114,6 +2124,8 @@ static void update_status(void)
|
||||||
emcmotStatus->motionType = tpGetMotionType(&emcmotInternal->coord_tp);
|
emcmotStatus->motionType = tpGetMotionType(&emcmotInternal->coord_tp);
|
||||||
emcmotStatus->queueFull = tcqFull(&emcmotInternal->coord_tp.queue);
|
emcmotStatus->queueFull = tcqFull(&emcmotInternal->coord_tp.queue);
|
||||||
|
|
||||||
|
emcmotStatus->jogging_active = axis_jog_is_active()
|
||||||
|
|| joint_jog_is_active();
|
||||||
/* check to see if we should pause in order to implement
|
/* check to see if we should pause in order to implement
|
||||||
single emcmotStatus->stepping */
|
single emcmotStatus->stepping */
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -656,6 +656,7 @@ Suggestion: Split this in to an Error and a Status flag register..
|
||||||
EmcPose eoffset_pose;
|
EmcPose eoffset_pose;
|
||||||
int numExtraJoints;
|
int numExtraJoints;
|
||||||
int stepping;
|
int stepping;
|
||||||
|
bool jogging_active;
|
||||||
} emcmot_status_t;
|
} emcmot_status_t;
|
||||||
|
|
||||||
/*********************************
|
/*********************************
|
||||||
|
|
|
||||||
|
|
@ -1232,6 +1232,7 @@ class EMC_MOTION_STAT:public EMC_MOTION_STAT_MSG {
|
||||||
int external_offsets_applied;
|
int external_offsets_applied;
|
||||||
EmcPose eoffset_pose;
|
EmcPose eoffset_pose;
|
||||||
int numExtraJoints;
|
int numExtraJoints;
|
||||||
|
bool jogging_active;
|
||||||
};
|
};
|
||||||
|
|
||||||
// declarations for EMC_TASK classes
|
// declarations for EMC_TASK classes
|
||||||
|
|
|
||||||
|
|
@ -269,6 +269,11 @@ int emcTaskSetMode(int mode)
|
||||||
{
|
{
|
||||||
int retval = 0;
|
int retval = 0;
|
||||||
|
|
||||||
|
if (jogging_is_active()) {
|
||||||
|
emcOperatorError(0, "Ignoring task mode change while jogging");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
switch (mode) {
|
switch (mode) {
|
||||||
case EMC_TASK_MODE_MANUAL:
|
case EMC_TASK_MODE_MANUAL:
|
||||||
// go to manual mode
|
// go to manual mode
|
||||||
|
|
|
||||||
|
|
@ -152,6 +152,10 @@ int all_homed(void) {
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool jogging_is_active(void) {
|
||||||
|
return emcStatus->motion.jogging_active;
|
||||||
|
}
|
||||||
|
|
||||||
void emctask_quit(int sig)
|
void emctask_quit(int sig)
|
||||||
{
|
{
|
||||||
// set main's done flag
|
// set main's done flag
|
||||||
|
|
|
||||||
|
|
@ -27,6 +27,7 @@ extern int emcRunHalFiles(const char *filename);
|
||||||
|
|
||||||
// Returns 0 if all joints are homed, 1 if any joints are un-homed.
|
// Returns 0 if all joints are homed, 1 if any joints are un-homed.
|
||||||
int all_homed(void);
|
int all_homed(void);
|
||||||
|
bool jogging_is_active(void);
|
||||||
|
|
||||||
int emcTaskInit();
|
int emcTaskInit();
|
||||||
int emcTaskHalt();
|
int emcTaskHalt();
|
||||||
|
|
|
||||||
|
|
@ -2060,7 +2060,8 @@ int emcMotionUpdate(EMC_MOTION_STAT * stat)
|
||||||
stat->misc_error[num_error] = emcmotStatus.misc_error[num_error];
|
stat->misc_error[num_error] = emcmotStatus.misc_error[num_error];
|
||||||
}
|
}
|
||||||
|
|
||||||
stat->numExtraJoints=emcmotStatus.numExtraJoints;
|
stat->jogging_active = emcmotStatus.jogging_active;
|
||||||
|
stat->numExtraJoints = emcmotStatus.numExtraJoints;
|
||||||
|
|
||||||
// set the status flag
|
// set the status flag
|
||||||
error = 0;
|
error = 0;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue