FocusCapability
public enum FocusCapability
Whether a camera's lens can be driven at all.
Ask this before offering a focus control. ThermalCamera.SetFocus(…), ThermalCamera.FocusPosition and ThermalCamera.GetFocusRange all throw FeatureNotSupportedException on a camera with no focus motor; this is the one member that answers on every camera, including one that is not open.
A reason rather than a boolean, for the same cause CalibrationStatus is one: "no" and "not known yet" call for opposite behaviour. A camera that is not open must have its focus control disabled until it says something; a PI camera must have it hidden for good.
Use ThermalCamera.CanFocus rather than comparing against FocusCapability.Fixed yourself. The comparison that reads naturally -- "anything but Fixed" -- makes an unopened camera, and any model this SDK has never heard of, report that it can be focused.
This enum is : int to match the C ABI. New members may be appended by a future SDK, so a switch over it should have a default arm.
| Value | ||
|---|---|---|
Unknown |
0 |
Nobody has asked the camera yet: it is not open, this source has no lens (playback), or the model is one this SDK does not recognise. Not a synonym for "no". |
Fixed |
1 |
This model's lens is fixed or manually focused. There is no motor and there will not be one: hide the control. |
Motorized |
2 |
A focus motor is present and can be driven. |