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 3 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
1 change: 1 addition & 0 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. Invariably, when switching modes, some of the camera parameters that are available for one mode is not available for the other. Video mode may offer video recording resolutions while photo mode may offer image capture size, format, compression, etc. If you simply use the MAVLink command [MAV_CMD_SET_CAMERA_MODE](../messages/common.md#MAV_CMD_SET_CAMERA_MODE), you won't have a chance to let the GCS know that. If your camera does have different parameters and/or options for [CAMERA_MODE_IMAGE](../messages/common.md#CAMERA_MODE) or [CAMERA_MODE_VIDEO](../messages/common.md#CAMERA_MODE), you may want to use this parameter (along with the proper exclusion rules) instead. The CGS will look to see if this parameter is exposed. If it is, it will use it instead of [MAV_CMD_SET_CAMERA_MODE](../messages/common.md#MAV_CMD_SET_CAMERA_MODE). If the parameter is not exposed, [MAV_CMD_SET_CAMERA_MODE](../messages/common.md#MAV_CMD_SET_CAMERA_MODE) will be used instead. See an example of a definition of `CAM_MODE` below.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo:: one mode are not available for the other.

Copy link
Collaborator

@hamishwillee hamishwillee Jan 15, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about:

Camera Mode Setting Options. This parameter allows you to specify the settings (and their options) that can be set for image capture mode and for video capture mode (CAMERA_MODE). The parameter might be used to specify image capture sizes, image/video formats, compression levels, ISO values, shutter speeds, etc. that are relevant to each of the modes. If CAM_MODE is not defined then the camera will not have mode-configurable settings.
There is an example CAM_MODE definition below.

Note, if you need an anchor for the cam_mode_example you can get an anchor from a heading or make one using a span - e.g. <span id="cam_mode_example"></span>.

Copy link
Collaborator

@hamishwillee hamishwillee Jan 15, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few more thoughts

  • There is just one part I may have missed, and that is that if you have (say) CAM_SHUTTERSPD but not CAM_MODE, my understanding is that CAM_SHUTTERSPD would be used in all modes. Correct?
  • Is the name of this parameter fixed? CAM_MODE is not very descriptive. Perhaps CAM_MODE_SETTINGS

If I'm correct about the first point above, how about:

Camera Mode Setting Options. This parameter allows you to specify the settings (and their options) that can be set for image capture mode and for video capture mode (CAMERA_MODE). The parameter might be used to specify image capture sizes, image/video formats, compression levels, ISO values, shutter speeds, etc. that are relevant to each of the modes. If CAM_MODE is not defined then the camera will not have mode-configurable settings - settings like CAM_SHUTTERSPD will apply to all modes (if defined in both places, the CAM_MODE setting is used).
There is an example CAM_MODE definition below.

CAM_SHUTTERSPD | Shutter speed
CAM_VIDRES | Video Resolution (for video capture)
CAM_WBMODE | White Balance Mode
Expand Down