From 580bcff4f65a3a9ee301de0fd036de7b610c7ee2 Mon Sep 17 00:00:00 2001 From: Stefan Kerkmann Date: Sat, 16 Jul 2022 11:33:18 +0200 Subject: Use correct angle tune range of +/-30 on PMW33XX (#17693) Co-authored-by: Daniel Kao Co-authored-by: Daniel Kao --- drivers/sensors/pmw33xx_common.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'drivers/sensors/pmw33xx_common.c') diff --git a/drivers/sensors/pmw33xx_common.c b/drivers/sensors/pmw33xx_common.c index 538c40c462..0a8989fcea 100644 --- a/drivers/sensors/pmw33xx_common.c +++ b/drivers/sensors/pmw33xx_common.c @@ -1,3 +1,4 @@ +// Copyright 2022 Daniel Kao (dkao) // Copyright 2022 Stefan Kerkmann (KarlK90) // Copyright 2022 Ulrich Spörlein (@uqs) // Copyright 2021 Alabastard (@Alabastard-64) @@ -165,7 +166,7 @@ bool pmw33xx_init(uint8_t sensor) { wait_ms(1); pmw33xx_write(sensor, REG_Config2, 0x00); - pmw33xx_write(sensor, REG_Angle_Tune, CONSTRAIN(ROTATIONAL_TRANSFORM_ANGLE, -127, 127)); + pmw33xx_write(sensor, REG_Angle_Tune, CONSTRAIN(ROTATIONAL_TRANSFORM_ANGLE, -30, 30)); pmw33xx_write(sensor, REG_Lift_Config, PMW33XX_LIFTOFF_DISTANCE); if (!pmw33xx_check_signature(sensor)) { -- cgit v1.2.3