Update focus.py
This commit is contained in:
parent
38b09e6b13
commit
1f46ea7e07
|
@ -20,19 +20,19 @@ stage = kit.stepper2
|
||||||
|
|
||||||
stage.release()
|
stage.release()
|
||||||
|
|
||||||
def focus(steps,orientation):
|
def focus(nb_step,orientation):
|
||||||
#0.25mm/step
|
#0.25mm/step
|
||||||
#31um/microsteps
|
#31um/microsteps
|
||||||
|
|
||||||
stage.release()
|
stage.release()
|
||||||
|
|
||||||
if orientation == 'up':
|
if orientation == 'up':
|
||||||
for i in range(steps):
|
for i in range(nb_step):
|
||||||
stage.onestep(direction=stepper.FORWARD, style=stepper.MICROSTEP)
|
stage.onestep(direction=stepper.FORWARD, style=stepper.MICROSTEP)
|
||||||
sleep(0.001)
|
sleep(0.001)
|
||||||
|
|
||||||
if orientation == 'down':
|
if orientation == 'down':
|
||||||
for i in range(steps):
|
for i in range(nb_step):
|
||||||
stage.onestep(direction=stepper.BACKWARD, style=stepper.MICROSTEP)
|
stage.onestep(direction=stepper.BACKWARD, style=stepper.MICROSTEP)
|
||||||
sleep(0.001)
|
sleep(0.001)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue