UI bugs fix

This commit is contained in:
Ryan Tang 2024-10-30 18:48:00 -04:00
parent 4eca8eb09a
commit 2be9d34320
2 changed files with 17 additions and 8 deletions

View File

@ -407,7 +407,13 @@ void DigiSettingsPanel::SetUpCheckBox(QCheckBox * &chkBox, QString label, QGridL
if( !enableSignalSlot ) return;
int chID = ch < 0 ? chSelection[ID]->currentData().toInt() : ch;
digi[ID]->SetBits(para, bit, state ? 1 : 0, chID);
if( para == DPP::DisableExternalTrigger ) {
digi[ID]->SetBits(para, bit, state ? 0 : 1, chID);
}else{
digi[ID]->SetBits(para, bit, state ? 1 : 0, chID);
}
if( para.IsCoupled() == true && chID >= 0 ) digi[ID]->SetBits(para, bit, state ? 1 : 0, chID%2 == 0 ? chID + 1 : chID - 1);
UpdatePanelFromMemory();
emit UpdateOtherPanels();
@ -625,6 +631,11 @@ void DigiSettingsPanel::SetUpGlobalTriggerMaskAndFrontPanelMask(QGridLayout * &
});
SetUpCheckBox(chkEnableExternalTrigger[ID], "Enable TRG-IN ", gLayout, 1, 1, DPP::DisableExternalTrigger, {1, 0});
connect(chkEnableExternalTrigger[ID], &QCheckBox::stateChanged, this, [=](int state){
cbTRGINMode[ID]->setEnabled(state);
cbTRINMezzanines[ID]->setEnabled(state);
});
///============================ Trig In mode
QLabel * trgInMode = new QLabel("TRI-In Mode ", this);
@ -660,11 +671,6 @@ void DigiSettingsPanel::SetUpGlobalTriggerMaskAndFrontPanelMask(QGridLayout * &
digi[ID]->SetBits(DPP::FrontPanelIOControl, DPP::Bit_FrontPanelIOControl::TRGINMode, index, -1);
});
connect(chkEnableExternalTrigger[ID], &QCheckBox::stateChanged, this, [=](int state){
cbTRGINMode[ID]->setEnabled(state);
cbTRINMezzanines[ID]->setEnabled(state);
});
SetUpComboBox(cbAnalogMonitorMode[ID], "Analog Monitor Mode ", gLayout, 4, 0, DPP::AnalogMonitorMode, 0);
connect(cbAnalogMonitorMode[ID], &RComboBox::currentIndexChanged, this, [=](int index){
@ -3390,7 +3396,7 @@ void DigiSettingsPanel::UpdatePanelFromMemory(){
sbAggNum[ID]->setValue(digi[ID]->GetSettingFromMemory(DPP::MaxAggregatePerBlockTransfer));
chkEnableExternalTrigger[ID]->setChecked( ! ( digi[ID]->GetSettingFromMemory(DPP::DisableExternalTrigger) & 0x1) );
chkEnableExternalTrigger[ID]->setChecked( !( digi[ID]->GetSettingFromMemory(DPP::DisableExternalTrigger) & 0x1) );
sbRunDelay[ID]->setValue(digi[ID]->GetSettingFromMemory(DPP::RunStartStopDelay) * DPP::RunStartStopDelay.GetPartialStep() * digi[ID]->GetTick2ns());
@ -3435,6 +3441,9 @@ void DigiSettingsPanel::UpdatePanelFromMemory(){
}
}
cbTRGINMode[ID]->setCurrentIndex((frontPanel >> 10 ) & 0x1);
cbTRINMezzanines[ID]->setCurrentIndex((frontPanel >> 11 ) & 0x1);
//*========================================
uint32_t glbTrgMask = digi[ID]->GetSettingFromMemory(DPP::GlobalTriggerMask);

View File

@ -545,7 +545,7 @@ namespace DPP {
const Reg RegChannelEnableMask ("RegChannelEnableMask" , 0x8120, RW::ReadWrite, false, {}); /// R/W
const Reg ROCFPGAFirmwareRevision_R ("ROCFPGAFirmwareRevision_R" , 0x8124, RW::ReadONLY , false, {}); /// R
const Reg EventStored_R ("EventStored_R" , 0x812C, RW::ReadONLY , false, {}); /// R
const Reg VoltageLevelModeConfig ("VoltageLevelModeConfig" , 0x8138, RW::ReadWrite, false, {}); /// R/W
const Reg VoltageLevelModeConfig ("VoltageLevelModeConfig" , 0x8138, RW::ReadWrite, false, 0xFFF, -1); /// R/W
const Reg SoftwareClockSync_W ("SoftwareClockSync_W" , 0x813C, RW::WriteONLY, false, {}); /// W
const Reg BoardInfo_R ("BoardInfo_R" , 0x8140, RW::ReadONLY , false, {}); /// R
const Reg AnalogMonitorMode ("AnalogMonitorMode" , 0x8144, RW::ReadWrite, false, {{"Trig. Maj. Mode", 0},