[libcamera-devel] libcamera: request: Fix documentation of controls() method
diff mbox series

Message ID 20210318141124.12014-1-m.cichy@pengutronix.de
State Accepted
Headers show
Series
  • [libcamera-devel] libcamera: request: Fix documentation of controls() method
Related show

Commit Message

Marian Cichy March 18, 2021, 2:11 p.m. UTC
The documentation of the controls() method refers to the methods
ControlList::operator[]() and ControlList::update(), which do not exist.

Instead refer to ControlList::get() and ControlList::set() to achieve a
similar documentation.

Signed-off-by: Marian Cichy <m.cichy@pengutronix.de>
---
 src/libcamera/request.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Marian Cichy March 18, 2021, 2:17 p.m. UTC | #1
On 3/18/21 3:11 PM, Marian Cichy wrote:
> The documentation of the controls() method refers to the methods
> ControlList::operator[]() and ControlList::update(), which do not exist.
>
> Instead refer to ControlList::get() and ControlList::set() to achieve a
> similar documentation.
>
> Signed-off-by: Marian Cichy <m.cichy@pengutronix.de>
> ---
>   src/libcamera/request.cpp | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/src/libcamera/request.cpp b/src/libcamera/request.cpp
> index 24c3694d..fe521ae2 100644
> --- a/src/libcamera/request.cpp
> +++ b/src/libcamera/request.cpp
> @@ -138,8 +138,8 @@ void Request::reuse(ReuseFlag flags)
>    *
>    * Requests store a list of controls to be applied to all frames captured for
>    * the request. They are created with an empty list of controls that can be
> - * accessed through this method and updated with ControlList::operator[]() or
> - * ControlList::update().
> + * accessed through this method. Control values can be retrieved using
> + * Control::get() and updated using Control::set().

this was supposed to be ControlList::get() and ControlList::set() as in 
the commit message. Sorry!

>    *
>    * Only controls supported by the camera to which this request will be
>    * submitted shall be included in the controls list. Attempting to add an
Laurent Pinchart March 18, 2021, 11:38 p.m. UTC | #2
Hi Marian,

Thank you for the patch.

On Thu, Mar 18, 2021 at 03:17:01PM +0100, Marian Cichy wrote:
> On 3/18/21 3:11 PM, Marian Cichy wrote:
> > The documentation of the controls() method refers to the methods
> > ControlList::operator[]() and ControlList::update(), which do not exist.
> >
> > Instead refer to ControlList::get() and ControlList::set() to achieve a
> > similar documentation.
> >

I'll add

Fixes: a8c40942b99e ("libcamera: controls: Improve the API towards applications")

> > Signed-off-by: Marian Cichy <m.cichy@pengutronix.de>
> > ---
> >   src/libcamera/request.cpp | 4 ++--
> >   1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/src/libcamera/request.cpp b/src/libcamera/request.cpp
> > index 24c3694d..fe521ae2 100644
> > --- a/src/libcamera/request.cpp
> > +++ b/src/libcamera/request.cpp
> > @@ -138,8 +138,8 @@ void Request::reuse(ReuseFlag flags)
> >    *
> >    * Requests store a list of controls to be applied to all frames captured for
> >    * the request. They are created with an empty list of controls that can be
> > - * accessed through this method and updated with ControlList::operator[]() or
> > - * ControlList::update().
> > + * accessed through this method. Control values can be retrieved using
> > + * Control::get() and updated using Control::set().
> 
> this was supposed to be ControlList::get() and ControlList::set() as in 
> the commit message. Sorry!

Fix applied in my branch.

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

> >    *
> >    * Only controls supported by the camera to which this request will be
> >    * submitted shall be included in the controls list. Attempting to add an

Patch
diff mbox series

diff --git a/src/libcamera/request.cpp b/src/libcamera/request.cpp
index 24c3694d..fe521ae2 100644
--- a/src/libcamera/request.cpp
+++ b/src/libcamera/request.cpp
@@ -138,8 +138,8 @@  void Request::reuse(ReuseFlag flags)
  *
  * Requests store a list of controls to be applied to all frames captured for
  * the request. They are created with an empty list of controls that can be
- * accessed through this method and updated with ControlList::operator[]() or
- * ControlList::update().
+ * accessed through this method. Control values can be retrieved using
+ * Control::get() and updated using Control::set().
  *
  * Only controls supported by the camera to which this request will be
  * submitted shall be included in the controls list. Attempting to add an