Fix for Linux where DAQmxGetSysNIDAQUpdateVersion is not available#75
Merged
Fix for Linux where DAQmxGetSysNIDAQUpdateVersion is not available#75
Conversation
|
@jsalort - what version of DAQmx did you use? And what linux distribution? |
Author
|
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. |
rares-pop
reviewed
Sep 3, 2020
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.
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.
rares-pop
reviewed
Sep 3, 2020
|
Awesome! Thank you very much for the contribution! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 toDAQmxGetSysNIDAQMinorVersionin that case (although I am not sure that it means the same thing exactly).