-
Notifications
You must be signed in to change notification settings - Fork 171
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
Conversation
@jsalort - what version of DAQmx did you use? And what linux distribution? |
I am using NI-DAQmx 8.0.2f0 on OpenSUSE 11.4 on a PXI-1031 with PXI-8102 chassis. |
Oh, that's fairly old. |
nidaqmx/system/system.py
Outdated
try: | ||
cfunc = lib_importer.windll.DAQmxGetSysNIDAQUpdateVersion | ||
except DaqFunctionNotSupportedError: | ||
cfunc = lib_importer.windll.DAQmxGetSysNIDAQMinorVersion |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
Awesome! Thank you very much for the contribution! |
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 toDAQmxGetSysNIDAQMinorVersion
in that case (although I am not sure that it means the same thing exactly).