MicronOxford / BeamDelta

Alignment tool
GNU General Public License v3.0
5 stars 7 forks source link

camera is not disabled when BeamDelta exits #16

Closed carandraug closed 3 years ago

carandraug commented 4 years ago

Speaking with @juliomateoslangerak on IRC:

There is another issue too when used with BeamDelta. Quiting BeamDelta seems to happen a bit abruptly to the camera. BeamDelta cannot restart unless I restart the server.

The reason for this is that BeamDelta does not disable the camera when it exits since the problem is avoided by unticking the Live button (which calls CameraDevice.disable).

Part of the problem lies on microscope since the device server should not be left on a broken state if the client exits abruptly. Still, I guess BeamDelta should disable the cameras at the end since it also enables them at the start.

carandraug commented 4 years ago

I have a proposed fix on my issue-16-disable-cameras branch. This disables the cameras at the end, independently of whether they were enabled or disabled at the start.

I had an alternative fix that would return the camera to the state before starting BeamDelta, i.e., only disable if they were disabled before. However, what if they were enabled at the start, then we disable the cameras in BeamDelta (via the "Live" button), and then exit BeamDelta? So I'm thinking that we should disable them and let's see if a use case appears in the future where we want something else.

Part of the problem lies on microscope since the device server should not be left on a broken state if the client exits abruptly.

if using a TestCamera this is not an issue. So this issue is not general to the device server and is probably camera dependent. The original issue as reported by @juliomateoslangerak is when using ximea.

iandobbie commented 3 years ago

I merged in David changes, seem to work on my setup