diff --git a/FSUDAQ.cpp b/FSUDAQ.cpp index c498d8a..fcf0107 100644 --- a/FSUDAQ.cpp +++ b/FSUDAQ.cpp @@ -394,7 +394,7 @@ void MainWindow::OpenDigitizers(){ } histThread = new TimingThread(this); - histThread->SetWaitTimeinSec(1); + histThread->SetWaitTimeinSec(0.5); connect(histThread, &TimingThread::timeUp, this, [=](){ if( canvas == nullptr ) return; canvas->UpdateCanvas(); @@ -457,6 +457,7 @@ void MainWindow::WaitForDigitizersOpen(bool onOff){ bnStartACQ->setEnabled(!onOff); bnStopACQ->setEnabled(!onOff); chkSaveData->setEnabled(!onOff); + bnCanvas->setEnabled(!onOff); } @@ -809,11 +810,24 @@ void MainWindow::OpenScope(){ bnStopACQ->setEnabled(false); }); connect(scope, &Scope::TellACQOnOff, this, [=](bool onOff){ - if( scope == nullptr ) return; - if( onOff ) { - lbScalarACQStatus->setText("ACQ On"); - }else{ - lbScalarACQStatus->setText("ACQ Off"); + if( scope ) { + if( onOff ) { + lbScalarACQStatus->setText("ACQ On"); + }else{ + lbScalarACQStatus->setText("ACQ Off"); + } + } + + if( canvas ){ + if( onOff ) { + histThread->start(); + }else{ + if( histThread->isRunning()){ + histThread->Stop(); + histThread->quit(); + histThread->wait(); + } + } } }); diff --git a/Scope.cpp b/Scope.cpp index ee9e70b..fbfbcf9 100644 --- a/Scope.cpp +++ b/Scope.cpp @@ -125,7 +125,6 @@ Scope::Scope(Digitizer ** digi, unsigned int nDigi, ReadDataThread ** readDataTh layout->addWidget(bnReadSettingsFromBoard, rowID, 2); connect(bnReadSettingsFromBoard, &QPushButton::clicked, this, &Scope::ReadSettingsFromBoard); - QPushButton * bnClearMemory = new QPushButton("Clear Memory", this); layout->addWidget(bnClearMemory, rowID, 3); connect(bnClearMemory, &QPushButton::clicked, this, [=](){