Skip to content

Commit

Permalink
axis.py: improve conformance of j/a key bindingss
Browse files Browse the repository at this point in the history
to prior (pre-joints_axes) behavior
for activate_ja_widget_or_set_feedrate()

for manual_ok() and KINEMATICS_IDENTITY in teleop mode:
  `(backtick),1,2,3,...,8 select corresponding coordinate letter

Signed-off-by: Dewey Garrett <dgarrett@panix.com>
  • Loading branch information
dngarrett committed Jan 7, 2016
1 parent 0864f3e commit 7f68abe
Showing 1 changed file with 14 additions and 8 deletions.
22 changes: 14 additions & 8 deletions src/emc/usr_intf/axis/scripts/axis.py
Expand Up @@ -2856,15 +2856,21 @@ def set_feedrate(n):
def set_rapidrate(n):
widgets.rapidoverride.set(n)

def activate_ja_widget_or_set_feedrate(n):
if (joints_mode()
and (s.kinematics_type != linuxcnc.KINEMATICS_IDENTITY)):
return
# teleop or identity allows (De Morgan):
if manual_ok() and (str(n) in trajcoordinates):
activate_ja_widget(n)
def activate_ja_widget_or_set_feedrate(jora):
# note: call with integers only
if manual_ok():
if joints_mode():
activate_ja_widget(jora)
return
if not joints_mode():
if s.kinematics_type == linuxcnc.KINEMATICS_IDENTITY:
activate_ja_widget(jora)
return
else:
return # ignore number (no teleop letter correspondence)
else:
set_feedrate(10*n)
set_feedrate(10*jora)
return

def nomodifier(f):
def g(event):
Expand Down

0 comments on commit 7f68abe

Please sign in to comment.