Skip to content

Commit

Permalink
zhome before turret move
Browse files Browse the repository at this point in the history
  • Loading branch information
iwaniec committed Apr 13, 2023
1 parent 3c699cc commit 9cd39c6
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
10 changes: 9 additions & 1 deletion lumascope_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,15 @@ def tmove(self, degrees):
Move turret to position in degrees"""

if not self.motion: return
self.motion.tmove(degrees)
# MUST home move objective home first to prevent crash
self.zhome()

self.tmove_timer = Timer(5, self.tmove_complete, args=(degrees,))
self.tmove_timer.start()

def tmove_complete(self, degrees):
self.tmove(degrees)
self.tmove_timer.cancel()

def get_target_position(self, axis):
"""MOTION CONTROL FUNCTIONS
Expand Down
2 changes: 1 addition & 1 deletion lumaviewpro.py
Original file line number Diff line number Diff line change
Expand Up @@ -1063,7 +1063,7 @@ def turret_home(self):

def turret_select(self, position):

#TODO HOME turret first
#TODO check if turret has been HOMED turret first

if position == '1':
lumaview.scope.tmove(0)
Expand Down

0 comments on commit 9cd39c6

Please sign in to comment.