mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-05-04 03:40:04 +02:00
Merge branch 'jungfraunew' into esrfchanges
This commit is contained in:
commit
501d2478a5
@ -2236,9 +2236,9 @@ void qDrawPlot::toDoublePixelData(double* dest, char* source,int size, int datab
|
||||
// only data plot
|
||||
else {
|
||||
for (ichan = 0; ichan < size; ++ichan) {
|
||||
if ( (*((u_int16_t*)source)) == 0xFFFF )
|
||||
/*if ( (*((u_int16_t*)source)) == 0xFFFF )
|
||||
dest[ichan] = 0xFFFF;
|
||||
else
|
||||
else*/
|
||||
dest[ichan] = ((*((u_int16_t*)source)) & 0x3FFF);
|
||||
source += 2;
|
||||
}
|
||||
|
@ -302,6 +302,8 @@
|
||||
#define DAQ_SETTINGS_MSK (DAQ_HIGH_GAIN_MSK | DAQ_FIX_GAIN_MSK | DAQ_FRCE_SWTCH_GAIN_MSK)
|
||||
#define DAQ_HIGH_GAIN_OFST (0)
|
||||
#define DAQ_HIGH_GAIN_MSK (0x00000001 << DAQ_HIGH_GAIN_OFST)
|
||||
#define DAQ_FIX_GAIN_DYNMC_VAL ((0x0 << DAQ_HIGH_GAIN_OFST) & DAQ_HIGH_GAIN_MSK)
|
||||
#define DAQ_FIX_GAIN_HIGHGAIN_VAL ((0x1 << DAQ_HIGH_GAIN_OFST) & DAQ_HIGH_GAIN_MSK)
|
||||
#define DAQ_FIX_GAIN_OFST (1)
|
||||
#define DAQ_FIX_GAIN_MSK (0x00000003 << DAQ_FIX_GAIN_OFST)
|
||||
#define DAQ_FIX_GAIN_STG_1_VAL ((0x1 << DAQ_FIX_GAIN_OFST) & DAQ_FIX_GAIN_MSK)
|
||||
|
Binary file not shown.
@ -1,9 +1,9 @@
|
||||
Path: slsDetectorsPackage/slsDetectorSoftware/jungfrauDetectorServer
|
||||
URL: origin git@github.com:slsdetectorgroup/slsDetectorPackage.git
|
||||
Repository Root: origin git@github.com:slsdetectorgroup/slsDetectorPackage.git
|
||||
Repsitory UUID: 03e781a0ac53cb73af5d00003a131383125ab40f
|
||||
Revision: 141
|
||||
Repsitory UUID: c9675d111a61075ebe4031ec6bdf285a76be0fce
|
||||
Revision: 142
|
||||
Branch: jungfraunew
|
||||
Last Changed Author: Dhanya_Thattil
|
||||
Last Changed Rev: 3776
|
||||
Last Changed Date: 2018-04-23 16:06:57.000000002 +0200 ./RegisterDefs.h
|
||||
Last Changed Rev: 3777
|
||||
Last Changed Date: 2018-04-26 15:44:15.000000002 +0200 ./RegisterDefs.h
|
||||
|
@ -1,6 +1,6 @@
|
||||
#define GITURL "git@github.com:slsdetectorgroup/slsDetectorPackage.git"
|
||||
#define GITREPUUID "03e781a0ac53cb73af5d00003a131383125ab40f"
|
||||
#define GITREPUUID "c9675d111a61075ebe4031ec6bdf285a76be0fce"
|
||||
#define GITAUTH "Dhanya_Thattil"
|
||||
#define GITREV 0x3776
|
||||
#define GITDATE 0x20180423
|
||||
#define GITREV 0x3777
|
||||
#define GITDATE 0x20180426
|
||||
#define GITBRANCH "jungfraunew"
|
||||
|
@ -406,6 +406,8 @@ void setupDetector() {
|
||||
setTimer(ACQUISITION_TIME, DEFAULT_EXPTIME);
|
||||
setTimer(FRAME_PERIOD, DEFAULT_PERIOD);
|
||||
setTimer(DELAY_AFTER_TRIGGER, DEFAULT_DELAY);
|
||||
setTimer(STORAGE_CELL_NUMBER, DEFAULT_NUM_STRG_CLLS);
|
||||
selectStoragecellStart(DEFAULT_STRG_CLL_STRT);
|
||||
/*setSpeed(CLOCK_DIVIDER, HALF_SPEED); depends if all the previous stuff works*/
|
||||
setTiming(DEFAULT_TIMING_MODE);
|
||||
setHighVoltage(DEFAULT_HIGH_VOLTAGE);
|
||||
@ -824,7 +826,7 @@ enum detectorSettings setSettings(enum detectorSettings sett, int imod){
|
||||
break;
|
||||
case DYNAMICHG0:
|
||||
bus_w(DAQ_REG, bus_r(DAQ_REG) & ~DAQ_SETTINGS_MSK);
|
||||
bus_w(DAQ_REG, bus_r(DAQ_REG) | DAQ_HIGH_GAIN_MSK);
|
||||
bus_w(DAQ_REG, bus_r(DAQ_REG) | DAQ_FIX_GAIN_HIGHGAIN_VAL);
|
||||
printf("\nConfigured settings - Dyanmic High Gain 0, DAQ Reg: 0x%x\n", bus_r(DAQ_REG));
|
||||
break;
|
||||
case FIXGAIN1:
|
||||
@ -862,37 +864,37 @@ enum detectorSettings setSettings(enum detectorSettings sett, int imod){
|
||||
|
||||
enum detectorSettings getSettings(){
|
||||
|
||||
uint32_t val = bus_r(DAQ_REG);
|
||||
uint32_t val = bus_r(DAQ_REG) & DAQ_SETTINGS_MSK;
|
||||
printf("\nGetting Settings\n Reading DAQ Register :0x%x\n", val);
|
||||
|
||||
if (val & DAQ_FRCE_GAIN_STG_2_VAL) {
|
||||
thisSettings = FORCESWITCHG2;
|
||||
printf("Settings read: FORCESWITCHG2\n");
|
||||
}
|
||||
|
||||
else if (val & DAQ_FRCE_GAIN_STG_1_VAL) {
|
||||
thisSettings = FORCESWITCHG1;
|
||||
printf("Settings read: FORCESWITCHG1\n");
|
||||
}
|
||||
|
||||
else if (val & DAQ_FIX_GAIN_STG_2_VAL) {
|
||||
thisSettings = FIXGAIN2;
|
||||
printf("Settings read: FIXGAIN2\n");
|
||||
}
|
||||
|
||||
else if (val & DAQ_FIX_GAIN_STG_1_VAL) {
|
||||
thisSettings = FIXGAIN1;
|
||||
printf("Settings read: FIXGAIN1\n");
|
||||
}
|
||||
|
||||
else if (val & DAQ_HIGH_GAIN_MSK) {
|
||||
thisSettings = DYNAMICHG0;
|
||||
printf("Settings read: DYNAMICHG0\n");
|
||||
}
|
||||
|
||||
else {
|
||||
switch(val) {
|
||||
case DAQ_FIX_GAIN_DYNMC_VAL:
|
||||
thisSettings = DYNAMICGAIN;
|
||||
printf("Settings read: DYNAMICGAIN\n");
|
||||
break;
|
||||
case DAQ_FIX_GAIN_HIGHGAIN_VAL:
|
||||
thisSettings = DYNAMICHG0;
|
||||
printf("Settings read: DYNAMICHG0\n");
|
||||
break;
|
||||
case DAQ_FIX_GAIN_STG_1_VAL:
|
||||
thisSettings = FIXGAIN1;
|
||||
printf("Settings read: FIXGAIN1\n");
|
||||
break;
|
||||
case DAQ_FIX_GAIN_STG_2_VAL:
|
||||
thisSettings = FIXGAIN2;
|
||||
printf("Settings read: FIXGAIN2\n");
|
||||
break;
|
||||
case DAQ_FRCE_GAIN_STG_1_VAL:
|
||||
thisSettings = FORCESWITCHG1;
|
||||
printf("Settings read: FORCESWITCHG1\n");
|
||||
break;
|
||||
case DAQ_FRCE_GAIN_STG_2_VAL:
|
||||
thisSettings = FORCESWITCHG2;
|
||||
printf("Settings read: FORCESWITCHG2\n");
|
||||
break;
|
||||
default:
|
||||
thisSettings = UNDEFINED;
|
||||
printf("Settings read: Undefined. Value read:0x%x\n", val);
|
||||
}
|
||||
|
||||
return thisSettings;
|
||||
|
@ -71,6 +71,8 @@ enum NETWORKINDEX { TXN_FRAME };
|
||||
#define DEFAULT_SETTINGS (DYNAMICGAIN)
|
||||
#define DEFAULT_TX_UDP_PORT (0x7e9a)
|
||||
#define DEFAULT_TMP_THRSHLD (65*1000) //milli degree Celsius
|
||||
#define DEFAULT_NUM_STRG_CLLS (0)
|
||||
#define DEFAULT_STRG_CLL_STRT (0xf)
|
||||
|
||||
/* Defines in the Firmware */
|
||||
#define FIX_PATT_VAL (0xACDC2014)
|
||||
|
@ -5607,7 +5607,11 @@ int storage_cell_start(int file_des) {
|
||||
cprintf(RED, "Warning: %s", mess);
|
||||
}
|
||||
#ifdef SLS_DETECTOR_FUNCTION_LIST
|
||||
else {
|
||||
else if (arg > MAX_STORAGE_CELL_VAL) {
|
||||
ret=FAIL;
|
||||
strcpy(mess,"Max Storage cell number should not exceed 15\n");
|
||||
cprintf(RED, "Warning: %s", mess);
|
||||
} else {
|
||||
#ifdef VERBOSE
|
||||
printf("Storage cell start to %d\n", arg);
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user