Advertisement
Guest User

Untitled

a guest
Apr 19th, 2013
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.75 KB | None | 0 0
  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
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement