From 3b2f2f7c4171aaccd08472200eccfeb35a2080fa Mon Sep 17 00:00:00 2001 From: Casper Date: Tue, 27 Feb 2024 11:02:45 +0100 Subject: [PATCH] Bugfix record indefinitely --- python_src/lasp/lasp_record.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python_src/lasp/lasp_record.py b/python_src/lasp/lasp_record.py index 482c324..66adef2 100644 --- a/python_src/lasp/lasp_record.py +++ b/python_src/lasp/lasp_record.py @@ -208,7 +208,7 @@ class Recording: recstatus = RecordStatus(curT=self.recordedTime, done=False) - if self.recordedTime >= self._requiredRecordingLength: + if self._requiredRecordingLength is not None and self.recordedTime >= self._requiredRecordingLength: self._recState = RecordingState.AllDataStored self._stop <<= True recstatus.done = True @@ -287,7 +287,7 @@ class Recording: with self._rec_mutex: if self._recState == RecordingState.Finished: raise RuntimeError('Recording has already finished') - + self._h5file.flush() # Remove indata handler, which also should remove callback function # from StreamMgr. This, however does not have to happen