get acqStatus in the ReadData() method, to solve the possible hang up when updating acqstatus
This commit is contained in:
parent
d62d037492
commit
386e632198
|
@ -587,10 +587,13 @@ int Digitizer::ReadData(){
|
||||||
ErrorMsg(__func__);
|
ErrorMsg(__func__);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
acqStatus = ReadRegister(DPP::AcquisitionStatus_R);
|
||||||
|
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Digitizer::PrintACQStatue(){
|
void Digitizer::ReadAndPrintACQStatue(){
|
||||||
if( !isConnected ) return;
|
if( !isConnected ) return;
|
||||||
unsigned int status = ReadRegister(DPP::AcquisitionStatus_R);
|
unsigned int status = ReadRegister(DPP::AcquisitionStatus_R);
|
||||||
|
|
||||||
|
|
|
@ -62,6 +62,8 @@ class Digitizer{
|
||||||
|
|
||||||
uint32_t returnData;
|
uint32_t returnData;
|
||||||
|
|
||||||
|
uint32_t acqStatus;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
Digitizer(); /// no digitizer open
|
Digitizer(); /// no digitizer open
|
||||||
Digitizer(int boardID, int portID = 0, bool program = false, bool verbose = false);
|
Digitizer(int boardID, int portID = 0, bool program = false, bool verbose = false);
|
||||||
|
@ -92,7 +94,8 @@ class Digitizer{
|
||||||
int ReadData();
|
int ReadData();
|
||||||
bool IsRunning() const {return AcqRun;}
|
bool IsRunning() const {return AcqRun;}
|
||||||
Data * GetData() const {return data;}
|
Data * GetData() const {return data;}
|
||||||
void PrintACQStatue();
|
uint32_t GetACQStatus() const {return acqStatus;}
|
||||||
|
void ReadAndPrintACQStatue();
|
||||||
|
|
||||||
unsigned int CalByteForBuffer();
|
unsigned int CalByteForBuffer();
|
||||||
|
|
||||||
|
|
|
@ -974,14 +974,13 @@ void MainWindow::UpdateScalar(){
|
||||||
|
|
||||||
lbLastUpdateTime->setText("Last update: " + QDateTime::currentDateTime().toString("MM.dd hh:mm:ss"));
|
lbLastUpdateTime->setText("Last update: " + QDateTime::currentDateTime().toString("MM.dd hh:mm:ss"));
|
||||||
|
|
||||||
//printf("----------------------\n");
|
|
||||||
uint64_t totalFileSize = 0;
|
uint64_t totalFileSize = 0;
|
||||||
for( unsigned int iDigi = 0; iDigi < nDigi; iDigi++){
|
for( unsigned int iDigi = 0; iDigi < nDigi; iDigi++){
|
||||||
if( digi[iDigi]->IsBoardDisabled() ) continue;
|
if( digi[iDigi]->IsBoardDisabled() ) continue;
|
||||||
|
|
||||||
digiMTX[iDigi].lock();
|
digiMTX[iDigi].lock();
|
||||||
|
|
||||||
uint32_t acqStatus = digi[iDigi]->ReadRegister(DPP::AcquisitionStatus_R);
|
uint32_t acqStatus = digi[iDigi]->GetACQStatus();
|
||||||
if( ( acqStatus >> 2 ) & 0x1 ){
|
if( ( acqStatus >> 2 ) & 0x1 ){
|
||||||
runStatus[iDigi]->setStyleSheet("background-color : green;");
|
runStatus[iDigi]->setStyleSheet("background-color : green;");
|
||||||
}else{
|
}else{
|
||||||
|
|
Loading…
Reference in New Issue
Block a user