Good day all, I hope this is an easy question. I am using RPi2 with a mechanical rotary quadrature encoder (the inexpensive sort that are used as volume controls etc). The decoding is done in Python and I use the threaded callback of RPi.GPIO 0.6.2 for edge detection. After scoping the quadrature signals I can see that the shortest debouncing time that RPi.GPIO allows, which is 1ms, is too long. When the encoder is spun fast, the square waveforms have a period of the order of 1ms. Contact bounce is of the order of 100 us.
Looking at the RPi.GPIO source code, it should be trivial to remove the limitation of 1ms. I would like to try, but I do not know how to go about replacing installed RPi.GPIO with the modified version, or better still, installing the modified module alongside it - perhaps under a new name RPi.GPIO2 which would allow me to keep the original and to be certain that the modified install has worked.
Perhaps this has already been done by someone, or the exact same problem has been solved another way?