[libcamera-devel,SimpleCam,2/4] simple-cam: Improve documentation of validate/configure
diff mbox series

Message ID 20210824142450.3157833-3-kieran.bingham@ideasonboard.com
State Accepted
Headers show
Series
  • Improve CameraManager usage and Doc
Related show

Commit Message

Kieran Bingham Aug. 24, 2021, 2:24 p.m. UTC
The validation and configure phase has a couple of grammatical errors.
Fix them and reflow the text accordingly.

Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
---
 simple-cam.cpp | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

Comments

Jacopo Mondi Aug. 25, 2021, 9:24 a.m. UTC | #1
On Tue, Aug 24, 2021 at 03:24:48PM +0100, Kieran Bingham wrote:
> The validation and configure phase has a couple of grammatical errors.
> Fix them and reflow the text accordingly.
>
> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
> ---
>  simple-cam.cpp | 9 +++++----
>  1 file changed, 5 insertions(+), 4 deletions(-)
>
> diff --git a/simple-cam.cpp b/simple-cam.cpp
> index 5c16db67700c..2e646a5485c9 100644
> --- a/simple-cam.cpp
> +++ b/simple-cam.cpp
> @@ -255,16 +255,17 @@ int main()
>  #endif
>
>  	/*
> -	 * Validating a CameraConfiguration -before- applying it adjust it
> -	 * to a valid configuration as closest as possible to the requested one.
> +	 * Validating a CameraConfiguration -before- applying it will adjust it
> +	 * to a valid configuration which is as close as possible to the one
> +	 * requested.

I feel a bit silly for arguing about English language with you but
in my mind this sounds better as "to the requested one" ?

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

Thanks
  j


>  	 */
>  	config->validate();
>  	std::cout << "Validated viewfinder configuration is: "
>  		  << streamConfig.toString() << std::endl;
>
>  	/*
> -	 * Once we have a validate configuration, we can apply it
> -	 * to the Camera.
> +	 * Once we have a validated configuration, we can apply it to the
> +	 * Camera.
>  	 */
>  	camera->configure(config.get());
>
> --
> 2.30.2
>
Laurent Pinchart Aug. 25, 2021, 7:59 p.m. UTC | #2
Hi Kieran,

Thank you for the patch.

On Tue, Aug 24, 2021 at 03:24:48PM +0100, Kieran Bingham wrote:
> The validation and configure phase has a couple of grammatical errors.
> Fix them and reflow the text accordingly.
> 
> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>

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

> ---
>  simple-cam.cpp | 9 +++++----
>  1 file changed, 5 insertions(+), 4 deletions(-)
> 
> diff --git a/simple-cam.cpp b/simple-cam.cpp
> index 5c16db67700c..2e646a5485c9 100644
> --- a/simple-cam.cpp
> +++ b/simple-cam.cpp
> @@ -255,16 +255,17 @@ int main()
>  #endif
>  
>  	/*
> -	 * Validating a CameraConfiguration -before- applying it adjust it
> -	 * to a valid configuration as closest as possible to the requested one.
> +	 * Validating a CameraConfiguration -before- applying it will adjust it
> +	 * to a valid configuration which is as close as possible to the one
> +	 * requested.
>  	 */
>  	config->validate();
>  	std::cout << "Validated viewfinder configuration is: "
>  		  << streamConfig.toString() << std::endl;
>  
>  	/*
> -	 * Once we have a validate configuration, we can apply it
> -	 * to the Camera.
> +	 * Once we have a validated configuration, we can apply it to the
> +	 * Camera.
>  	 */
>  	camera->configure(config.get());
>
Kieran Bingham Aug. 25, 2021, 9:07 p.m. UTC | #3
On 25/08/2021 10:24, Jacopo Mondi wrote:
> On Tue, Aug 24, 2021 at 03:24:48PM +0100, Kieran Bingham wrote:
>> The validation and configure phase has a couple of grammatical errors.
>> Fix them and reflow the text accordingly.
>>
>> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
>> ---
>>  simple-cam.cpp | 9 +++++----
>>  1 file changed, 5 insertions(+), 4 deletions(-)
>>
>> diff --git a/simple-cam.cpp b/simple-cam.cpp
>> index 5c16db67700c..2e646a5485c9 100644
>> --- a/simple-cam.cpp
>> +++ b/simple-cam.cpp
>> @@ -255,16 +255,17 @@ int main()
>>  #endif
>>
>>  	/*
>> -	 * Validating a CameraConfiguration -before- applying it adjust it
>> -	 * to a valid configuration as closest as possible to the requested one.
>> +	 * Validating a CameraConfiguration -before- applying it will adjust it
>> +	 * to a valid configuration which is as close as possible to the one
>> +	 * requested.
> 
> I feel a bit silly for arguing about English language with you but
> in my mind this sounds better as "to the requested one" ?

Not knowing the names of the grammar rules involved here, I don't know
/why/ I believe my version is correct, but I do ;-)

My single "right/wrong" signal in my head tells me my version is right.

I've asked Keri if she knows the rules to describe the word ordering
here. She's better at languages than me ;-)


Ok, so we came up with the fact that it's related to being a
pronoun/verb combination (or is it an adverb?), and really it's a
shortened sentence. The full sentence would have been expected to be:

"""
to a valid configuration which is as close as possible to the one (that
has been) requested.
"""

Which is why it can't be:
"""
to a valid configuration which is as close as possible to the requested
one (..that has been...).
"""


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

Thanks, collected and merged this series.

> 
> Thanks
>   j
> 
> 
>>  	 */
>>  	config->validate();
>>  	std::cout << "Validated viewfinder configuration is: "
>>  		  << streamConfig.toString() << std::endl;
>>
>>  	/*
>> -	 * Once we have a validate configuration, we can apply it
>> -	 * to the Camera.
>> +	 * Once we have a validated configuration, we can apply it to the
>> +	 * Camera.
>>  	 */
>>  	camera->configure(config.get());
>>
>> --
>> 2.30.2
>>

Patch
diff mbox series

diff --git a/simple-cam.cpp b/simple-cam.cpp
index 5c16db67700c..2e646a5485c9 100644
--- a/simple-cam.cpp
+++ b/simple-cam.cpp
@@ -255,16 +255,17 @@  int main()
 #endif
 
 	/*
-	 * Validating a CameraConfiguration -before- applying it adjust it
-	 * to a valid configuration as closest as possible to the requested one.
+	 * Validating a CameraConfiguration -before- applying it will adjust it
+	 * to a valid configuration which is as close as possible to the one
+	 * requested.
 	 */
 	config->validate();
 	std::cout << "Validated viewfinder configuration is: "
 		  << streamConfig.toString() << std::endl;
 
 	/*
-	 * Once we have a validate configuration, we can apply it
-	 * to the Camera.
+	 * Once we have a validated configuration, we can apply it to the
+	 * Camera.
 	 */
 	camera->configure(config.get());