[LinuxCNC/linuxcnc PR#259] axis: lathe jog error with minus/plus keys and buttons

未分类 bolang 4个月前 (10-15) 32次浏览

Issue #259 | 状态: 已关闭 | 作者: phillc54 | 创建时间: 2017-04-14


axis: jogging problems before machine is homed

Signed-off-by: Phillip Carter


评论 (6)

#1 – SebKuzminsky 于 2017-04-14

I just tried sim/axis/lathe on the current tip of master (v2.8.0-pre1-2975-gc0778d66cf). F1, F2, don’t home, then try to jog.

X jogs with the + and – buttons in the GUI and on the keyboard, and with the Left and Right arrow keys. “-” (both keyboard and GUI) and Left arrow move X in the negative direction (ie towards the Z axis, reducing the radius/diameter). “+” and Right arrow move X in the positive direction. This differs from the behavior in 2.7, where Down/+ moves X in the positive direction and Up/- moves X in the negative direction.

Z fails to jog if i use the + or – buttons on the keyboard or in the GUI, and Axis prints this error:
““
Exception in Tkinter callback
Traceback (most recent call last):
File "/usr/lib/python2.7/lib-tk/Tkinter.py", line 1545, in call
return self.func(*args)
File "/home/seb/linuxcnc-dev/bin/axis", line 2456, in jog_plus
speed = getjogspeed(a)
File "/home/seb/linuxcnc-dev/bin/axis", line 1701, in getjogspeed
if joint_type[a] == 'LINEAR':
IndexError: list index out of range
““

Z jogs fine with the Up and Down arrows, and after I’ve jogged it with Up/Down, i can jog it with +/- (both keyboard and GUI). Up/+ moves Z in the positive direction, Down/- moves in the negative direction. This differs from 2.7, where Right/+ moves Z in the positive direction and Left/- moves Z in the negative direction.

I then tried the same tests with the commits in this PR. This PR makes unhomed lathe jogging work like it did in 2.7. Same jogging directions for the same buttons (keyboard & gui), and no IndexError. So this PR looks good to me and I think we should merge it.


#2 – SebKuzminsky 于 2017-04-14

@phillc54 Thanks for finding and fixing these bugs!


#3 – andypugh 于 2017-04-15

On 14 April 2017 at 15:59, Sebastian Kuzminsky
wrote:

> X jogs with the + and – buttons in the GUI and on the keyboard, and with
> the Left and Right arrow keys. “-” (both keyboard and GUI) and Left arrow
> move X in the negative direction (ie towards the Z axis, reducing the
> radius/diameter). “+” and Right arrow move X in the positive direction.
> This differs from the behavior in 2.7, where Down/+ moves X in the positive
> direction and Up/- moves X in the negative direction.
>
Is that correct?

When I had a lathe with keyboard jogging left-right moved the Z axis
(carriage left/right) and up-down moved the X axis (tool in/out)

That made more intuitive sense to me.


atp


#4 – phillc54 于 2017-04-15

I think (hope) that is in reference to before the patch.


#5 – andypugh 于 2017-04-16

I think I managed to confuse myself while reading Seb’s description.


#6 – SebKuzminsky 于 2017-04-16

Yeah reading back to my comment, it’s pretty ambiguous, sorry.

The behavior I described was the behavior of the master branch before @phillc54 ‘s patch.

After @phillc54 ‘s patch the behavior is the same as the behavior in 2.7: Left/Right jogs Z, and Up/Down jogs X.


原始Issue: https://github.com/LinuxCNC/linuxcnc/pull/259

喜欢 (0)