diff --git a/ClassDigitizer.cpp b/ClassDigitizer.cpp index 9297fba..f005a5e 100644 --- a/ClassDigitizer.cpp +++ b/ClassDigitizer.cpp @@ -587,10 +587,13 @@ int Digitizer::ReadData(){ ErrorMsg(__func__); } + acqStatus = ReadRegister(DPP::AcquisitionStatus_R); + + return ret; } -void Digitizer::PrintACQStatue(){ +void Digitizer::ReadAndPrintACQStatue(){ if( !isConnected ) return; unsigned int status = ReadRegister(DPP::AcquisitionStatus_R); diff --git a/ClassDigitizer.h b/ClassDigitizer.h index aa03071..29faa72 100644 --- a/ClassDigitizer.h +++ b/ClassDigitizer.h @@ -62,6 +62,8 @@ class Digitizer{ uint32_t returnData; + uint32_t acqStatus; + public: Digitizer(); /// no digitizer open Digitizer(int boardID, int portID = 0, bool program = false, bool verbose = false); @@ -92,7 +94,8 @@ class Digitizer{ int ReadData(); bool IsRunning() const {return AcqRun;} Data * GetData() const {return data;} - void PrintACQStatue(); + uint32_t GetACQStatus() const {return acqStatus;} + void ReadAndPrintACQStatue(); unsigned int CalByteForBuffer(); diff --git a/FSUDAQ.cpp b/FSUDAQ.cpp index 406bd29..a4c97a8 100644 --- a/FSUDAQ.cpp +++ b/FSUDAQ.cpp @@ -974,14 +974,13 @@ void MainWindow::UpdateScalar(){ lbLastUpdateTime->setText("Last update: " + QDateTime::currentDateTime().toString("MM.dd hh:mm:ss")); - //printf("----------------------\n"); uint64_t totalFileSize = 0; for( unsigned int iDigi = 0; iDigi < nDigi; iDigi++){ if( digi[iDigi]->IsBoardDisabled() ) continue; digiMTX[iDigi].lock(); - uint32_t acqStatus = digi[iDigi]->ReadRegister(DPP::AcquisitionStatus_R); + uint32_t acqStatus = digi[iDigi]->GetACQStatus(); if( ( acqStatus >> 2 ) & 0x1 ){ runStatus[iDigi]->setStyleSheet("background-color : green;"); }else{