added Sync Helper
This commit is contained in:
parent
eda5aeb36d
commit
38525125c4
|
@ -61,7 +61,7 @@ QStringList chToolTip = { "Channel signal delay initialization status (1 = initi
|
||||||
DigiSettingsPanel::DigiSettingsPanel(Digitizer2Gen ** digi, unsigned short nDigi, QString analysisPath, QWidget * parent) : QWidget(parent){
|
DigiSettingsPanel::DigiSettingsPanel(Digitizer2Gen ** digi, unsigned short nDigi, QString analysisPath, QWidget * parent) : QWidget(parent){
|
||||||
|
|
||||||
setWindowTitle("Digitizers Settings");
|
setWindowTitle("Digitizers Settings");
|
||||||
setGeometry(0, 0, 1850, 1000);
|
setGeometry(0, 0, 1850, 1050);
|
||||||
//setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
|
//setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
|
||||||
|
|
||||||
this->digi = digi;
|
this->digi = digi;
|
||||||
|
@ -74,7 +74,6 @@ DigiSettingsPanel::DigiSettingsPanel(Digitizer2Gen ** digi, unsigned short nDigi
|
||||||
|
|
||||||
ID = 0;
|
ID = 0;
|
||||||
enableSignalSlot = false;
|
enableSignalSlot = false;
|
||||||
|
|
||||||
QVBoxLayout * mainLayout = new QVBoxLayout(this); this->setLayout(mainLayout);
|
QVBoxLayout * mainLayout = new QVBoxLayout(this); this->setLayout(mainLayout);
|
||||||
tabWidget = new QTabWidget(this); mainLayout->addWidget(tabWidget);
|
tabWidget = new QTabWidget(this); mainLayout->addWidget(tabWidget);
|
||||||
|
|
||||||
|
@ -89,11 +88,10 @@ DigiSettingsPanel::DigiSettingsPanel(Digitizer2Gen ** digi, unsigned short nDigi
|
||||||
QWidget * tab = new QWidget(tabWidget);
|
QWidget * tab = new QWidget(tabWidget);
|
||||||
scrollArea->setWidget(tab);
|
scrollArea->setWidget(tab);
|
||||||
|
|
||||||
QHBoxLayout * tabLayout_H = new QHBoxLayout(tab); //tab->setLayout(tabLayout_H);
|
QHBoxLayout * tabLayout_H = new QHBoxLayout(tab);
|
||||||
|
QVBoxLayout * tabLayout_V1 = new QVBoxLayout(); tabLayout_H->addLayout(tabLayout_V1);
|
||||||
QVBoxLayout * tabLayout_V1 = new QVBoxLayout(tab); tabLayout_H->addLayout(tabLayout_V1);
|
QVBoxLayout * tabLayout_V2 = new QVBoxLayout(); tabLayout_H->addLayout(tabLayout_V2);
|
||||||
QVBoxLayout * tabLayout_V2 = new QVBoxLayout(tab); tabLayout_H->addLayout(tabLayout_V2);
|
|
||||||
|
|
||||||
{//^====================== Group of Digitizer Info
|
{//^====================== Group of Digitizer Info
|
||||||
QGroupBox * infoBox = new QGroupBox("Board Info", tab);
|
QGroupBox * infoBox = new QGroupBox("Board Info", tab);
|
||||||
//infoBox->setSizePolicy(sizePolicy);
|
//infoBox->setSizePolicy(sizePolicy);
|
||||||
|
|
|
@ -805,27 +805,45 @@ void MainWindow::OpenSyncHelper(){
|
||||||
QVBoxLayout * layout = new QVBoxLayout(&dialog);
|
QVBoxLayout * layout = new QVBoxLayout(&dialog);
|
||||||
|
|
||||||
QPushButton * bnNoSync = new QPushButton("No Sync", &dialog);
|
QPushButton * bnNoSync = new QPushButton("No Sync", &dialog);
|
||||||
QPushButton * bnMethod1 = new QPushButton("Software TRG-OUT --> TRG-IN ", &dialog);
|
QPushButton * bnMethod1 = new QPushButton("Software CLK-OUT --> CLK-IN\n(Master = 1st Digi)", &dialog);
|
||||||
QPushButton * bnMethod2 = new QPushButton("Software TRG-OUT --> S-IN ", &dialog);
|
|
||||||
QPushButton * bnMethod3 = new QPushButton("External TRG-OUT --> S-IN ", &dialog);
|
|
||||||
|
|
||||||
layout->addWidget( bnNoSync, 1);
|
layout->addWidget( bnNoSync, 1);
|
||||||
layout->addWidget(bnMethod1, 2);
|
layout->addWidget(bnMethod1, 2);
|
||||||
layout->addWidget(bnMethod2, 3);
|
|
||||||
layout->addWidget(bnMethod3, 4);
|
|
||||||
|
|
||||||
bnNoSync->setFixedHeight(40);
|
bnNoSync->setFixedHeight(40);
|
||||||
bnMethod1->setFixedHeight(40);
|
bnMethod1->setFixedHeight(40);
|
||||||
bnMethod2->setFixedHeight(40);
|
|
||||||
bnMethod3->setFixedHeight(40);
|
|
||||||
|
|
||||||
connect(bnNoSync, &QPushButton::clicked, [&](){
|
connect(bnNoSync, &QPushButton::clicked, [&](){
|
||||||
for(unsigned int i = 0; i < nDigi; i++){
|
for(unsigned int i = 0; i < nDigi; i++){
|
||||||
|
digi[i]->WriteValue(PHA::DIG::ClockSource, "Internal");
|
||||||
|
digi[i]->WriteValue(PHA::DIG::StartSource, "SWcmd");
|
||||||
|
digi[i]->WriteValue(PHA::DIG::SyncOutMode, "Disabled");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if( digiSetting ) digiSetting->UpdatePanelFromMemory();
|
||||||
|
|
||||||
dialog.accept();
|
dialog.accept();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
connect(bnMethod1, &QPushButton::clicked, [&](){
|
||||||
|
digi[0]->WriteValue(PHA::DIG::ClockSource, "Internal");
|
||||||
|
digi[0]->WriteValue(PHA::DIG::EnableClockOutFrontPanel, "True");
|
||||||
|
digi[0]->WriteValue(PHA::DIG::StartSource, "SWcmd");
|
||||||
|
digi[0]->WriteValue(PHA::DIG::SyncOutMode, "Run");
|
||||||
|
|
||||||
|
for(unsigned int i = 1; i < nDigi; i++){
|
||||||
|
digi[i]->WriteValue(PHA::DIG::ClockSource, "FPClkIn");
|
||||||
|
digi[i]->WriteValue(PHA::DIG::EnableClockOutFrontPanel, "True");
|
||||||
|
digi[i]->WriteValue(PHA::DIG::StartSource, "EncodedClkIn");
|
||||||
|
digi[i]->WriteValue(PHA::DIG::SyncOutMode, "SyncIn");
|
||||||
|
}
|
||||||
|
|
||||||
|
if( digiSetting ) digiSetting->UpdatePanelFromMemory();
|
||||||
|
|
||||||
|
dialog.accept();
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
dialog.exec();
|
dialog.exec();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -446,6 +446,7 @@ void Scope::StartScope(){
|
||||||
|
|
||||||
ReadScopeSettings();
|
ReadScopeSettings();
|
||||||
|
|
||||||
|
digi[iDigi]->WriteValue(PHA::CH::WaveSaving, "Always", -1);
|
||||||
digi[iDigi]->WriteValue(PHA::CH::ChannelEnable, "False", -1);
|
digi[iDigi]->WriteValue(PHA::CH::ChannelEnable, "False", -1);
|
||||||
digi[iDigi]->WriteValue(PHA::CH::ChannelEnable, "True", ch);
|
digi[iDigi]->WriteValue(PHA::CH::ChannelEnable, "True", ch);
|
||||||
digi[iDigi]->SetPHADataFormat(0);
|
digi[iDigi]->SetPHADataFormat(0);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user