areaDetector / ADGenICam

areaDetector base class for GenICam cameras.
https://areadetector.github.io/areaDetector/ADGenICam/ADGenICam.html
8 stars 17 forks source link

Acquisition mode fallback #33

Open daykin opened 1 year ago

daykin commented 1 year ago

Fix for https://github.com/areaDetector/ADAravis/issues/20:

Some of our beamline cameras (Imaging source DMK 33GX174) exclusively support continuous acquisition mode. I propose adding some "reasonable" fallback logic summarized as follows:

If user selects 'Single' and it's not supported, try 'multiple' (with the assumption you can just set nImages to 1). If multiple is also not available, go to continuous.

If user selects 'Multiple' and it isn't available, go to continuous.

Otherwise (user picked 'continuous' or all mAcquisitionMode's are broken for whatever reason), go to continuous.

Also trimmed trailing whitespace from the entire file.

@MarkRivers I only have a 33GX174 to test with. Do you have a camera capable of all three modes to make sure it still works?

daykin commented 1 year ago

P.S. I also re-formatted this method to the clang-format style. Let me know if you'd like me to use a different formatting standard.

MarkRivers commented 2 months ago

I neglected to merge this before I started using a camera with the same issue, it does not support Single mode.

I think the driver now handles cameras that don't support Single or Multiple. Please test it, and if it works I will close this PR.

In the future please separate PRs with functional changes from those with formatting changes. It makes it much easier to see what the significant changes are.

daykin commented 2 months ago

I am still getting the following with our camera that doesn't support single/multiple, on version 1.10:

** (process:3168344): CRITICAL **: 12:28:25.040: arv_gc_integer_get_value: assertion 'error == NULL || *error == NULL' failed
2024/07/31 12:28:25.572 ADAravis:processBuffer: w: 1440, h: 1080, size: 0, expected_size: 3110400

It is not critical for us at least.

MarkRivers commented 2 months ago

Can you send a screenshot of the ADAravis screen and the camera-specific screen that shows the AcquisitionMode feature when this problem occurs?

daykin commented 2 months ago

image

image

'Acquisition mode' in the features page seems to behave correctly, in that there's only one option. The ADAravis main page 'Image Mode' still has options for single/multi/continuous with a valid readback reflecting that selection.