Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documenting the common parameter CAM_MODE. #164

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions en/services/camera_def.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ CAM_EV | Exposure Compensation (usually only used for automatic exposure modes.)
CAM_EXPMODE | Exposure Mode (Manual, Auto, Program Auto, Aperture Priority, etc.)
CAM_ISO | ISO
CAM_METERING | Metering Mode
CAM_MODE | Camera Mode. This parameter is used to change the camera mode (via [PARAM_EXT_SET](../messages/common.md#PARAM_EXT_SET)) for cameras that support different settings/options (ISO, video/image resolution, frame rates, encoding format, etc.) for image and video capture [camera modes](../messages/common.md#CAMERA_MODE).<br><br>If it is not defined then [MAV_CMD_SET_CAMERA_MODE](../messages/common.md#MAV_CMD_SET_CAMERA_MODE) can be used to set the mode instead (this command is ignored if `CAM_MODE` is defined), and any configuration settings/options will be common to all modes.<br><br>There is an example `CAM_MODE` definition with additional detail [below](#cam_mode_example).
CAM_SHUTTERSPD | Shutter speed
CAM_VIDRES | Video Resolution (for video capture)
CAM_WBMODE | White Balance Mode
Expand Down Expand Up @@ -158,7 +159,10 @@ There are cases where an option change requires a parameter to be updated. For e

This tells the GCS that when the `CAM_EXPMODE` parameter changes, the `CAM_APERTURE`, `CAM_SHUTTERSPD` and the `CAM_ISO` parameters must be updated (requested from the camera).

#### Range Limit
#### Range Limit {#cam_mode_example}

A *range limit* allows you to specify the valid options of one parameter based on the value of any other.
For example, below we describe how you might set the available ISO options in video mode as compared to photo mode.

Suppose your camera has the following ISO options:

Expand All @@ -181,7 +185,9 @@ Suppose your camera has the following ISO options:
</parameter>
```

But this full range is only available when in *Photo Mode*. For whatever reason, when the camera is set to *Video Mode*, only a subset of the above range is valid. In this case, you would use the `parameterrange` element:
But this full range is only available when in *Photo Mode*.
For whatever reason, when the camera is set to *Video Mode*, only a subset of the above range is valid.
In this case, you would use the `parameterrange` element:

```XML
<parameter name="CAM_MODE" type="uint32" default="1" control="0">
Expand Down Expand Up @@ -209,7 +215,9 @@ But this full range is only available when in *Photo Mode*. For whatever reason,

This indicates to the GCS that when the `CAM_MODE` parameter is set to *Video*, only the given range for the `CAM_ISO` parameter is valid. It additionally gives a condition that this is only the case when the `CAM_EXPOSURE` mode is set to *Manual* (1).

This example also tells the GCS not to display this parameter to the user (`control=“0”`). Camera Mode is a standard parameter defined in the [CAMERA\_INFORMATION](../messages/common.md#CAMERA_INFORMATION) message and it’s handled by the GCS in that way. The parameter definition above was created in order to tell the GCS the rules that are applied when changes to the camera mode occur.
This example also tells the GCS not to display this parameter to the user (`control=“0”`).
Camera Mode is a standard parameter defined in the [CAMERA\_INFORMATION](../messages/common.md#CAMERA_INFORMATION) message and it’s handled by the GCS in that way.
The parameter definition above was created in order to tell the GCS the rules that are applied when changes to the camera mode occur.

### Localization

Expand Down