Skip to content

Commit

Permalink
[BUGFIX] to handle_jog_wheel()
Browse files Browse the repository at this point in the history
+ there's NULL pointer for joint.*.jog_vel_mode
  • Loading branch information
yishinli committed Mar 22, 2011
1 parent 44ac8a8 commit 5f27eb8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/emc/motion/control.c
Expand Up @@ -1015,6 +1015,7 @@ static void handle_jogwheels(void)
if (pos < joint->min_jog_limit) {
continue;
}

/* The default is to move exactly as far as the wheel commands,
even if that move takes much longer than the wheel movement
that commanded it. Some folks prefer that the move stop as
Expand Down Expand Up @@ -1058,7 +1059,7 @@ static void get_pos_cmds(long period)
emcmot_axis_t *axis;
double positions[EMCMOT_MAX_JOINTS]/*, tmp_pos[EMCMOT_MAX_JOINTS], tmp_vel[EMCMOT_MAX_JOINTS]*/;
double old_pos_cmd, new_pos_cmd, new_vel_cmd;
double vel_lim;
// double vel_lim;
/* used in teleop mode to compute the max accell requested */
int onlimit = 0;
int joint_limit[EMCMOT_MAX_JOINTS][2];
Expand Down
1 change: 1 addition & 0 deletions src/emc/motion/motion.c
Expand Up @@ -504,6 +504,7 @@ static int export_joint(int num, joint_hal_t * addr)
if ((retval = hal_pin_bit_newf(HAL_IN, &(addr->amp_fault), mot_comp_id, "joint.%d.amp-fault-in", num)) != 0) return retval;
if ((retval = hal_pin_s32_newf(HAL_IN, &(addr->jog_counts), mot_comp_id, "joint.%d.jog-counts", num)) != 0) return retval;
if ((retval = hal_pin_bit_newf(HAL_IN, &(addr->jog_enable), mot_comp_id, "joint.%d.jog-enable", num)) != 0) return retval;
if ((retval = hal_pin_bit_newf(HAL_IN, &(addr->jog_vel_mode), mot_comp_id, "joint.%d.jog-vel-mode", num)) != 0) return retval;
if ((retval = hal_pin_float_newf(HAL_IN, &(addr->jog_scale), mot_comp_id, "joint.%d.jog-scale", num)) != 0) return retval;
if ((retval = hal_pin_float_newf(HAL_OUT, &(addr->joint_vel_cmd), mot_comp_id, "joint.%d.vel-cmd", num)) != 0) return retval;
if ((retval = hal_pin_float_newf(HAL_OUT, &(addr->backlash_corr), mot_comp_id, "joint.%d.backlash-corr", num)) != 0) return retval;
Expand Down

0 comments on commit 5f27eb8

Please sign in to comment.