Skip to content

Commit

Permalink
adding rounding to pimicos stage to avoing out of boundaries movement…
Browse files Browse the repository at this point in the history
…s, bad implementation in driver with very small values
  • Loading branch information
leardilap committed Nov 16, 2015
1 parent 1b45168 commit cd770b8
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions pimicosMultiAxis.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ def __init__(self, parent):
self.Init(parent)

def Move(self, parent):
pos = parent.ui.DesirePos_Y.value()
pos = round(parent.ui.DesirePos_Y.value(),4)
if parent.tangoEnable:
self.axis.write_attribute('Position',pos)
else:
Expand Down Expand Up @@ -165,7 +165,7 @@ def __init__(self, parent):
self.Init(parent)

def Move(self, parent):
pos = parent.ui.DesirePos_Z.value()
pos = round(parent.ui.DesirePos_Z.value(),4)
if parent.tangoEnable:
self.axis.write_attribute('Position',pos)
else:
Expand Down Expand Up @@ -230,7 +230,7 @@ def __init__(self, parent):
self.Init(parent)

def Move(self, parent):
pos = parent.ui.DesirePos_Roll.value()
pos = round(parent.ui.DesirePos_Roll.value(),4)
if parent.tangoEnable:
self.axis.write_attribute('Position',pos)
else:
Expand Down Expand Up @@ -304,7 +304,8 @@ def __init__(self, parent):
self.Init(parent)

def Move(self, parent):
pos = parent.ui.DesirePos_Pitch.value()
pos = round(parent.ui.DesirePos_Pitch.value(),4)
print pos
if parent.tangoEnable:
self.axis.write_attribute('Position',pos)
else:
Expand Down Expand Up @@ -373,7 +374,7 @@ def __init__(self, parent):
self.Init(parent)

def Move(self, parent):
pos = parent.ui.DesirePos_Yaw.value()
pos = round(parent.ui.DesirePos_Yaw.value(),4)
if parent.tangoEnable:
self.axis.write_attribute('Position',pos)
else:
Expand Down

0 comments on commit cd770b8

Please sign in to comment.