daily pastebin goal
32%
SHARE
TWEET

Untitled

a guest Apr 19th, 2013 32 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. def jog_on(a, b):
  2.     if not manual_ok(): return
  3.     if not manual_tab_visible(): return
  4.     c.teleop_enable(1)
  5.     if isinstance(a, (str, unicode)):
  6.         a = "xyzabcuvw".index(a)
  7.     if a < 3:
  8.         if vars.metric.get(): b = b / 25.4
  9.         b = from_internal_linear_unit(b)
  10.     if jog_after[a]:
  11.         root_window.after_cancel(jog_after[a])
  12.         jog_after[a] = None
  13.         return
  14.     jogincr = widgets.jogincr.get()
  15.     if jogincr != _("Continuous"):
  16.         s.poll()
  17.         if s.state != 1: return
  18.         distance = parse_increment(jogincr)
  19.         jog(linuxcnc.JOG_INCREMENT, a, b, distance)
  20.         jog_cont[a] = False
  21.     else:
  22.         jog(linuxcnc.JOG_CONTINUOUS, a, b)
  23.         jog_cont[a] = True
  24.         jogging[a] = b
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top