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

Cjg/usb 6002 #8

Merged
merged 2 commits into from
Aug 1, 2017
Merged

Cjg/usb 6002 #8

merged 2 commits into from
Aug 1, 2017

Conversation

Cody-G
Copy link
Contributor

@Cody-G Cody-G commented Jun 24, 2017

Modifies the test script so that devices without buffered digital input / output and counter output can pass.

test/runtests.jl Outdated
@@ -90,12 +90,16 @@ else
@test start(t) == nothing
@test length(read(t, UInt8, 6)) == 12
@test stop(t) == nothing
@test NIDAQ.CfgSampClkTiming(t.th, convert(Ref{UInt8},b""), 100.0, NIDAQ.Val_Rising,
rslt = Ref(UInt32(0))
Copy link
Collaborator

@bjarthur bjarthur Jun 27, 2017

Choose a reason for hiding this comment

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

test/runtests.jl Outdated
@test NIDAQ.CfgSampClkTiming(t.th, convert(Ref{UInt8},b""), 100.0, NIDAQ.Val_Rising,
rslt = Ref(UInt32(0))
NIDAQ.DAQmxGetBufInputOnbrdBufSize(t.th, rslt)
if rslt.x != 0 #If the device supports buffered digital input
Copy link
Collaborator

Choose a reason for hiding this comment

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

similarly, rslt[] is preferred.

test/runtests.jl Outdated
@test length(read(t, UInt32)) == 20
@test stop(t) == nothing
@test clear(t) == nothing
end
Copy link
Collaborator

Choose a reason for hiding this comment

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

might be nice to add an elseif here stating that device does not support clocked digital input.

@bjarthur
Copy link
Collaborator

looks great. thanks for this. just a couple of small suggestions. also, could you please shorten up the commit messages so they aren't wrapped/truncated?

@Cody-G
Copy link
Contributor Author

Cody-G commented Jun 28, 2017

Thanks for the review! I think I've addressed everything in the amended commits, but I don't have access to a device today to test. I'll test asap and let you know.

test/runtests.jl Outdated
@@ -112,18 +118,24 @@ else
@test start(t) == nothing
@test write(t, round.(UInt8, [1 0; 0 0; 1 0; 0 1; 1 1; 0 1])) == 6
@test stop(t) == nothing
@test NIDAQ.CfgSampClkTiming(t.th, convert(Ref{UInt8},b""), 100.0, NIDAQ.Val_Rising,
rslt = Ref{UInt32}(0)
NIDAQ.DAQmxGetBufInputOnbrdBufSize(t.th, rslt)
Copy link
Collaborator

Choose a reason for hiding this comment

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

should be DAQmxGetBufOutputOnbrdBufSize, not ...Input.... otherwise, this works on my box. did you get a chance to test on yours?

@Cody-G
Copy link
Contributor Author

Cody-G commented Jul 20, 2017 via email

@bjarthur
Copy link
Collaborator

would be great if you could also test #9 with your apps before i merge it. thanks.

@Cody-G
Copy link
Contributor Author

Cody-G commented Jul 22, 2017

Okay this should be good to go! I also rebased your work in #9 on this (only locally), installed NIDAQmx v17.1, and ran the tests with my device. Tests passed!

@bjarthur bjarthur merged commit f7f6a26 into JaneliaSciComp:master Aug 1, 2017
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