tingbot / tingbot-python

🔩 Python APIs to write apps for Tingbot
Other
18 stars 9 forks source link

Fix #29 - hardware buttons don't fire 'press' events #30

Closed joerick closed 8 years ago

joerick commented 8 years ago

Fix #29.

The RPi.GPIO module wasn't giving us up-to-date information about the state of the pins. Possibly because it wasn't reacting to changes that happen while the callbacks are firing. We were missing a lot of 'up' events, which is why this change made it worse - the 'press' event relies on a timely 'up'

If you get a chance, could you test @WhistleMaster? I still need to sort out the dependencies of this change (perhaps post a version of our fork of RPIO to PyPI) - until then it can be installed with

pip install --process-dependency-links https://github.com/tingbot/tingbot-python/archive/buttons-RPIO.zip