diff --git a/digiSettingsPanel.cpp b/digiSettingsPanel.cpp index 1d0d349..4bfadda 100644 --- a/digiSettingsPanel.cpp +++ b/digiSettingsPanel.cpp @@ -58,6 +58,8 @@ QStringList chToolTip = { "Channel signal delay initialization status (1 = initi "Time-energy event free space status (1 = time-energy can be written)", "Waveform event free space status (1 = waveform can be written)"}; +QColor orangeColor(255, 165, 0); + DigiSettingsPanel::DigiSettingsPanel(Digitizer2Gen ** digi, unsigned short nDigi, QString analysisPath, QWidget * parent) : QWidget(parent){ setWindowTitle("Digitizers Settings"); @@ -1672,12 +1674,12 @@ void DigiSettingsPanel::SetupPHAChannels(unsigned short digiID){ for( int ch = 0; ch < digi[digiID]->GetNChannels(); ch++){ //Set color of some combox - cbbOnOff[digiID][ch]->setItemData(1, QBrush(Qt::green), Qt::ForegroundRole); - connect(cbbOnOff[digiID][ch], &RComboBox::currentIndexChanged, this, [=](int index){ cbbOnOff[ID][ch]->setStyleSheet(index == 1 ? "color : green;" : "");}); - cbbParity[digiID][ch]->setItemData(1, QBrush(Qt::green), Qt::ForegroundRole); - connect(cbbParity[digiID][ch], &RComboBox::currentIndexChanged, this, [=](int index){ cbbParity[ID][ch]->setStyleSheet(index == 1 ? "color : green;" : "");}); - cbbLowFilter[digiID][ch]->setItemData(1, QBrush(Qt::green), Qt::ForegroundRole); - connect(cbbLowFilter[digiID][ch], &RComboBox::currentIndexChanged, this, [=](int index){ cbbLowFilter[ID][ch]->setStyleSheet(index == 1 ? "color : green;": "");}); + cbbOnOff[digiID][ch]->setItemData(1, QBrush(orangeColor), Qt::ForegroundRole); + connect(cbbOnOff[digiID][ch], &RComboBox::currentIndexChanged, this, [=](int index){ cbbOnOff[ID][ch]->setStyleSheet(index == 1 ? "color : orange;" : "");}); + cbbParity[digiID][ch]->setItemData(1, QBrush(orangeColor), Qt::ForegroundRole); + connect(cbbParity[digiID][ch], &RComboBox::currentIndexChanged, this, [=](int index){ cbbParity[ID][ch]->setStyleSheet(index == 1 ? "color : orange;" : "");}); + cbbLowFilter[digiID][ch]->setItemData(1, QBrush(orangeColor), Qt::ForegroundRole); + connect(cbbLowFilter[digiID][ch], &RComboBox::currentIndexChanged, this, [=](int index){ cbbLowFilter[ID][ch]->setStyleSheet(index == 1 ? "color : orange;": "");}); } } @@ -2093,10 +2095,10 @@ void DigiSettingsPanel::SetupPSDChannels(unsigned short digiID){ for( int ch = 0; ch < digi[digiID]->GetNChannels(); ch++){ //Set color of some combox - cbbOnOff[digiID][ch]->setItemData(1, QBrush(Qt::green), Qt::ForegroundRole); - connect(cbbOnOff[digiID][ch], &RComboBox::currentIndexChanged, this, [=](int index){ cbbOnOff[ID][ch]->setStyleSheet(index == 1 ? "color : green;" : "");}); - cbbParity[digiID][ch]->setItemData(1, QBrush(Qt::green), Qt::ForegroundRole); - connect(cbbParity[digiID][ch], &RComboBox::currentIndexChanged, this, [=](int index){ cbbParity[ID][ch]->setStyleSheet(index == 1 ? "color : green;" : "");}); + cbbOnOff[digiID][ch]->setItemData(1, QBrush(orangeColor), Qt::ForegroundRole); + connect(cbbOnOff[digiID][ch], &RComboBox::currentIndexChanged, this, [=](int index){ cbbOnOff[ID][ch]->setStyleSheet(index == 1 ? "color : orange;" : "");}); + cbbParity[digiID][ch]->setItemData(1, QBrush(orangeColor), Qt::ForegroundRole); + connect(cbbParity[digiID][ch], &RComboBox::currentIndexChanged, this, [=](int index){ cbbParity[ID][ch]->setStyleSheet(index == 1 ? "color : orange;" : "");}); } } diff --git a/mainwindow.cpp b/mainwindow.cpp index 8fd1220..8467d32 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -963,8 +963,12 @@ bool MainWindow::CheckSOLARISpanelOK(){ QTextStream in(&file); while (!in.atEnd()) { QString line = in.readLine(); + if( line.contains("//^")) continue; - if( line.contains("//C=")){ + if( line.contains("// //")) continue; + if( line.contains("////")) continue; + + if( line.contains("//C=")){ // detType int in1 = line.indexOf("{"); int in2 = line.lastIndexOf("}"); if( in2 > in1){ @@ -975,7 +979,7 @@ bool MainWindow::CheckSOLARISpanelOK(){ return false; } } - if( line.contains("//C%")){ + if( line.contains("//C%")){ // groupName int in1 = line.indexOf("{"); int in2 = line.lastIndexOf("}"); if( in2 > in1){ @@ -986,7 +990,7 @@ bool MainWindow::CheckSOLARISpanelOK(){ return false; } } - if( line.contains("//C&")){ + if( line.contains("//C&")){ //groupID int in1 = line.indexOf("{"); int in2 = line.lastIndexOf("}"); if( in2 > in1){ @@ -998,7 +1002,7 @@ bool MainWindow::CheckSOLARISpanelOK(){ return false; } } - if( line.contains("//C#")){ + if( line.contains("//C#")){ //detMaxID int in1 = line.indexOf("{"); int in2 = line.lastIndexOf("}"); if( in2 > in1){ diff --git a/scope.cpp b/scope.cpp index 77220d2..e996362 100644 --- a/scope.cpp +++ b/scope.cpp @@ -569,10 +569,10 @@ void Scope::StartScope(){ ReadScopeSettings(); /// the settings are the same for PHA and PSD - for( int ch2 = 0 ; ch2 < digi[iDigi]->GetNChannels(); ch2 ++){ channelEnable[iDigi][ch2] = digi[iDigi]->ReadValue(PHA::CH::ChannelEnable, ch2); } + digi[iDigi]->WriteValue(PHA::CH::ChannelEnable, "False", -1); if( iDigi == cbScopeDigi->currentIndex() ){ @@ -630,7 +630,6 @@ void Scope::StopScope(){ digi[i]->WriteValue(PHA::CH::WaveTriggerSource, waveTriggerSource, cbScopeCh->currentIndex()); digi[i]->WriteValue(PHA::CH::WaveSaving, waveSaving, cbScopeCh->currentIndex()); } - originalValueSet = false; } digiMTX[i].unlock(); } @@ -638,6 +637,7 @@ void Scope::StopScope(){ emit TellACQOnOff(false); } + originalValueSet = false; ScopeControlOnOff(true); emit TellSettingsPanelControlOnOff();