Skip to content

Commit

Permalink
DAP_CheckSettings: Also check unassociated DA/AD channels
Browse files Browse the repository at this point in the history
We have never checked gain, scale and unit of those.
  • Loading branch information
t-b committed Jan 17, 2024
1 parent 402d327 commit dd5bad5
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions Packages/MIES/MIES_DAEphys.ipf
Original file line number Diff line number Diff line change
Expand Up @@ -2321,6 +2321,27 @@ Function DAP_CheckSettings(device, mode)
if(DAP_CheckStimset(device, CHANNEL_TYPE_DAC, i, NaN))
return 1
endif

if(DAP_CheckChannel(device, CHANNEL_TYPE_DAC, i))
return 1
endif
endif
endfor

WAVE statusADFiltered = DC_GetFilteredChannelState(device, DATA_ACQUISITION_MODE, CHANNEL_TYPE_ADC)
numEntries = DimSize(statusADFiltered, ROWS)
for(i = 0; i < numEntries; i += 1)

if(!statusADFiltered[i])
continue
endif

headstage = AFH_GetHeadstageFromADC(device, i)

if(IsNaN(headstage)) // unassoc AD
if(DAP_CheckChannel(device, CHANNEL_TYPE_ADC, i))
return 1
endif
endif
endfor

Expand Down

0 comments on commit dd5bad5

Please sign in to comment.