From a84061305956b803f583989ce6972bed438488ee Mon Sep 17 00:00:00 2001 From: Gus Grubba Date: Mon, 14 Jan 2019 21:33:51 -0500 Subject: [PATCH 1/5] Documenting the common parameter CAM_MODE. --- en/services/camera_def.md | 1 + 1 file changed, 1 insertion(+) diff --git a/en/services/camera_def.md b/en/services/camera_def.md index a1be59b6d..56a1e64f5 100644 --- a/en/services/camera_def.md +++ b/en/services/camera_def.md @@ -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 more 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 you 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. CAM_SHUTTERSPD | Shutter speed CAM_VIDRES | Video Resolution (for video capture) CAM_WBMODE | White Balance Mode From 7719fa0f8e8c3660c6dab05d5d77b45537d2f2af Mon Sep 17 00:00:00 2001 From: Gus Grubba Date: Mon, 14 Jan 2019 21:36:21 -0500 Subject: [PATCH 2/5] Fix typo --- en/services/camera_def.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/en/services/camera_def.md b/en/services/camera_def.md index 56a1e64f5..cd4cad085 100644 --- a/en/services/camera_def.md +++ b/en/services/camera_def.md @@ -97,7 +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 more 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 you 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. +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 more 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. CAM_SHUTTERSPD | Shutter speed CAM_VIDRES | Video Resolution (for video capture) CAM_WBMODE | White Balance Mode From 42858d906b0934adbd527e629a7dc0cbd75bdffa Mon Sep 17 00:00:00 2001 From: Gus Grubba Date: Mon, 14 Jan 2019 21:38:04 -0500 Subject: [PATCH 3/5] Yet another typo. --- en/services/camera_def.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/en/services/camera_def.md b/en/services/camera_def.md index cd4cad085..08ce3a96a 100644 --- a/en/services/camera_def.md +++ b/en/services/camera_def.md @@ -97,7 +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 more 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. +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. CAM_SHUTTERSPD | Shutter speed CAM_VIDRES | Video Resolution (for video capture) CAM_WBMODE | White Balance Mode From 93657afb42509e061ad07ac103bd5762e9786a1d Mon Sep 17 00:00:00 2001 From: Hamish Willee Date: Wed, 30 Jan 2019 09:47:48 +1100 Subject: [PATCH 4/5] Add inverted cam mode doc --- en/services/camera_def.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/en/services/camera_def.md b/en/services/camera_def.md index 08ce3a96a..e0334c717 100644 --- a/en/services/camera_def.md +++ b/en/services/camera_def.md @@ -97,7 +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. +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).

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.

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 @@ -159,7 +159,7 @@ 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 +#### Mode-Specific Range Limit {#cam_mode_example} Suppose your camera has the following ISO options: @@ -210,7 +210,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 From 4291738850d78e6a7b4dd3399ec4bf2f23f9d81d Mon Sep 17 00:00:00 2001 From: Hamish Willee Date: Thu, 21 Feb 2019 14:12:27 +1100 Subject: [PATCH 5/5] CameraDef: Clarify range limits not just for modes --- en/services/camera_def.md | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/en/services/camera_def.md b/en/services/camera_def.md index e0334c717..c830c57e6 100644 --- a/en/services/camera_def.md +++ b/en/services/camera_def.md @@ -159,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). -#### Mode-Specific Range Limit {#cam_mode_example} +#### 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: @@ -182,7 +185,9 @@ Suppose your camera has the following ISO options: ``` -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