Add more tests, speed up dummy stage

I've sped up the stage motion, to run tests in a more reasonable time.

CSM doesn't yet calibrate in the test - I suspect debugging of capture_array
is needed.
This commit is contained in:
Richard Bowman 2024-12-03 00:16:26 +00:00
parent 728aa12d07
commit 1e7069b375
3 changed files with 66 additions and 77 deletions

View file

@ -13,6 +13,9 @@ class DummyStage(BaseStage):
This stage should work similarly to a Sangaboard stage, but without any
hardware attached.
"""
def __init__(self, step_time: float=0.001, **kwargs):
super().__init__(**kwargs)
self.step_time = step_time
def __enter__(self):
self.instantaneous_position = self.position
@ -27,7 +30,7 @@ class DummyStage(BaseStage):
self.moving = True
try:
fraction_complete = 0.0
dt = 0.001
dt = self.step_time
max_displacement = max(abs(v) for v in displacement)
start_time = time.time()
while time.time() - start_time < dt * max_displacement: