Currently the device finding code locates the first camera (e.g. if the user doesn't specify a device). It's also a good idea to return all the cameras for those folks who have multiple cameras connected. The proposal is to extend find_devices to instead return a list.
The default action if calling setup_video(None) will be to take the first value in that list, if it exists. Or if you have several cameras, you would be able to do:
devices = boson.find_devices()
cameras = ...
for dev in devices:
camera = Boson()
camera.setup_video(dev)
cameras.append(camera)
The only trouble with this approach is that it's difficult to associate the port numbers with the cameras (except maybe on Linux). I don't know if it will be trivial on Windows without digging into the COM.
We will probably need to do something like:
Query all serial devices with the correct pid/vid and make a lookup table with serial number + port
Query all video devices and also check the serial numbers, associate with the lookup table
See discussion in: https://github.com/LJMUAstroecology/flirpy/pull/19
Currently the device finding code locates the first camera (e.g. if the user doesn't specify a device). It's also a good idea to return all the cameras for those folks who have multiple cameras connected. The proposal is to extend
find_devices
to instead return a list.The default action if calling
setup_video(None)
will be to take the first value in that list, if it exists. Or if you have several cameras, you would be able to do:The only trouble with this approach is that it's difficult to associate the port numbers with the cameras (except maybe on Linux). I don't know if it will be trivial on Windows without digging into the COM.
We will probably need to do something like: