[libcamera-devel,05/13] libcamera: controls: Add AeEnable

Message ID 20190828011710.32128-6-niklas.soderlund@ragnatech.se
State Superseded
Headers show
Series
  • libcamera: ipa: Add basic IPA support
Related show

Commit Message

Niklas Söderlund Aug. 28, 2019, 1:17 a.m. UTC
Add a control to turn Auto Exposure on or off.

Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
---
 include/libcamera/control_ids.h | 1 +
 src/libcamera/controls.cpp      | 7 +++++++
 2 files changed, 8 insertions(+)

Comments

Jacopo Mondi Aug. 28, 2019, 4:10 p.m. UTC | #1
Hi Niklas,

On Wed, Aug 28, 2019 at 03:17:02AM +0200, Niklas Söderlund wrote:
> Add a control to turn Auto Exposure on or off.
>
> Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
> ---
>  include/libcamera/control_ids.h | 1 +
>  src/libcamera/controls.cpp      | 7 +++++++
>  2 files changed, 8 insertions(+)
>
> diff --git a/include/libcamera/control_ids.h b/include/libcamera/control_ids.h
> index 75b6a2d5cafeca72..8cd44e571f705ac5 100644
> --- a/include/libcamera/control_ids.h
> +++ b/include/libcamera/control_ids.h
> @@ -13,6 +13,7 @@
>  namespace libcamera {
>
>  enum ControlId {
> +	AeEnable,
>  	AwbEnable,
>  	Brightness,
>  	Contrast,
> diff --git a/src/libcamera/controls.cpp b/src/libcamera/controls.cpp
> index 727fdbd9450d2f40..54efef1bb337e945 100644
> --- a/src/libcamera/controls.cpp
> +++ b/src/libcamera/controls.cpp
> @@ -186,6 +186,13 @@ std::string ControlValue::toString() const
>   * \brief Numerical control ID
>   */
>
> +/**
> + * \var AeEnable
> + * ControlType: Bool
> + *
> + * Enables or disables the AE. See also \a libcamera::ControlId::ManualExposure.
> + */
> +

I would now specify (even if it might seems obvious) in the
ManualExposure control documentation that the control is only taken
into account if AE is disabled.


>  /**
>   * \var AwbEnable
>   * ControlType: Bool
> --
> 2.22.1
>
> _______________________________________________
> libcamera-devel mailing list
> libcamera-devel@lists.libcamera.org
> https://lists.libcamera.org/listinfo/libcamera-devel
Niklas Söderlund Aug. 29, 2019, 8:11 p.m. UTC | #2
Hi Jacopo,

Thanks for your feedback.

On 2019-08-28 18:10:03 +0200, Jacopo Mondi wrote:
> Hi Niklas,
> 
> On Wed, Aug 28, 2019 at 03:17:02AM +0200, Niklas Söderlund wrote:
> > Add a control to turn Auto Exposure on or off.
> >
> > Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
> > ---
> >  include/libcamera/control_ids.h | 1 +
> >  src/libcamera/controls.cpp      | 7 +++++++
> >  2 files changed, 8 insertions(+)
> >
> > diff --git a/include/libcamera/control_ids.h b/include/libcamera/control_ids.h
> > index 75b6a2d5cafeca72..8cd44e571f705ac5 100644
> > --- a/include/libcamera/control_ids.h
> > +++ b/include/libcamera/control_ids.h
> > @@ -13,6 +13,7 @@
> >  namespace libcamera {
> >
> >  enum ControlId {
> > +	AeEnable,
> >  	AwbEnable,
> >  	Brightness,
> >  	Contrast,
> > diff --git a/src/libcamera/controls.cpp b/src/libcamera/controls.cpp
> > index 727fdbd9450d2f40..54efef1bb337e945 100644
> > --- a/src/libcamera/controls.cpp
> > +++ b/src/libcamera/controls.cpp
> > @@ -186,6 +186,13 @@ std::string ControlValue::toString() const
> >   * \brief Numerical control ID
> >   */
> >
> > +/**
> > + * \var AeEnable
> > + * ControlType: Bool
> > + *
> > + * Enables or disables the AE. See also \a libcamera::ControlId::ManualExposure.
> > + */
> > +
> 
> I would now specify (even if it might seems obvious) in the
> ManualExposure control documentation that the control is only taken
> into account if AE is disabled.

Good point, will do so for v2.

> 
> 
> >  /**
> >   * \var AwbEnable
> >   * ControlType: Bool
> > --
> > 2.22.1
> >
> > _______________________________________________
> > libcamera-devel mailing list
> > libcamera-devel@lists.libcamera.org
> > https://lists.libcamera.org/listinfo/libcamera-devel

Patch

diff --git a/include/libcamera/control_ids.h b/include/libcamera/control_ids.h
index 75b6a2d5cafeca72..8cd44e571f705ac5 100644
--- a/include/libcamera/control_ids.h
+++ b/include/libcamera/control_ids.h
@@ -13,6 +13,7 @@ 
 namespace libcamera {
 
 enum ControlId {
+	AeEnable,
 	AwbEnable,
 	Brightness,
 	Contrast,
diff --git a/src/libcamera/controls.cpp b/src/libcamera/controls.cpp
index 727fdbd9450d2f40..54efef1bb337e945 100644
--- a/src/libcamera/controls.cpp
+++ b/src/libcamera/controls.cpp
@@ -186,6 +186,13 @@  std::string ControlValue::toString() const
  * \brief Numerical control ID
  */
 
+/**
+ * \var AeEnable
+ * ControlType: Bool
+ *
+ * Enables or disables the AE. See also \a libcamera::ControlId::ManualExposure.
+ */
+
 /**
  * \var AwbEnable
  * ControlType: Bool