Skip to content

Commit

Permalink
DQ_StopOngoingDAQAllLocked: Make it more robust
Browse files Browse the repository at this point in the history
This function is called from BeforeUncompiledHook and thus needs to
always work. Even with really old experiments which don't have the
expected GUI controls and thus assert out.
  • Loading branch information
t-b committed May 29, 2020
1 parent 6943cb0 commit 33b63e3
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions Packages/MIES/MIES_DataAcquisition.ipf
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,25 @@
Function DQ_StopOngoingDAQAllLocked()
string panelTitle

variable i, numDev
variable i, numDev, debuggerState
string device

debuggerState = DisableDebugger()

SVAR devices = $GetDevicePanelTitleList()
numDev = ItemsInList(devices)
for(i = 0; i < numDev; i += 1)
device = StringFromList(i, devices)

try
ClearRTError()
DQ_StopOngoingDAQ(device, startTPAfterDAQ = 0)
DQ_StopOngoingDAQ(device, startTPAfterDAQ = 0); AbortOnRTE
catch
ClearRTError()
endtry
endfor

ResetDebuggerState(debuggerState)
End

/// @brief Stop the DAQ and testpulse
Expand Down

0 comments on commit 33b63e3

Please sign in to comment.