Skip to content

Commit

Permalink
Merge pull request #9 from PyMoDAQ/feature/enum_access
Browse files Browse the repository at this point in the history
Feature/enum access and versioning
  • Loading branch information
seb5g authored Jan 31, 2025
2 parents 63d4664 + 733f8ef commit f2129a9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
2 changes: 0 additions & 2 deletions src/pymodaq_plugins_daqmx/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,3 @@
from .utils import Config
config = Config()

with open(str(Path(__file__).parent.joinpath('resources/VERSION')), 'r') as fvers:
__version__ = fvers.read().strip()
12 changes: 6 additions & 6 deletions src/pymodaq_plugins_daqmx/hardware/national_instruments/daqmx.py
Original file line number Diff line number Diff line change
Expand Up @@ -341,17 +341,17 @@ def get_NIDAQ_channels(cls, devices=None, source_type=None):
if not not devices:
for device in devices:
for source in source_type:
if source == DAQ_NIDAQ_source['Analog_Input'].name: # analog input
if source == DAQ_NIDAQ_source.Analog_Input.name: # analog input
string = try_string_buffer(PyDAQmx.DAQmxGetDevAIPhysicalChans, device)
elif source == DAQ_NIDAQ_source['Counter'].name: # counter
elif source == DAQ_NIDAQ_source.Counter.name: # counter
string = try_string_buffer(PyDAQmx.DAQmxGetDevCIPhysicalChans, device)
elif source == DAQ_NIDAQ_source['Analog_Output'].name: # analog output
elif source == DAQ_NIDAQ_source.Analog_Output.name: # analog output
string = try_string_buffer(PyDAQmx.DAQmxGetDevAOPhysicalChans, device)
elif source == DAQ_NIDAQ_source['Digital_Output'].name: # digital output
elif source == DAQ_NIDAQ_source.Digital_Output.name: # digital output
string = try_string_buffer(PyDAQmx.DAQmxGetDevDOLines, device)
elif source == DAQ_NIDAQ_source['Digital_Input'].name: # digital output
elif source == DAQ_NIDAQ_source.Digital_Input.name: # digital output
string = try_string_buffer(PyDAQmx.DAQmxGetDevDILines, device)
elif source == DAQ_NIDAQ_source['Terminals'].name: # digital output
elif source == DAQ_NIDAQ_source.Terminals.name: # digital output
string = try_string_buffer(PyDAQmx.DAQmxGetDevTerminals, device)

channels = string.split(', ')
Expand Down

0 comments on commit f2129a9

Please sign in to comment.