Skip to content

Commit 5b24831

Browse files
committed
Home and Ident functionality
1 parent 5e8b7c4 commit 5b24831

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

autogator/ui/program.py

+10-2
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,8 @@ def __init__(self, master, device='Controller', sn: int=None):
7777
Label(self.info_frame, text="Position").grid(row=0, column=0, sticky=W)
7878
self.position = StringVar()
7979
Label(self.info_frame, textvariable=self.position, style='PosDisplay.TLabel').grid(row=1, column=0, rowspan=2, sticky=NSEW)
80-
Label(self.info_frame, text="Homed").grid(row=1, column=1)
81-
Button(self.info_frame, text="IDENT").grid(row=2, column=1)
80+
Button(self.info_frame, text="Home", command=self.home).grid(row=1, column=1)
81+
Button(self.info_frame, text="IDENT", command=self.ident).grid(row=2, column=1)
8282
self.info_frame.pack(side=TOP, fill='x')
8383

8484
self.move_frame = Frame(self)
@@ -111,6 +111,14 @@ def update(self):
111111
except:
112112
pass
113113

114+
def home(self):
115+
if self.motor:
116+
self.motor.home()
117+
118+
def ident(self):
119+
if self.motor:
120+
self.motor.identify()
121+
114122
def move_to(self, event=None):
115123
if self.motor:
116124
self.motor.move_to(float(self.move_to_val.get()))

0 commit comments

Comments
 (0)