QDC: fix bug when charge sensitiy change, parity change

This commit is contained in:
Ryan Tang 2024-03-20 14:13:16 -04:00
parent ecd7ea9afd
commit 405b255344
2 changed files with 14 additions and 1 deletions

View File

@ -1342,5 +1342,7 @@ void Digitizer::SetOptimialAggOrg(){
WriteRegister(DPP::AggregateOrganization, aggOrg); WriteRegister(DPP::AggregateOrganization, aggOrg);
//TODO when maxAggOrg < 1, need to reduce the Event/Agg
} }

View File

@ -397,6 +397,17 @@ void DigiSettingsPanel::SetUpComboBoxBit(RComboBox * &cb, QString label, QGridLa
int chID = ch < 0 ? chSelection[ID]->currentData().toInt() : ch; int chID = ch < 0 ? chSelection[ID]->currentData().toInt() : ch;
if( ch == -1 && chID == -1) {
for(int kk = 0; kk < digi[ID]->GetNumRegChannels(); kk++){
digi[ID]->SetBits(para, bit, cb->currentData().toUInt(), kk);
}
UpdatePanelFromMemory();
emit UpdateOtherPanels();
return;
}
digi[ID]->SetBits(para, bit, cb->currentData().toUInt(), chID); digi[ID]->SetBits(para, bit, cb->currentData().toUInt(), chID);
if( para.IsCoupled() == true && chID >= 0 ) digi[ID]->SetBits(para, bit, cb->currentData().toUInt(), chID%2 == 0 ? chID + 1 : chID - 1); if( para.IsCoupled() == true && chID >= 0 ) digi[ID]->SetBits(para, bit, cb->currentData().toUInt(), chID%2 == 0 ? chID + 1 : chID - 1);
UpdatePanelFromMemory(); UpdatePanelFromMemory();