diff --git a/FSUDAQ.cpp b/FSUDAQ.cpp index 8981e01..67abfc0 100644 --- a/FSUDAQ.cpp +++ b/FSUDAQ.cpp @@ -200,6 +200,10 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent){ lbPrefix->setAlignment(Qt::AlignRight | Qt::AlignCenter); lePrefix = new QLineEdit(this); lePrefix->setAlignment(Qt::AlignHCenter); + connect(lePrefix, &QLineEdit::textChanged, this, [=](){ + lePrefix->setStyleSheet("color:blue;"); + }); + connect(lePrefix, &QLineEdit::returnPressed, this, &MainWindow::SaveLastRunFile); QLabel * lbRunID = new QLabel("Run No. :", this); lbRunID->setAlignment(Qt::AlignRight | Qt::AlignCenter); @@ -550,6 +554,7 @@ void MainWindow::LoadLastRunFile(){ } lePrefix->setText(prefix); + lePrefix->setStyleSheet(""); leRunID->setText(QString::number(runID)); } @@ -560,8 +565,10 @@ void MainWindow::SaveLastRunFile(){ QFile file(rawDataPath + "/lastRun.sh"); - file.open(QIODevice::Text | QIODevice::WriteOnly); + prefix = lePrefix->text(); + lePrefix->setStyleSheet(""); + file.open(QIODevice::Text | QIODevice::WriteOnly); file.write(("prefix=" + prefix + "\n").toStdString().c_str()); file.write(("runID=" + QString::number(runID) + "\n").toStdString().c_str()); file.write(("elogID=" + QString::number(elogID) + "\n").toStdString().c_str()); @@ -985,6 +992,8 @@ void MainWindow::StartACQ(){ bnOpenScope->setEnabled(false); cbAutoRun->setEnabled(false); + if( digiSettings ) digiSettings->setEnabled(false); + if( onlineAnalyzer ) onlineAnalyzer->StartThread(); {//^=== elog and database @@ -1058,6 +1067,8 @@ void MainWindow::StopACQ(){ bnOpenScope->setEnabled(true); cbAutoRun->setEnabled(true); + if( digiSettings ) digiSettings->setEnabled(true); + {//^=== elog and database if( influx ){ influx->AddDataPoint("SavingData,ExpName=" + elogName.toStdString() + " value=0"); @@ -1365,6 +1376,8 @@ void MainWindow::OpenScope(){ } } + if( digiSettings ) digiSettings->setEnabled(!onOff); + if( canvas ){ if( onOff) { histThread->start(); diff --git a/README.md b/README.md index fc5646f..76d5b86 100644 --- a/README.md +++ b/README.md @@ -106,7 +106,8 @@ Those file can be compiled using # Known Issues * DC offset issue. When porgram default settings, the DC offset is not the same for all channels. -* for PHA firmware, when the peak average changed, the Events per Agg need to be changed. +* for PHA firmware, when the trigger average changed, the Events per Agg need to be changed. +* Sometimes, the buffer is not in time order, and make the trigger/Accept rate to be nagative. This is nothing to do with the program but the digitizer settings. Recommand reporgram the digitizer. # Known Bugs