Skip to content

Commit

Permalink
DAP_GetITCDeviceList/DAP_GetNIDeviceList: Make them failsafe on MacOSX
Browse files Browse the repository at this point in the history
We neither have an ITCXOP2 on MACOSX nor a NIDAQmx XOP so we always know
that we don't have any devices.

Let's shortcut then in this case. This avoids some tests errors
  • Loading branch information
t-b committed Aug 25, 2023
1 parent 74d779f commit 0ecb0b0
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions Packages/MIES/MIES_DAEphys.ipf
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ End
Function/S DAP_GetNIDeviceList()
variable i, j, numPattern, numDevices
string propList
string devList, pattern, allDevices, device
string devList, pattern, device
string allDevices = ""

SVAR globalNIDevList = $GetNIDeviceList()
devList = globalNIDevList
Expand All @@ -59,7 +60,10 @@ Function/S DAP_GetNIDeviceList()

numPattern = ItemsInList(NI_DAC_PATTERNS, "|")

#if defined(WINDOWS)
allDevices = HW_NI_ListDevices()
#endif

numDevices = ItemsInList(allDevices)

for(i = 0;i < numDevices;i += 1)
Expand Down Expand Up @@ -94,7 +98,7 @@ End
/// @brief Returns a list of ITC devices for DAC, #NONE if there are none
Function/S DAP_GetITCDeviceList()

string devList
string devList = ""

SVAR globalITCDevList = $GetITCDeviceList()
devList = globalITCDevList
Expand All @@ -103,7 +107,9 @@ Function/S DAP_GetITCDeviceList()
return devList
endif

#if defined(WINDOWS)
devList = HW_ITC_ListDevices()
#endif

if(!IsEmpty(devList))
globalITCDevList = devList
Expand Down

0 comments on commit 0ecb0b0

Please sign in to comment.