Skip to content
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

Removed probably unnecessary code of Sysfs driver #2151

Merged
merged 1 commit into from Oct 19, 2023

Conversation

ignaciocaramba
Copy link
Contributor

@ignaciocaramba ignaciocaramba commented Oct 17, 2023

Fixes #2131
When using the SysFs driver the following exception gets thrown when pressing the button connected to the pin:

Unhandled exception. System.IO.IOException: Error while trying to seek in value file.
   at System.Device.Gpio.Drivers.SysFsDriver.WasEventDetected(Int32 pollFileDescriptor, Int32 valueFileDescriptor, Int32& pinNumber, CancellationToken cancellationToken)
   at System.Device.Gpio.Drivers.SysFsDriver.DetectEvents()
   at System.Threading.Thread.StartHelper.Callback(Object state)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location ---
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.Thread.StartCallback()

After removing the code, the exception is not thrown.

Microsoft Reviewers: Open in CodeFlow

@ghost ghost added the area-System.Device.Gpio Contains types for using general-purpose I/O (GPIO) pins label Oct 17, 2023
@ignaciocaramba ignaciocaramba marked this pull request as ready for review October 17, 2023 12:36
@ignaciocaramba
Copy link
Contributor Author

@dotnet-policy-service agree

@krwq
Copy link
Member

krwq commented Oct 17, 2023

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@krwq krwq requested a review from pgrawehr October 17, 2023 16:39
Copy link
Contributor

@pgrawehr pgrawehr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Appears to be working, and IIRC I considered removing that before. Should be fine until we find a reason to keep it.

@krwq krwq merged commit 2ed71a9 into dotnet:main Oct 19, 2023
9 checks passed
@pgrawehr pgrawehr added this to the v3.1.0 milestone Nov 9, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Dec 10, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-System.Device.Gpio Contains types for using general-purpose I/O (GPIO) pins
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Callbacks registered via RegisterCallbackForPinValueChangedEvent are not getting called when pin value changes
3 participants