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

Signal hound a few more changes #1318

Merged

Conversation

jenshnielsen
Copy link
Collaborator

While trying to resolve a usb comm error for @nataliejpg I cleaned up the driver a bit

  • Add types to ctypes dll calls matching the api defined in Signal Hounds headers. The only real changes are a few uint -> int that should have no real consequence as we are dealing with small positive numbers
  • Rewrite _get_sweep_data to capture data directly into a numpy array saving a loop over the data
  • refactor the averageing logic into _get_sweep_data removing the avg function. This saves a few redundant dll calls
  • remove the retry functionality from _get_sweep_data. The api docs are quite clear that there is no point in retrying when the communication is lost. The only way forward is to close the device. All other errors relate to invalid input and will not be fixed by retrying

These matches the calling conventions from the headers
Recursively call the code rather than duplication and store directly into numpy arrays
@codecov
Copy link

codecov bot commented Oct 15, 2018

Codecov Report

Merging #1318 into master will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master    #1318   +/-   ##
=======================================
  Coverage   73.24%   73.24%           
=======================================
  Files          85       85           
  Lines        9833     9833           
=======================================
  Hits         7202     7202           
  Misses       2631     2631

@astafan8
Copy link
Contributor

astafan8 commented Nov 7, 2018

@jenshnielsen merge this if it's ready?

@jenshnielsen
Copy link
Collaborator Author

@nataliejpg confirms that this is working

@jenshnielsen jenshnielsen merged commit 1d93ddc into microsoft:master Dec 5, 2018
giulioungaretti pushed a commit that referenced this pull request Dec 5, 2018
Merge: b0ccc03 747ce3d
Author: Jens Hedegaard Nielsen <[email protected]>

    Merge pull request #1318 from jenshnielsen/signal_hound_more_cleanup
@jenshnielsen jenshnielsen deleted the signal_hound_more_cleanup branch October 25, 2024 11:48
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