Skip to content

Commit 4999be0

Browse files
committed
Add the ability to save all device parameter changes to notes.csv during recording
1 parent f1ea4ba commit 4999be0

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

source/datasaver.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -345,6 +345,7 @@ void DataSaver::startRecording(QMap<QString,QVariant> ucInfo)
345345
noteFile = new QFile(baseDirectory + "/notes.csv");
346346
noteFile->open(QFile::WriteOnly | QFile::Truncate);
347347
noteStream = new QTextStream(noteFile);
348+
*noteStream << "Time Stamp (ms), Note" << endl;
348349

349350
// TODO: Save camera calibration file to data directory for each behavioral camera
350351
m_recording = true;
@@ -382,7 +383,10 @@ void DataSaver::devicePropertyChanged(QString deviceName, QString propName, QVar
382383
{
383384
deviceProperties[deviceName][propName] = propValue;
384385
qDebug() << deviceName << propName << propValue;
385-
// TODO: signal change to filing keeping track of changes during recording
386+
387+
QString s = deviceName + "," + propName + "," + propValue.toString();
388+
// TODO: Make sure this writes changes in parameters correctly to the notes file
389+
takeNote(s); // Sends this information to be written to the notes csv file
386390
}
387391

388392
void DataSaver::takeScreenShot(QString type)

0 commit comments

Comments
 (0)