Rename trigger : Independent --> Normal, Trig Valid, from Both From Mather Board to Both from TRG_VAL; More GUI bugs fix for trigger related settings

This commit is contained in:
Ryan Tang 2024-10-31 18:03:12 -04:00
parent 2be9d34320
commit 81b2fba623
2 changed files with 16 additions and 10 deletions

View File

@ -662,13 +662,13 @@ void DigiSettingsPanel::SetUpGlobalTriggerMaskAndFrontPanelMask(QGridLayout * &
cbTRINMezzanines[ID] = new RComboBox(this);
gLayout->addWidget(cbTRINMezzanines[ID], 3, 1, 1, 2);
items = DPP::Bit_FrontPanelIOControl::ListTRGIMezzanine;
items = DPP::Bit_FrontPanelIOControl::ListTRGINMezzanine;
for(int i = 0; i < (int) items.size(); i++){
cbTRINMezzanines[ID]->addItem(QString::fromStdString(items[i].first), items[i].second);
}
connect( cbTRINMezzanines[ID], &RComboBox::currentIndexChanged, this, [=](int index){
if( !enableSignalSlot ) return;
digi[ID]->SetBits(DPP::FrontPanelIOControl, DPP::Bit_FrontPanelIOControl::TRGINMode, index, -1);
digi[ID]->SetBits(DPP::FrontPanelIOControl, DPP::Bit_FrontPanelIOControl::TRGINMezzanine, index, -1);
});
SetUpComboBox(cbAnalogMonitorMode[ID], "Analog Monitor Mode ", gLayout, 4, 0, DPP::AnalogMonitorMode, 0);
@ -3456,10 +3456,16 @@ void DigiSettingsPanel::UpdatePanelFromMemory(){
}
}
sbGlbMajLvl[ID]->setValue( Digitizer::ExtractBits(glbTrgMask, DPP::Bit_GlobalTriggerMask::MajorLevel) );
}
sbGlbMajCoinWin[ID]->setValue( Digitizer::ExtractBits(glbTrgMask, DPP::Bit_GlobalTriggerMask::MajorCoinWin) );
cbGlbUseOtherTriggers[ID]->setCurrentIndex(Digitizer::ExtractBits(glbTrgMask, {2, 30}));
sbGlbMajCoinWin[ID]->setValue( Digitizer::ExtractBits(glbTrgMask, DPP::Bit_GlobalTriggerMask::MajorCoinWin) * 4 * digi[ID]->GetTick2ns());
cbGlbUseOtherTriggers[ID]->setCurrentIndex(Digitizer::ExtractBits(glbTrgMask, {2, 30}));
if( sbGlbMajLvl[ID]->value() > 0 ) {
sbGlbMajCoinWin[ID]->setEnabled(true);
}else{
sbGlbMajCoinWin[ID]->setEnabled(false);
}
}
//*========================================
uint32_t TRGOUTMask = digi[ID]->GetSettingFromMemory(DPP::FrontPanelTRGOUTEnableMask);

View File

@ -314,7 +314,7 @@ namespace DPP {
const std::vector<std::pair<std::string, unsigned int>> ListPolarity = {{"Positive", 0},
{"Negative", 1}};
const std::vector<std::pair<std::string, unsigned int>> ListTrigMode = {{"Independent", 0},
const std::vector<std::pair<std::string, unsigned int>> ListTrigMode = {{"Normal", 0},
{"Coincident", 1},
{"Anti-Coincident", 3}};
@ -381,7 +381,7 @@ namespace DPP {
const std::vector<std::pair<std::string, unsigned int>> ListPolarity = {{"Positive", 0},
{"Negative", 1}};
const std::vector<std::pair<std::string, unsigned int>> ListTrigMode = {{"Independent", 0},
const std::vector<std::pair<std::string, unsigned int>> ListTrigMode = {{"Normal", 0},
{"Coincident ", 1},
{"Anti-Coincident", 3}};
@ -480,7 +480,7 @@ namespace DPP {
{"TTL I/O", 1}};
const std::vector<std::pair<std::string, unsigned int>> ListTRGIMode = {{"Edge of TRG-IN", 0},
{"Whole duration of TRG-IN", 1}};
const std::vector<std::pair<std::string, unsigned int>> ListTRGIMezzanine = {{"Pocessed by Motherboard", 0},
const std::vector<std::pair<std::string, unsigned int>> ListTRGINMezzanine = {{"Pocessed by Motherboard", 0},
{"Skip Motherboard", 1}};
const std::vector<std::pair<std::string, unsigned int>> ListTRGOUTConfig = {{"Disable", 0x00002}, /// this is TRG_OUT high imped. 0x811C bit[1]
@ -647,7 +647,7 @@ namespace DPP {
const std::vector<std::pair<std::string, unsigned int>> ListLocalTrigValidMode = {{"Disabled", 0},
{"Crossed Trigger", 4},
{"Both from Mother board", 5},
{"Both from TRG_VAL", 5},
{"AND", 6},
{"OR", 7}};
@ -736,7 +736,7 @@ namespace DPP {
const std::vector<std::pair<std::string, unsigned int>> ListLocalTrigValidMode = {{"Disabled", 0},
{"Crossed Trigger", 4},
{"Both from Mother board", 5},
{"Both from TRG_VAL", 5},
{"AND", 6},
{"OR", 7}};