From 81b2fba62346dae7a7d3121d3077e838b1fbe144 Mon Sep 17 00:00:00 2001 From: "Ryan@SOLARIS_testStation" Date: Thu, 31 Oct 2024 18:03:12 -0400 Subject: [PATCH] Rename trigger : Independent --> Normal, Trig Valid, from Both From Mather Board to Both from TRG_VAL; More GUI bugs fix for trigger related settings --- DigiSettingsPanel.cpp | 16 +++++++++++----- RegisterAddress.h | 10 +++++----- 2 files changed, 16 insertions(+), 10 deletions(-) diff --git a/DigiSettingsPanel.cpp b/DigiSettingsPanel.cpp index 96406a4..e3f48af 100644 --- a/DigiSettingsPanel.cpp +++ b/DigiSettingsPanel.cpp @@ -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); diff --git a/RegisterAddress.h b/RegisterAddress.h index f9dd3c6..905257b 100644 --- a/RegisterAddress.h +++ b/RegisterAddress.h @@ -314,7 +314,7 @@ namespace DPP { const std::vector> ListPolarity = {{"Positive", 0}, {"Negative", 1}}; - const std::vector> ListTrigMode = {{"Independent", 0}, + const std::vector> ListTrigMode = {{"Normal", 0}, {"Coincident", 1}, {"Anti-Coincident", 3}}; @@ -381,7 +381,7 @@ namespace DPP { const std::vector> ListPolarity = {{"Positive", 0}, {"Negative", 1}}; - const std::vector> ListTrigMode = {{"Independent", 0}, + const std::vector> ListTrigMode = {{"Normal", 0}, {"Coincident ", 1}, {"Anti-Coincident", 3}}; @@ -480,7 +480,7 @@ namespace DPP { {"TTL I/O", 1}}; const std::vector> ListTRGIMode = {{"Edge of TRG-IN", 0}, {"Whole duration of TRG-IN", 1}}; - const std::vector> ListTRGIMezzanine = {{"Pocessed by Motherboard", 0}, + const std::vector> ListTRGINMezzanine = {{"Pocessed by Motherboard", 0}, {"Skip Motherboard", 1}}; const std::vector> ListTRGOUTConfig = {{"Disable", 0x00002}, /// this is TRG_OUT high imped. 0x811C bit[1] @@ -647,7 +647,7 @@ namespace DPP { const std::vector> 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> ListLocalTrigValidMode = {{"Disabled", 0}, {"Crossed Trigger", 4}, - {"Both from Mother board", 5}, + {"Both from TRG_VAL", 5}, {"AND", 6}, {"OR", 7}};