bugs fix after tested ANASEN, for some reason, no scalar, but can take data.

This commit is contained in:
carina@hades 2023-10-17 17:01:57 -04:00
parent 1b03f09854
commit 66437f0262
4 changed files with 13 additions and 10 deletions

View File

@ -24,6 +24,7 @@ public:
public slots:
void UpdatePanelFromMemory();
void ReadSettingsFromBoard();
void UpdateBoardAndChannelsStatus(); // will ReadRegister
void SaveSetting(int opt);
void LoadSetting();
@ -64,7 +65,6 @@ private:
void SyncComboBox(RComboBox *(&cb)[][MaxRegChannel+1]);
void SyncCheckBox(QCheckBox *(&chk)[][MaxRegChannel+1]);
void UpdateBoardAndChannelsStatus(); // ReadRegister
void SyncAllChannelsTab_PHA();
void UpdateSettings_PHA();

View File

@ -656,11 +656,11 @@ void MainWindow::OpenDigitizers(){
LogMsg("Found <b>" + fileName + "</b> for digitizer settings.");
// if( digi[i]->LoadSettingBinaryToMemory(fileName.toStdString().c_str()) == 0 ){
// LogMsg("Loaded settings file <b>" + fileName + "</b> for Digi-" + QString::number(digi[i]->GetSerialNumber()));
// digi[i]->ProgramSettingsToBoard();
//
// LogMsg("Loaded settings file <b>" + fileName + "</b> for Digi-" + QString::number(digi[i]->GetSerialNumber()));
// digi[i]->ProgramSettingsToBoard();
// }else{
// LogMsg("Fail to Loaded settings file " + fileName + " for Digi-" + QString::number(digi[i]->GetSerialNumber()));
// LogMsg("Fail to Loaded settings file " + fileName + " for Digi-" + QString::number(digi[i]->GetSerialNumber()));
// }
}
digi[i]->ReadAllSettingsFromBoard(true);
@ -967,6 +967,9 @@ void MainWindow::UpdateScalar(){
}
}
}
//if( digiSettings && digiSettings->isVisible()) digiSettings->UpdateBoardAndChannelsStatus();
digiMTX[iDigi].unlock();
}

View File

@ -78,7 +78,7 @@ Scope::Scope(Digitizer ** digi, unsigned int nDigi, ReadDataThread ** readDataTh
ID = 0;
cbScopeDigi->setCurrentIndex(0);
for( int i = 0; i < digi[0]->GetNumRegChannels(); i++) cbScopeCh->addItem("Ch-" + QString::number(i));
for( int i = 0; i < digi[0]->GetNumInputCh(); i++) cbScopeCh->addItem("Ch-" + QString::number(i));
tick2ns = digi[ID]->GetTick2ns();
factor = digi[ID]->IsDualTrace_PHA() ? 2 : 1;
@ -95,7 +95,7 @@ Scope::Scope(Digitizer ** digi, unsigned int nDigi, ReadDataThread ** readDataTh
enableSignalSlot = false;
//---setup cbScopeCh
cbScopeCh->clear();
for( int i = 0; i < digi[ID]->GetNumRegChannels(); i++) cbScopeCh->addItem("Ch-" + QString::number(i));
for( int i = 0; i < digi[ID]->GetNumInputCh(); i++) cbScopeCh->addItem("Ch-" + QString::number(i));
//---Setup SettingGroup
CleanUpSettingsGroupBox();

View File

@ -43,7 +43,7 @@ private:
Digitizer ** digi;
unsigned short nDigi;
Histogram1D * hist[MaxNDigitizer][MaxRegChannel];
Histogram1D * hist[MaxNDigitizer][MaxNChannels];
RComboBox * cbDivision;
@ -54,8 +54,8 @@ private:
QGridLayout * histLayout;
int oldBd, oldCh;
int lastFilledIndex[MaxNDigitizer][MaxRegChannel];
int loopFilledIndex[MaxNDigitizer][MaxRegChannel];
int lastFilledIndex[MaxNDigitizer][MaxNChannels];
int loopFilledIndex[MaxNDigitizer][MaxNChannels];
bool fillHistograms;