Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp884787rdb; Wed, 6 Dec 2023 02:47:16 -0800 (PST) X-Google-Smtp-Source: AGHT+IGYKuRz2pk2uck0ILXptLyg79fi6cwQtMUb7Ovccp16uS7EKy2MQlZ9sq5NCFJzZpNsMbxQ X-Received: by 2002:a05:6a00:99d:b0:6ce:3f02:10a3 with SMTP id u29-20020a056a00099d00b006ce3f0210a3mr837352pfg.8.1701859635979; Wed, 06 Dec 2023 02:47:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701859635; cv=none; d=google.com; s=arc-20160816; b=LeS4xcyWs+dbh/9KKE48mSVGXLrqGEo3o/s8eJQBGcr1ZTv1suFlGrdCYVXz/f/xv6 yQqbPQk5SBO/ot25hRrFHAVz3MLIkP73UZoWHa2ejgItvG1c+tquqs8a8jPNohzVXEpx WrhwPWFUTw9PoSnDFmx4ykTxqr+AIHA87F3SM1adgF7zUXAMHsxPLapPlJClAkLgOOK8 tRT7Nw9c8tMTHQjKENT+KN3b8yIdgsF3Fqwg9IkLPrFa8qhG8JGRnZ3cdiszPWlwImho mjUv3V7EFCrCC+JrwxXsHXo2W8EzR32WaWTQajuGHtVTN3blcwj8zI/4l/jrzE4lraZ/ 6ixA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=xB4pyhnmmxgc1n/G8qWqMd0ZwrmuQeSC94hxbH10YNE=; fh=M/4CRKlsQR53kOvbvsHfGDOrpcvBUt/h3Rh4tB3zkdA=; b=M0Pv0cDk1GW0Blvp6F+TIR5wUYMssl7XVsbtuRDt9kF3ekJlelPNDpyfpaSXpI391h foJKLUmog+b0JQZIEoH/hhjFdiu+HcSs18t4dJ3M8ZT1RENHbPKNYsYjNIB8mMThvT37 /Aoa4CaYHC9YDb6WFxv3bgGHQ6dy7iFbnfcYSWxfmfgljvkudzAM4RvnQ7E/xOBdXj46 3BIKXyy+kPJ1FPrutUIgCmrSuyt9B5ATzufkOC8TMzCpwzWFZthMTDSUccR1LefmFn4X 7o+d8PrsJrOxEXBn3aoOlBFFMhbIea3evyU9HKk3/R3ygqHebbHDdW5cbLUNUEyFqd1m vaGg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="otx5oY/7"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id bq19-20020a056a02045300b0057942bfab4dsi6034362pgb.395.2023.12.06.02.47.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Dec 2023 02:47:15 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="otx5oY/7"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 77F18802C653; Wed, 6 Dec 2023 02:47:14 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1377673AbjLFKrC (ORCPT + 99 others); Wed, 6 Dec 2023 05:47:02 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34500 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1377759AbjLFKqh (ORCPT ); Wed, 6 Dec 2023 05:46:37 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E2FBB173E for ; Wed, 6 Dec 2023 02:46:23 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E89C7C433CD; Wed, 6 Dec 2023 10:46:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1701859583; bh=4zleTS1syp3MMWCgpz68nisdsjLtNx642uQ5ALXPbwU=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=otx5oY/7aOYzUCHm0+Wal4grzP0hALifiz/kblIrGWFMdrlKLNZXNQ1jYyOI6FGgd CBMEdpiBDbPuk01/0Y8tIwQtFePt7FhXYp/ItEq5Ib4n/qyJyVuS4wHNByXzceg2BZ 1zSmoeHqeSG2u4dI2qVJ1a+TKAW/kqsXCcHpeEfJhOazEyt6umNIrP9YwMOQokevp8 Kv5J7LNG+rxdz/YZ0lzUYnnIn+n1QIVLf3YShrMG017Nd4X0/t38YDK6KYvqLFMpWY JhTUuZuZac+rCJtG0sBVBJ9is0WeEjlVzfzf9YPOjmQbUsHstWz42JVDEo6Fw9UFlG e+gWswO6Uy6WA== From: Benjamin Tissoires Date: Wed, 06 Dec 2023 11:45:59 +0100 Subject: [PATCH v2 08/15] selftests/hid: tablets: set initial data for tilt/twist MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20231206-wip-selftests-v2-8-c0350c2f5986@kernel.org> References: <20231206-wip-selftests-v2-0-c0350c2f5986@kernel.org> In-Reply-To: <20231206-wip-selftests-v2-0-c0350c2f5986@kernel.org> To: Jiri Kosina , Benjamin Tissoires , Shuah Khan , Peter Hutterer Cc: linux-input@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, Benjamin Tissoires X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=ed25519-sha256; t=1701859565; l=1669; i=bentiss@kernel.org; s=20230215; h=from:subject:message-id; bh=4zleTS1syp3MMWCgpz68nisdsjLtNx642uQ5ALXPbwU=; b=wFyaODHbKOxoT5j8xyDHC2qJHzmHuEprhItc8UzFlNeXgJ0cKsxGN/s1i6P464tR5E5LIipA9 kGaSwNjeaujBXRroxcW2ahvrOKt0aUXWsX4NnvDwU62jds6r2il1ZIh X-Developer-Key: i=bentiss@kernel.org; a=ed25519; pk=7D1DyAVh6ajCkuUTudt/chMuXWIJHlv2qCsRkIizvFw= X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Wed, 06 Dec 2023 02:47:14 -0800 (PST) Avoids getting a null event when these usages are set Reviewed-by: Peter Hutterer Signed-off-by: Benjamin Tissoires --- no changes in v2 --- tools/testing/selftests/hid/tests/test_tablet.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/tools/testing/selftests/hid/tests/test_tablet.py b/tools/testing/selftests/hid/tests/test_tablet.py index cb3955bf0ec5..0ddf82695ed9 100644 --- a/tools/testing/selftests/hid/tests/test_tablet.py +++ b/tools/testing/selftests/hid/tests/test_tablet.py @@ -276,9 +276,9 @@ class Pen(object): self.barrelswitch = False self.invert = False self.eraser = False - self.x_tilt = 0 - self.y_tilt = 0 - self.twist = 0 + self.xtilt = 1 + self.ytilt = 1 + self.twist = 1 self._old_values = None self.current_state = None @@ -292,8 +292,8 @@ class Pen(object): "width", "height", "twist", - "x_tilt", - "y_tilt", + "xtilt", + "ytilt", ]: setattr(self, i, getattr(self._old_values, i)) @@ -361,8 +361,8 @@ class PenDigitizer(base.UHIDTestDevice): pen.height = 0 pen.invert = False pen.eraser = False - pen.x_tilt = 0 - pen.y_tilt = 0 + pen.xtilt = 0 + pen.ytilt = 0 pen.twist = 0 elif state == PenState.PEN_IS_IN_RANGE: pen.tipswitch = False -- 2.41.0