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

Fix for Linux where DAQmxGetSysNIDAQUpdateVersion is not available #75

Merged
merged 3 commits into from
Sep 4, 2020

Conversation

jsalort
Copy link

@jsalort jsalort commented Feb 12, 2019

I have started using this module on Linux (with AI channels), and this is the only change that I add to do to make it work. Apparently, DAQmx on Linux does not have DAQmxGetSysNIDAQUpdateVersion. It seems to be enough to just fallback to DAQmxGetSysNIDAQMinorVersion in that case (although I am not sure that it means the same thing exactly).

@rares-pop
Copy link

rares-pop commented May 4, 2020

@jsalort - what version of DAQmx did you use?

And what linux distribution?

@rares-pop rares-pop added the info needed need extra information about the issue label May 5, 2020
@jsalort
Copy link
Author

jsalort commented May 14, 2020

I am using NI-DAQmx 8.0.2f0 on OpenSUSE 11.4 on a PXI-1031 with PXI-8102 chassis.

@rares-pop
Copy link

Oh, that's fairly old.

try:
cfunc = lib_importer.windll.DAQmxGetSysNIDAQUpdateVersion
except DaqFunctionNotSupportedError:
cfunc = lib_importer.windll.DAQmxGetSysNIDAQMinorVersion

Choose a reason for hiding this comment

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

can we just return 0 here?

it's strange to have the update part of the version in sync with the minor, i.e. 8.0.0, 8.1.1, 8.2.2 (without actual 8.2.0 or 1).

I'm thinking if there's no update, either have the DriverVersion return major.minor, or major.minor.0, and I guess it's safer for comparisons and so on to use a 0 there.

Copy link
Author

Choose a reason for hiding this comment

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

Agreed. I have updated to PR.

@rares-pop
Copy link

Awesome! Thank you very much for the contribution!

@rares-pop rares-pop merged commit 358a6d6 into ni:master Sep 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
info needed need extra information about the issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants