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.
I'm now testing camera metadata and stage functionality. This is only using
the simulated HW - but it's a start.
It would be good to add tests for the
camera-stage mapping Thing, though
that may require speeding up the stage.
The Stage is now implemented as a runtime-checkable Protocol.
Part of this led to the realisation that we can't create a DirectThingClient
based on a Protocol, only on a concrete Thing. While it might be
a good idea to address that in LabThings in due course, for now
we work around it by creating both a Protocol and a stub class. The stub class implements the protocol, and
can be used to declare a dependency.
I've now split the base camera code into a runtime-checkable Protocol
and a concrete base class (which is optional). This removes the requirement
for cameras to subclass `openflexure_microscope.things.camera.Camera`
and instead uses duck typing that should
work both statically and dynamically.
As part of this, I've moved the commonly-used dependencies
on the camera inside `openflexure_microscope.things.camera` for consistency, and to make it easy to update them if it changes in the future.
I've now defined parent classes for camera and stage, and depend only on those. This allows
proper typing while enabling the actual hardware
classes to be swapped.
The interfaces definitely aren't final - this is a first
draft, largely to enable me to test out the concept
of a configuration server.
This allows the server to run on a laptop, to some extent. I've not tested if this will make the whole
web app work properly.
As StreamingPiCamera2 is hardcoded in various places, this certainly doesn't make cameras totally
interchangeable - but it is a step towards that.
I changed the labthings package such that it will
only install the client dependencies by default.
This is now fixed by requiring the [server] extras.
In the future we might split labthings into client
and server packages.
The calibration modal was not starting properly, because
the component was not mounted when its show method
was called. Calling it from the `mounted` method solves
the problem and we don't get the error.
I'm not 100% sure this was introduced by refactoring the
taskSubmitter, though it's possible. However, I think the
fix is uncontroversial and it should probably have been there
all along.
I removed some defunct properties - this introduced a couple
of problems, which are resolved by:
* no longer checking for fastAutofocusUri
* removing the unused prop availablePlugins from the calibration modal