-
Notifications
You must be signed in to change notification settings - Fork 594
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
input pin pin changed callback not firing #1851
Comments
Have you installed libgpiod? This usually fixes this. Run |
Managed to get it going, i had the non dev version installed. Not sure if it was that or i was calling open_pin for a second time before registering the callback and an exception was getting thrown but not showing up in the unhandled exception handler. Q, do i have to explicitly set up the constructor like "new GpioController( PinNumberingScheme.Logical, new LibGpiodDriver( 0 ) )" to use the libgpiod library? If just setting up like "new GpioController()" will it revert to the old sys driver. |
No, normally that should work correctly automatically, unless you are facing another instance of #1798 . Can you check your board revision? |
Revision : b03112 I guess that rules out issue 1798, ill mess around and see what happens. |
Ill put this down to i had libgpiod not libgpiod-dev installed then in InitializeInterruptDriver it defaulted to SysFs and the fact then the pin was being opened a second time freaked out the driver and threw an exeption before the handler was getting registered. Ive just tried it with the default constructor and all seems well. Thanks D. |
Closing this issue as it appears to be resolved. |
As the title says when setting up an input pin with RegisterCallbackForPinValueChangedEvent, the callback never gets fired.
The board is a raspberry Pi 4b, with the service running under systemd as a background service.
System.Device.Gpio version 2.1.0
No unhandled exceptions are occurring, the callback is just flat out not getting called.
Having no dramas with outputs.
The input is working as the value can be read as changed directly after it has been set.
Any ideas anyone having dramas with this?
The text was updated successfully, but these errors were encountered: