forked from verser-git/probe_screen_v2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.axisrc
33 lines (30 loc) · 1002 Bytes
/
.axisrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#root_window.tk.call("wm","geometry",".","1024x768")
root_window.attributes("-fullscreen",1)
def my_error_task(self):
error = e.poll()
while error:
kind, text = error
if kind in (linuxcnc.NML_ERROR, linuxcnc.OPERATOR_ERROR):
icon = "error"
else:
icon = "info"
notifications.add(icon, text)
ucomp["error"]=True
error = e.poll()
self.error_after = self.win.after(200, self.error_task)
def my_remove(self, widgets):
self.widgets.remove(widgets)
if len(self.cache) < 10:
widgets[0].pack_forget()
self.cache.append(widgets)
else:
widgets[0].destroy()
if len(self.widgets) == 0:
ucomp["error"]=False
self.place_forget()
LivePlotter.error_task = my_error_task
Notification.remove = my_remove
if hal_present == 1 :
ucomp = hal.component("probe.user")
ucomp.newpin("error",hal.HAL_BIT,hal.HAL_IN)
ucomp.ready()