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

camerad: refactor linkDevices for improved error handling and readability #33063

Closed
wants to merge 2 commits into from

Conversation

deanlee
Copy link
Contributor

@deanlee deanlee commented Jul 24, 2024

This PR improves the linkDevices function by:

  1. Adding Detailed Error Checks and Logging: Enhanced error handling and logging for device linking and activation failures.
  2. Struct Assignment: Used brace initialization for cleaner code.
  3. Logging: Improved log messages for clearer insights into device linking and activation steps.
  4. Replaced Assert with Return on Failure: Immediately return on any failure instead of continuing execution, and only use an assert at the end of the function.

These changes make the function more robust, maintainable, and easier to debug.

Copy link
Contributor

github-actions bot commented Jul 24, 2024

Thanks for contributing to openpilot! In order for us to review your PR as quickly as possible, check the following:

  • Convert your PR to a draft unless it's ready to review
  • Read the contributing docs
  • Before marking as "ready for review", ensure:
    • the goal is clearly stated in the description
    • all the tests are passing
    • the change is something we merge
    • include a route or your device' dongle ID if relevant

@adeebshihadeh
Copy link
Contributor

trigger-jenkins

@adeebshihadeh
Copy link
Contributor

trigger-jenkins

Copy link
Contributor

github-actions bot commented Aug 4, 2024

This PR has had no activity for 9 days. It will be automatically closed in 2 days if there is no activity.

@github-actions github-actions bot added the stale label Aug 4, 2024
Copy link
Contributor

github-actions bot commented Aug 7, 2024

This PR has been automatically closed due to inactivity. Feel free to re-open once activity resumes.

@github-actions github-actions bot closed this Aug 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants