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

Convert BreakoutAnalogOutput data to offset binary #213

Merged
merged 2 commits into from
Aug 20, 2024
Merged

Convert BreakoutAnalogOutput data to offset binary #213

merged 2 commits into from
Aug 20, 2024

Conversation

jonnew
Copy link
Member

@jonnew jonnew commented Aug 13, 2024

  • Fixes Incorrect data type for BreakoutAnalogOutput #205
  • The analog outputs on the breakout board expect 16-bit words in offset binary
  • We were using twos-complement. This fix converts all outgoing data to offset binary before the final calls to device.Write()

- The analog outputs on the breakout board expect 16-bit words in offset
  binary
- We were using twos-complement. This fix converts all outgoing data to
  offset binary before the final calls to device.Write()
@bparks13
Copy link
Member

bparks13 commented Aug 14, 2024

To automatically close the existing issue, we can link it from the PR back to the issue with closing language. For example:
Fixes #205

It looks like this language needs to be in the original comment to link the issues correctly.

@jonnew jonnew requested a review from bparks13 August 15, 2024 18:03
@@ -108,6 +115,12 @@ public IObservable<short[]> Process(IObservable<short[]> source)
return source.Do(data =>
{
AssertChannelCount(data.Length);
var samples = new ushort[data.Length];
Copy link
Member Author

Choose a reason for hiding this comment

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

There is potentially an opencv operation that would vectorize this. cv.xors is what we should look into.

@jonnew jonnew removed the request for review from glopesdev August 20, 2024 17:10
- Tested in hardware appears to work well
@jonnew jonnew merged commit 25b7517 into main Aug 20, 2024
6 checks passed
@jonnew jonnew deleted the issue-205 branch August 20, 2024 17:27
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.

Incorrect data type for BreakoutAnalogOutput
2 participants