21 lines
424 B
Python
21 lines
424 B
Python
import time
|
|
import pytest
|
|
|
|
|
|
def stop_reset_enable_move_sequence(motor, target):
|
|
|
|
motor.write_field('stop', 1)
|
|
motor.write_field('reseterrorpv', 1)
|
|
|
|
# Wait until the motor is disabled.
|
|
motor.wait_disabled()
|
|
|
|
motor.write_field('enable', 1)
|
|
|
|
# Wait until the motor is enabled.
|
|
motor.wait_enabled()
|
|
|
|
motor.move_and_wait(target)
|
|
assert motor.at_target(target)
|
|
assert not motor.has_error()
|