Skip to content

Commit a77cc1e

Browse files
committed
Fix: LeftOverSweepTime - treat fifopos of NaN as finished sweep
Previously a fifopos of NaN triggered an ASSERTion. However if the sweep already finished when LeftOverSweepTime was called, then the fifopos was NaN. Fix: Correctly return 0 for this case.
1 parent a9d8a54 commit a77cc1e

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Packages/MIES/MIES_MiesUtilities_Sweep.ipf

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -440,7 +440,10 @@ End
440440

441441
Function LeftOverSweepTime(string device, variable fifoPos)
442442

443-
ASSERT(IsFinite(fifoPos), "Unexpected non-finite fifoPos")
443+
if(IsNaN(fifopos))
444+
// TFH_FifoLoop thread finished -> sweep finished regular (or manually stopped)
445+
return 0
446+
endif
444447

445448
WAVE DAQDataWave = GetDAQDataWave(device, DATA_ACQUISITION_MODE)
446449
NVAR stopCollectionPoint = $GetStopCollectionPoint(device)

0 commit comments

Comments
 (0)