Skip to content

Commit 36f907e

Browse files
Jakub RzeszutkoMaureenHelm
authored andcommitted
driver: qdec - fix step limits
Corrected the condition that checks the maximum number of steps allowed. Signed-off-by: Jakub Rzeszutko <[email protected]>
1 parent 0a7d8d4 commit 36f907e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/sensor/qdec_nrfx/qdec_nrfx.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ static int qdec_nrfx_channel_get(const struct device *dev,
8888
irq_unlock(key);
8989

9090
BUILD_ASSERT(steps > 0, "only positive number valid");
91-
BUILD_ASSERT(steps <= 2148, "overflow possible");
91+
BUILD_ASSERT(steps <= 2048, "overflow possible");
9292

9393
val->val1 = (acc * FULL_ANGLE) / steps;
9494
val->val2 = (acc * FULL_ANGLE) - (val->val1 * steps);

0 commit comments

Comments
 (0)