This commit is contained in:
2021-08-04 14:03:27 +02:00
parent 0e5e0f346b
commit 3802f22ebe
10 changed files with 24 additions and 17 deletions

View File

@ -793,6 +793,11 @@ int selectStoragecellStart(int pos) {
LOG(logINFO, ("Setting storage cell start: %d\n", pos));
bus_w(addr, bus_r(addr) & ~mask);
bus_w(addr, bus_r(addr) | ((value << offset) & mask));
// should not do a get to verify (status register does not update
// immediately during acquisition)
if (getChipVersion() == 11) {
return pos;
}
}
// read value back
@ -1098,7 +1103,7 @@ enum gainMode getGainMode() {
switch (retval_force) {
case DAQ_FRCE_GAIN_STG_0_VAL:
return DYNAMIC_GAIN;
return DYNAMIC_GAIN_MODE;
case DAQ_FRCE_GAIN_STG_1_VAL:
return FORCE_SWITCH_G1;
case DAQ_FRCE_GAIN_STG_2_VAL:
@ -1128,7 +1133,7 @@ void setGainMode(enum gainMode mode) {
uint32_t value = bus_r(addr);
switch (mode) {
case DYNAMIC_GAIN:
case DYNAMIC_GAIN_MODE:
value &= ~(DAQ_GAIN_MODE_MASK);
bus_w(addr, value);
LOG(logINFO,

View File

@ -98,7 +98,7 @@ enum CLKINDEX { RUN_CLK, ADC_CLK, DBIT_CLK, NUM_CLOCKS };
#define DEFAULT_HIGH_VOLTAGE (0)
#define DEFAULT_TIMING_MODE (AUTO_TIMING)
#define DEFAULT_SETTINGS (GAIN0)
#define DEFAULT_GAINMODE (DYNAMIC_GAIN)
#define DEFAULT_GAINMODE (DYNAMIC_GAIN_MODE)
#define DEFAULT_TX_UDP_PORT (0x7e9a)
#define DEFAULT_TMP_THRSHLD (65 * 1000) // milli degree Celsius
#define DEFAULT_NUM_STRG_CLLS (0)

View File

@ -8560,7 +8560,7 @@ int set_default_dac(int file_des) {
int get_gain_mode(int file_des) {
ret = OK;
memset(mess, 0, sizeof(mess));
enum gainMode retval = NORMAL_GAIN_MODE;
enum gainMode retval = DYNAMIC_GAIN_MODE;
LOG(logDEBUG1, ("Getting gain mode\n"));
#ifndef JUNGFRAUD
@ -8593,7 +8593,7 @@ int set_gain_mode(int file_des) {
// only set
if (Server_VerifyLock() == OK) {
switch (gainmode) {
case DYNAMIC_GAIN:
case DYNAMIC_GAIN_MODE:
case FORCE_SWITCH_G1:
case FORCE_SWITCH_G2:
case FIX_G1: