Skip to content

Commit

Permalink
Home and Ident functionality
Browse files Browse the repository at this point in the history
  • Loading branch information
sequoiap committed Aug 30, 2019
1 parent 5e8b7c4 commit 5b24831
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions autogator/ui/program.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ def __init__(self, master, device='Controller', sn: int=None):
Label(self.info_frame, text="Position").grid(row=0, column=0, sticky=W)
self.position = StringVar()
Label(self.info_frame, textvariable=self.position, style='PosDisplay.TLabel').grid(row=1, column=0, rowspan=2, sticky=NSEW)
Label(self.info_frame, text="Homed").grid(row=1, column=1)
Button(self.info_frame, text="IDENT").grid(row=2, column=1)
Button(self.info_frame, text="Home", command=self.home).grid(row=1, column=1)
Button(self.info_frame, text="IDENT", command=self.ident).grid(row=2, column=1)
self.info_frame.pack(side=TOP, fill='x')

self.move_frame = Frame(self)
Expand Down Expand Up @@ -111,6 +111,14 @@ def update(self):
except:
pass

def home(self):
if self.motor:
self.motor.home()

def ident(self):
if self.motor:
self.motor.identify()

def move_to(self, event=None):
if self.motor:
self.motor.move_to(float(self.move_to_val.get()))
Expand Down

0 comments on commit 5b24831

Please sign in to comment.