| from __future__ import print_function | | from OpenGL.GL import * | from OpenGL.GLU import * | from OpenGL.GLUT import * if sys.version_info[0] == 3: | else: | import Tkinter | import thread as _thread | gettext.install("linuxcnc", localedir=os.path.join(BASE, "share", "locale"), unicode=True) | from minigl import * | if sys.version_info[0] == 3: | else: | import ConfigParser as configparser | | continuous_jog_in_progress = False | cjogindices = [] iconname = self.tk.call("load_image", "std_" + iconname) | iconname_image = self.tk.call("load_image", "std_" + iconname) icon.configure(image=iconname) | icon.configure(image=iconname_image) widgets = frame, icon, text, button, iconname | widgets = frame, icon, text, button, iconname_image widgets = frame, icon, text, button, iconname | widgets = frame, icon, text, button, iconname_image | if iconname == "error": | comp["error"] = True | if self._remaining_error_count() == 0: | comp["error"] = False | def _remaining_error_count(self): | """ Returns the count of remaining error messages """ | count = 0 | for i, item in enumerate(self.widgets): | frame, icon, text, button, iname = item | if iname == "icon_std_error": | count += 1 | return count | | | global continuous_jog_in_progress,cjogindices | if continuous_jog_in_progress and not manual_tab_visible(): | jjogmode = get_jog_mode() | for idx in cjogindices: | c.jog(linuxcnc.JOG_STOP, jjogmode,idx) | continuous_jog_in_progress = 0 | cjogindices = [] | | stderr_line = line.decode() # If it was "Continous" just before, then don't change last jog increment! | # If it was "Continuous" just before, then don't change last jog increment! | comp["abort"] = True | time.sleep(0.3) | comp["abort"] = False if sys.version_info[0] == 3: | else: | items = tuple(inifile.findall(section, item)) | return root_window.tk.merge(*items) # str | global continuous_jog_in_progress | global continuous_jog_in_progress,cjogindices continuous_jog_in_progress = 1 | continuous_jog_in_progress = True | if not a in cjogindices: cjogindices.append(a) continuous_jog_in_progress = 0 | continuous_jog_in_progress = False if joint_sequence[jnum] is '': | if joint_sequence[jnum] == '': coordinate_font = "courier bold 20" | coordinate_font = "monospace 20" coordinate_font = "courier bold 11" | coordinate_font = "monospace 11" | comp.newpin("error", hal.HAL_BIT, hal.HAL_OUT) | comp.newpin("abort", hal.HAL_BIT, hal.HAL_OUT) cmd += ['-x', str(xid)] + gladecmd | cmd += ['-d', '-x', str(xid)] + gladecmd | print(cmd) # call an empty function that can be overidden | # call an empty function that can be overridden