Veethree D7 SDK
Loading...
Searching...
No Matches
Pre-production rotary encoder produces two events for each detent

If the rotary encoder seems to produce two events for each movement, it may be that your unit is part of an older batch that used a different rotary encoder.

The fix for that is to create the following file in /etc/modprobe.d/rotary-encoder.conf:

options rotary_encoder force_steps_per_period=1

Note: The following commands should be run as root on the release image.

You can create it by running:

echo "options rotary_encoder force_steps_per_period=1" > /etc/modprobe.d/rotary-encoder.conf

Then you will need to reload the driver:

modprobe -r rotary_encoder
modprobe rotary_encoder

Testing the changes

If your board is currently on a development image, you can use evtest to check if the changes took effect.

root@imx8qxp-d7:~# evtest
No device specified, trying to scan all of /dev/input/event*
Available devices:
/dev/input/event0: system-controller:keys
/dev/input/event1: d7-buttons
/dev/input/event2: rotary-encoder
/dev/input/event3: Atmel maXTouch Touchscreen
Select the device event number [0-3]:

Select device 2 (the rotary encoder) and rotate it. One detent should produce one event, similar to this:

Event: time 1749712791.920969, type 2 (EV_REL), code 8 (REL_WHEEL), value -1
Event: time 1749712791.920969, -------------- SYN_REPORT ------------