[libcamera-devel,v2] ipa: raspberrypi: Use boolean constructor for AeEnable ControlInfo
diff mbox series

Message ID 20210812042249.1073932-1-paul.elder@ideasonboard.com
State Superseded
Headers show
Series
  • [libcamera-devel,v2] ipa: raspberrypi: Use boolean constructor for AeEnable ControlInfo
Related show

Commit Message

Paul Elder Aug. 12, 2021, 4:22 a.m. UTC
The min-max constructor is not the proper constructor for boolean
ControlInfos. Use the proper boolean constructor.

Signed-off-by: Paul Elder <paul.elder@ideasonboard.com>

---
Changes in v2:
- whoops, sorry v1 was based on Jacopo's "libcamera: Initialize controls
  in the IPA"
---
 include/libcamera/ipa/raspberrypi.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Jacopo Mondi Aug. 12, 2021, 7:38 a.m. UTC | #1
Hi Paul,

On Thu, Aug 12, 2021 at 01:22:49PM +0900, Paul Elder wrote:
> The min-max constructor is not the proper constructor for boolean
> ControlInfos. Use the proper boolean constructor.
>
> Signed-off-by: Paul Elder <paul.elder@ideasonboard.com>
>
> ---
> Changes in v2:
> - whoops, sorry v1 was based on Jacopo's "libcamera: Initialize controls
>   in the IPA"

As I'm about to merge that series, the first version you sent might
apply better :)

Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>

Thanks
   j

> ---
>  include/libcamera/ipa/raspberrypi.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/include/libcamera/ipa/raspberrypi.h b/include/libcamera/ipa/raspberrypi.h
> index a8790000..7ef14e57 100644
> --- a/include/libcamera/ipa/raspberrypi.h
> +++ b/include/libcamera/ipa/raspberrypi.h
> @@ -28,7 +28,7 @@ namespace RPi {
>   * unsupported control is encountered.
>   */
>  static const ControlInfoMap Controls = {
> -	{ &controls::AeEnable, ControlInfo(false, true) },
> +	{ &controls::AeEnable, ControlInfo({false, true}, true) },
>  	{ &controls::ExposureTime, ControlInfo(0, 999999) },
>  	{ &controls::AnalogueGain, ControlInfo(1.0f, 32.0f) },
>  	{ &controls::AeMeteringMode, ControlInfo(controls::AeMeteringModeValues) },
> --
> 2.27.0
>

Patch
diff mbox series

diff --git a/include/libcamera/ipa/raspberrypi.h b/include/libcamera/ipa/raspberrypi.h
index a8790000..7ef14e57 100644
--- a/include/libcamera/ipa/raspberrypi.h
+++ b/include/libcamera/ipa/raspberrypi.h
@@ -28,7 +28,7 @@  namespace RPi {
  * unsupported control is encountered.
  */
 static const ControlInfoMap Controls = {
-	{ &controls::AeEnable, ControlInfo(false, true) },
+	{ &controls::AeEnable, ControlInfo({false, true}, true) },
 	{ &controls::ExposureTime, ControlInfo(0, 999999) },
 	{ &controls::AnalogueGain, ControlInfo(1.0f, 32.0f) },
 	{ &controls::AeMeteringMode, ControlInfo(controls::AeMeteringModeValues) },