mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-11 04:17:15 +02:00
wip
This commit is contained in:
@ -514,7 +514,7 @@
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Dynamic HG0</string>
|
||||
<string>High Gain 0</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
@ -572,6 +572,11 @@
|
||||
<string>G4_LG</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Gain 0</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Undefined</string>
|
||||
|
@ -32,5 +32,30 @@ class qTabSettings : public QWidget, private Ui::TabSettingsObject {
|
||||
sls::Detector *det;
|
||||
std::vector<QCheckBox *> counters;
|
||||
|
||||
enum {
|
||||
STANDARD,
|
||||
FAST,
|
||||
HIGHGAIN,
|
||||
DYNAMICGAIN,
|
||||
LOWGAIN,
|
||||
MEDIUMGAIN,
|
||||
VERYHIGHGAIN,
|
||||
HIGHGAIN0,
|
||||
FIXGAIN1,
|
||||
FIXGAIN2,
|
||||
VERLOWGAIN,
|
||||
G1_HIGHGAIN,
|
||||
G1_LOWGAIN,
|
||||
G2_HIGHCAP_HIGHGAIN,
|
||||
G2_HIGHCAP_LOWGAIN,
|
||||
G2_LOWCAP_HIGHGAIN,
|
||||
G2_LOWCAP_LOWGAIN,
|
||||
G4_HIGHGAIN,
|
||||
G4_LOWGAIN,
|
||||
GAIN0,
|
||||
UNDEFINED,
|
||||
UNINITIALIZED,
|
||||
NUMSETTINGS
|
||||
};
|
||||
enum { DYNAMICRANGE_32, DYNAMICRANGE_16, DYNAMICRANGE_8, DYNAMICRANGE_4 };
|
||||
};
|
||||
|
@ -94,9 +94,9 @@ void qTabSettings::SetupDetectorSettings() {
|
||||
qobject_cast<QStandardItemModel *>(comboSettings->model());
|
||||
const int numSettings = comboSettings->count();
|
||||
if (model) {
|
||||
QModelIndex index[numSettings];
|
||||
QStandardItem *item[numSettings];
|
||||
for (int i = 0; i < numSettings; ++i) {
|
||||
std::vector<QModelIndex> index(numSettings);
|
||||
std::vector<QStandardItem *> item(numSettings);
|
||||
for (size_t i = 0; i < index.size(); ++i) {
|
||||
index[i] = model->index(i, comboSettings->modelColumn(),
|
||||
comboSettings->rootModelIndex());
|
||||
item[i] = model->itemFromIndex(index[i]);
|
||||
|
@ -1101,9 +1101,12 @@ enum gainMode getGainMode() {
|
||||
LOG(logERROR, ("undefined gain mode. DAQ reg: 0x%x\n", regval));
|
||||
}
|
||||
|
||||
switch (retval_force) {
|
||||
case DAQ_FRCE_GAIN_STG_0_VAL:
|
||||
// dynamic gain, when nothing is set
|
||||
if (retval_force == 0 && retval_fix == 0 && retval_cmp_rst == 0) {
|
||||
return DYNAMIC_GAIN_MODE;
|
||||
}
|
||||
|
||||
switch (retval_force) {
|
||||
case DAQ_FRCE_GAIN_STG_1_VAL:
|
||||
return FORCE_SWITCH_G1;
|
||||
case DAQ_FRCE_GAIN_STG_2_VAL:
|
||||
@ -1124,6 +1127,7 @@ enum gainMode getGainMode() {
|
||||
if (retval_cmp_rst) {
|
||||
return FIX_G0;
|
||||
}
|
||||
|
||||
LOG(logERROR, ("This gain mode is undefined [DAQ reg: %d]\n", regval));
|
||||
return -1;
|
||||
}
|
||||
|
@ -162,8 +162,7 @@ std::vector<defs::detectorSettings> Detector::getSettingsList() const {
|
||||
defs::HIGHGAIN0};
|
||||
case defs::GOTTHARD2:
|
||||
return std::vector<defs::detectorSettings>{
|
||||
defs::DYNAMICGAIN, defs::DYNAMICHG0, defs::FIXGAIN1,
|
||||
defs::FIXGAIN2};
|
||||
defs::DYNAMICGAIN, defs::FIXGAIN1, defs::FIXGAIN2};
|
||||
case defs::MOENCH:
|
||||
return std::vector<defs::detectorSettings>{
|
||||
defs::G1_HIGHGAIN, defs::G1_LOWGAIN,
|
||||
|
Reference in New Issue
Block a user