Open goshansp opened 2 years ago
This issue happens on the latest, manually installed code as well. I achieved a little progress with a small change and now the error is not thrown anymore. But edges are only detected about 75% of the time and such race / threading is exceeding my capa. Also I assume that gpiod doesn't leverage interrupts and hence edges have to be detected by polling. If someone can point me to working edge detection on Fedora IOT that would be very much appreciated.
Just found this which may be of help https://github.com/toradex/torizon-samples/issues/4
Missed edges have been blocked by os.read(eventfd, 10000)
which I've disabled. My fork seems to detect all edges now. But sometimes it will print multiple edges upon a single button switching. The same multi-print behaviour can also be seen with gpiodmon.py. I see that my setup switch bounces within 300 micro seconds.
@theyoyojo to you think the multiple detections/debounce is fixable in RPi.GPIO2
or is it originating from gpiod?
Libgpiod does not currently support debounce and may get it in v2. We may consider to implement debounce as a workaround in RPi.GPIO2
and remove it again later. As already mentioned in line_event_wait
the debounce should happen outside of a poll thread?
Hi, I haven't had time to look through this until now but I will get to it soon.
Issue
An state change (edge) on the rpi3's gpio will raise
TypeError: 'list' object is not callable
. Sometimes this issue requires two edges to occur andadd_event_detect
seems to fail to detect edges at all. I have tried a few variations in the code but the behavior seems consistent on two identical systems.System Info
Reproduction Script edge_test.py
Symptome
Can someone reproduce it or spot the issue in my code?