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
Add Promise support #12
Conversation
Please replace the readme usage example with your 'blinkwave' usage example, using the new promise support and waveChainTx API update. I think the new usage example will not only embody the essence of the pigpio library - hardware controlled/software managed gpio - but demonstrate the new API support included in this release. Please bump the version to 1.3.0 in the pigpio info object. I'm away from my environment right now but will get to test the new code sometime early next week. |
Alright, I updated the usage example / bumped version number. Thanks again for creating and maintaining this library! |
@urish , I have successfully run my regression test on the promises branch with the following modifications:
The complete promise is summarized here:
|
Hi @guymcswain !
|
Yes, I believe the changes you propose would satisfy my legacy code. |
1. Return a promise only when callback is not provided, so legacy code doesn't get `UnhandledPromiseRejectionWarning` 2. Support methods that return multiple values 3. Support calling waitNotBusy() without a callback
Alright, here we go! |
Thank you @urish for this nice contribution to |
Lovely, pleasure working together on this mini-project :) |
promisify
wrapper