-
Notifications
You must be signed in to change notification settings - Fork 217
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Timeout support for wait_for_edge #62
Conversation
…bone-io-python Conflicts: source/event_gpio.h source/py_gpio.c
I missed a push with some changes. Try it now. |
Thank you for your fast reply I get this: ubuntu@arm:~/adafruit-beaglebone-io-python$ sudo python setup.py install Installed /usr/local/lib/python2.7/dist-packages/Adafruit_BBIO-0.0.20-py2.7-linux -armv7l.egg When I check the /usr/local/lib/python2.7/dist-packages directory, there is only this file: Adafruit_BBIO-0.0.20-py2.7-linux-armv7l.egg So I cannot import any of the modules from the library. |
What about /usr/lib/python2.7? |
In /usr/lib/python2.7/dist-packages, there are no files related to the Adafruit_BBIO library |
It finally worked for me!!! While I was runnig the BBB on Ubuntu, I never managed to make it work. After I switched to Debian, It worked perfectly right after installing. Thank you! |
Great. I will add this info to the readme. Any idea what was wrong? I could not reproduce your results because the distribution I used was also Debian. cheers.
|
No idea. I purged the old GPIO library, and deleted all the remaining files from the dist-packages directories. Then I re-installed it from your Git. Even though there were no compilation errors, I still got the TypeError message when using the wait_for_edge function. I had some other issues with that OS (Ubuntu 13.10 // 2013-09-04 image), therefore I switched to Debian. |
@jpbarraca There were several improvements from merged PRs since this PR was created, most recently in #108. Please check if this is still an issue and if the PR still resolves the issue. |
@jpbarraca thanks for the pull request. Unfortuantely, it now conflicts after recent merges. Could you please resolve the conflict so that I can test this PR? |
@jpbarraca It looks like there are some conflicts now in |
@pdp7 No conflicts now. |
@jpbarraca Thanks, I'll test it out. |
@jpbarraca I got this error when trying to install from your master:
Here's the full output:
|
@jpbarraca hi, any update on this? |
Fixed but needs testing. Will try to do it tonight. |
Closing this PR as the error is way too simple for such long history. Will open again today. |
Timeout support for wait_for_edge (replaces PR #62)
This change makes it able to wait for an edge change but bail out if no change is detected after a timeout.
The code should be mostly backward compatible but enables programs to recover when the hardware goes weird.
The function wait_for_edge will now admit a timeout value and will return 0 or -1 . If the return is 0, an edge change is detected. If the return is -1 a timeout occurred.