From patchwork Sun Oct 13 23:27:51 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 2187 Return-Path: Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 7C67D6196E for ; Mon, 14 Oct 2019 01:28:04 +0200 (CEST) Received: from pendragon.bb.dnainternet.fi (dfj612yhrgyx302h3jwwy-3.rev.dnainternet.fi [IPv6:2001:14ba:21f5:5b00:ce28:277f:58d7:3ca4]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 28D7133A for ; Mon, 14 Oct 2019 01:28:04 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1571009284; bh=/H7aqonVgd5lCv5aiG8/6QeUPuxnfX0i39jGFD3TiPw=; h=From:To:Subject:Date:In-Reply-To:References:From; b=tjdA7i0IqGUSjDhpDhyjqJw7Xo/J92welx/GuyKJBsCpCdAJ+Z1ggqQtGr65bcDJZ hgJWloCbqusxOb9E797c7U6hBdpfI3txbqjMjVQe99Pt1FItFv5wzYfHayzTMjg/uO KtXtHVwXpJelwD3UV33ts7NLq51kby6qQZ2gOw/A= From: Laurent Pinchart To: libcamera-devel@lists.libcamera.org Date: Mon, 14 Oct 2019 02:27:51 +0300 Message-Id: <20191013232755.3292-6-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20191013232755.3292-1-laurent.pinchart@ideasonboard.com> References: <20191013232755.3292-1-laurent.pinchart@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 05/10] test: v4l2_videodevice: controls: Use correct control range in check X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Oct 2019 23:28:04 -0000 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(-) diff --git a/test/v4l2_videodevice/controls.cpp b/test/v4l2_videodevice/controls.cpp index e59387ab9eba..3add6e67d2cf 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;