import sys
import pytest
import time 

sys.path.append('./src')
from srts200 import Srts200, AXES

srts = Srts200()

print()
print(f"Radom axis position        : {srts.position(AXES.RADOME)}°")
print(f"Elevation axis position    : {srts.position(AXES.ELEVATION)}°")
print(f"Azimuth axis position      : {srts.position(AXES.AZIMUTH)}°")
print(f"Polarization axis position : {srts.position(AXES.POLARIZATION)}°")

target = 0
axis = AXES.RADOME
srts.move(axis, target)
print("Started moving ...")
while srts.position(axis) != target:
    print(f"- Current position = {srts.position(axis)}")
    time.sleep(0.5)

target = 135
axis = AXES.POLARIZATION
srts.move(axis, target)
print("Started moving ...")
time.sleep(1)
srts.stop(axis)
time.sleep(1)
print(srts.position(axis))