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

@ -1339,8 +1339,10 @@ void Digitizer::SetOptimialAggOrg(){
uint32_t aggOrg = std::floor(maxAggOrg) ;
int bufferSize = pow(2, aggOrg) * EventAgg * eventSize;
printf("================= BufferSize : %d kSample | system memeory : %d kSample \n", bufferSize / 1024, MemorySizekSample);
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;
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);
if( para.IsCoupled() == true && chID >= 0 ) digi[ID]->SetBits(para, bit, cb->currentData().toUInt(), chID%2 == 0 ? chID + 1 : chID - 1);
UpdatePanelFromMemory();