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

Handle Visa IO Error on first connection #172

Merged
merged 3 commits into from
Mar 26, 2024
Merged

Conversation

ldantek
Copy link
Contributor

@ldantek ldantek commented Mar 26, 2024

Proposed changes

On first connection the check for visa_resource.read_stb() to detect messages left in the output buffer and visa_resource.clear() calls will print a warning instead of instantly failing if the visa driver or the device don't fully support those calls.

Types of changes

What types of changes does your code introduce?
Put an x in the boxes that apply

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Functionality update (non-breaking change which updates or changes existing functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • CI/CD update (an update to the CI/CD workflows, scripts, and/or configurations)
  • Documentation update (an update to enhance the user experience when reading through the docs)

Checklist

Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.

  • I have followed the guidelines in the CONTRIBUTING document
  • I have signed the CLA
  • I have checked to ensure there aren't other open Pull Requests for the same update/change
  • I have performed a self-review of my code
  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • Basic linting passes locally with my changes
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • I have added necessary documentation (if appropriate)
  • I have updated the Changelog with a brief description of my changes

@ldantek ldantek requested a review from a team as a code owner March 26, 2024 20:13
@CLAassistant
Copy link

CLAassistant commented Mar 26, 2024

CLA assistant check
All committers have signed the CLA.

@tek-githubbot-1010 tek-githubbot-1010 requested a review from a team March 26, 2024 20:14
Copy link

codecov bot commented Mar 26, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (dfcded7) to head (1b0c73c).

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #172   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          170       170           
  Lines         3801      3804    +3     
  Branches       643       643           
=========================================
+ Hits          3801      3804    +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@nfelt14 nfelt14 enabled auto-merge (squash) March 26, 2024 20:21
@nfelt14 nfelt14 merged commit 2dd4876 into tektronix:main Mar 26, 2024
39 checks passed
v12ganesh pushed a commit to v12ganesh/tm_devices that referenced this pull request Mar 28, 2024
* fix: exception handling for clearing Visa IO buffer on  first connection

* fix: unit testing device_manager.py warnings on connection
Signed-off-by: v12ganesh [email protected]
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.

3 participants