[libcamera-devel] cam: Print one property per line

Message ID 20200318163040.629527-1-jacopo@jmondi.org
State Accepted
Commit cf66c4406bbd66b885090d2ddbe2b72b6fb0492d
Headers show
Series
  • [libcamera-devel] cam: Print one property per line
Related show

Commit Message

Jacopo Mondi March 18, 2020, 4:30 p.m. UTC
When printing camera properties, print one property per line.

Fixes: a14b6baca9af ("cam: Add option to list camera properties")
Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
---
 src/cam/main.cpp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Niklas Söderlund March 19, 2020, 12:08 a.m. UTC | #1
Hi Jacopo,

Thanks for your work.

On 2020-03-18 17:30:40 +0100, Jacopo Mondi wrote:
> When printing camera properties, print one property per line.

:-)

> 
> Fixes: a14b6baca9af ("cam: Add option to list camera properties")
> Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>

Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>

> ---
>  src/cam/main.cpp | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/src/cam/main.cpp b/src/cam/main.cpp
> index ea6f7914839c..25282a04dcae 100644
> --- a/src/cam/main.cpp
> +++ b/src/cam/main.cpp
> @@ -284,7 +284,8 @@ int CamApp::listProperties()
>  		const ControlId *id = properties::properties.at(prop.first);
>  		const ControlValue &value = prop.second;
>  
> -		std::cout << "Property: " << id->name() << " = " << value.toString();
> +		std::cout << "Property: " << id->name() << " = "
> +			  << value.toString() << std::endl;
>  	}
>  
>  	return 0;
> -- 
> 2.25.1
> 
> _______________________________________________
> libcamera-devel mailing list
> libcamera-devel@lists.libcamera.org
> https://lists.libcamera.org/listinfo/libcamera-devel

Patch

diff --git a/src/cam/main.cpp b/src/cam/main.cpp
index ea6f7914839c..25282a04dcae 100644
--- a/src/cam/main.cpp
+++ b/src/cam/main.cpp
@@ -284,7 +284,8 @@  int CamApp::listProperties()
 		const ControlId *id = properties::properties.at(prop.first);
 		const ControlValue &value = prop.second;
 
-		std::cout << "Property: " << id->name() << " = " << value.toString();
+		std::cout << "Property: " << id->name() << " = "
+			  << value.toString() << std::endl;
 	}
 
 	return 0;