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

Bugfix/handle hidapi exceptions in sendReport #55

Merged
merged 2 commits into from
Oct 5, 2024

Conversation

dalethomas81
Copy link
Contributor

Handle an exception generated by hidapi in the sendReport thread. This exception is thrown when no controller is connected. Since the exception is not handled, the thread ends, and the service needs to be restarted to recover. By handling these exceptions, the service becomes fault tolerant and is able to recover automatically.

  • Added a Try/Exception to handle an IOError and an AttributeError.
  • Added a Connected property to indicate when the device is not connected.

-added try except around thread code to handle the IOError raised by hidapi.
-added 'connected' property to indicate when controller is disconnected.

(cherry picked from commit a5ed419)
(cherry picked from commit 6aeeee1)
@flok
Copy link
Owner

flok commented May 27, 2024

Thanks for the pull request, i added some remarks :)

@dalethomas81
Copy link
Contributor Author

Hey @flok - sorry, I am not seeing the remarks. Where can I find them?

@dalethomas81
Copy link
Contributor Author

Btw, this fixes #48.

@flok
Copy link
Owner

flok commented May 31, 2024

Hey @flok - sorry, I am not seeing the remarks. Where can I find them?

You should see them in this thread at the top as a review from me

@dalethomas81
Copy link
Contributor Author

I believe you may not have submitted the review request as there are none. Do you mind trying again or pasting your review here? Thank you for your patience. I am enjoying using this in my project. image

pydualsense/pydualsense.py Show resolved Hide resolved
pydualsense/pydualsense.py Show resolved Hide resolved
@flok
Copy link
Owner

flok commented Jun 1, 2024

I believe you may not have submitted the review request as there are none. Do you mind trying again or pasting your review here? Thank you for your patience. I am enjoying using this in my project.

You are right, my bad. Mostly working with gitlab now a days and forgot to press the button. You should be able to see it now

@dalethomas81
Copy link
Contributor Author

No worries! I did respond to your review. Can you let me know if that is satisfactory? Thank you.

@flok flok changed the base branch from master to dev October 5, 2024 21:19
@flok flok merged commit 6831748 into flok:dev Oct 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants