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__);
|
||||
}
|
||||
|
||||
acqStatus = ReadRegister(DPP::AcquisitionStatus_R);
|
||||
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
void Digitizer::PrintACQStatue(){
|
||||
void Digitizer::ReadAndPrintACQStatue(){
|
||||
if( !isConnected ) return;
|
||||
unsigned int status = ReadRegister(DPP::AcquisitionStatus_R);
|
||||
|
||||
|
|
|
@ -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();
|
||||
|
||||
|
|
|
@ -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{
|
||||
|
|
Loading…
Reference in New Issue
Block a user