scope can fill histogram

This commit is contained in:
splitPoleDAQ 2023-05-19 16:49:01 -04:00
parent 3b9d47bbef
commit 38c4d0d992
2 changed files with 20 additions and 7 deletions

View File

@ -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("<font style=\"color: green;\"><b>ACQ On</b></font>");
}else{
lbScalarACQStatus->setText("<font style=\"color: red;\"><b>ACQ Off</b></font>");
if( scope ) {
if( onOff ) {
lbScalarACQStatus->setText("<font style=\"color: green;\"><b>ACQ On</b></font>");
}else{
lbScalarACQStatus->setText("<font style=\"color: red;\"><b>ACQ Off</b></font>");
}
}
if( canvas ){
if( onOff ) {
histThread->start();
}else{
if( histThread->isRunning()){
histThread->Stop();
histThread->quit();
histThread->wait();
}
}
}
});

View File

@ -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, [=](){