? estop_notuseful.patch
Index: scripts/axis.py
===================================================================
RCS file: /fs/c1/cvs/axis/scripts/axis.py,v
retrieving revision 1.20
diff -u -u -r1.20 axis.py
--- scripts/axis.py	30 Nov 2004 13:07:57 -0000	1.20
+++ scripts/axis.py	30 Nov 2004 19:52:57 -0000
@@ -471,6 +471,12 @@
                                     "AXIS error", text, "info",0,"OK")
         self.after = self.win.after(20, self.update)
 
+        if not estop_useful:
+            if self.stat.task_state == emc.STATE_ESTOP:
+                c.state(emc.STATE_ESTOP_RESET)
+                c.state(emc.STATE_ON)
+            elif self.stat.task_state == emc.STATE_ESTOP_RESET:
+                c.state(emc.STATE_ON)
         if program_start_line_last == -1 or \
                 self.stat.read_line < program_start_line_last:
             self.win.set_current_line(self.stat.read_line)
@@ -999,6 +1005,7 @@
 
 import sys, getopt, _tkinter
 axiscount = 3
+estop_useful = 0
 axisnames = "X Y Z".split()
 
 if len(sys.argv) > 1 and sys.argv[1] == '-ini':
@@ -1006,6 +1013,7 @@
     inifile = emc.ini(sys.argv[2])
     axiscount = int(inifile.find("TRAJ", "AXES"))
     axisnames = inifile.find("TRAJ", "COORDINATES").split()
+    estop_useful = int(inifile.find("EMC", "ESTOP_USEFUL") or 0)
     emc.nmlfile = inifile.find("EMC", "NML_FILE")
     del sys.argv[1:3]
 opts, args = getopt.getopt(sys.argv[1:], 'd:')
@@ -1016,6 +1024,14 @@
 c = emc.command()
 e = emc.error_channel()
 
+if not estop_useful:
+    root_window.tk.call("pack", "forget", ".toolbar.machine_estop")
+    root_window.tk.call("pack", "forget", ".toolbar.machine_power")
+    root_window.tk.call("pack", "forget", ".toolbar.rule0")
+    root_window.tk.call(".menu.file", "delete", "3", "5")
+    root_window.bind("<Key-F1>", commands.task_stop)
+    root_window.bind("<Key-F2>", commands.task_stop)
+
 prologue = ["g80 g17 g40 g20 g90 g94 g54 g49 g99 g64 m5 m9 m48 f60 s0\n"]
 prologue_code = parse_lines('<prologue>', prologue)
 
