jpbarraca / pynrf24

Python port of the RF24 library for NRF24L01+ radios.
GNU General Public License v2.0
152 stars 84 forks source link

Incorrect use of Function GPIO.wait_for_edge() in irqWait #37

Closed t1ngyu closed 3 years ago

t1ngyu commented 6 years ago
  1. the timeout argument must used as keyword argument, otherwise it will no effect.
  2. the return value is None for timeout, or the pin number for edge detected.

So, modify the code as following:

return GPIO.wait_for_edge(self.irq_pin, GPIO.FALLING, timeout=timeout) == self.irq_pin
JoeLaCleDeDouze commented 3 years ago

Hello @jpbarraca, I seem to have an invalid syntax SyntaxError when installing the library with python. The issue appears on line 328. Reverting this line to the previous revision seems to work better.