From 7bb4d7144c3e7c469310d4fd473653fb6cbfc1b8 Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Mon, 14 Oct 2019 00:33:03 +0300 Subject: test: v4l2_videodevice: controls: Use correct control range in check MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A value check on the V4L2_CID_CONTRAST control is using the brightness control range. Fix it. Signed-off-by: Laurent Pinchart Reviewed-by: Niklas Söderlund Reviewed-by: Jacopo Mondi --- test/v4l2_videodevice/controls.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test/v4l2_videodevice') diff --git a/test/v4l2_videodevice/controls.cpp b/test/v4l2_videodevice/controls.cpp index e59387ab..3add6e67 100644 --- a/test/v4l2_videodevice/controls.cpp +++ b/test/v4l2_videodevice/controls.cpp @@ -87,7 +87,7 @@ protected: } if (ctrls.get(V4L2_CID_BRIGHTNESS) != brightness.range().min() || - ctrls.get(V4L2_CID_CONTRAST) != brightness.range().max() || + ctrls.get(V4L2_CID_CONTRAST) != contrast.range().max() || ctrls.get(V4L2_CID_SATURATION) != saturation.range().min().get() + 1) { cerr << "Controls not updated when set" << endl; return TestFail; -- cgit v1.2.1