changed gotthard dynamic gain value and fixed bug of writing settings enum with more offset to not mixup with conf gain value in firmware

This commit is contained in:
Dhanya Maliakal 2015-10-23 10:57:45 +02:00
parent 8ffdcb08c9
commit 0ea9cc34b0
3 changed files with 5 additions and 5 deletions

View File

@ -1170,7 +1170,7 @@ int initConfGain(int isettings,int val,int imod){
retval=(bus_r(addr)&GAIN_MASK); retval=(bus_r(addr)&GAIN_MASK);
#ifdef VERBOSE #ifdef VERBOSE
printf("Value read from Gain reg is %d\n",retval); printf("Value read from Gain reg is %d\n",retval);
#endif #endif
if((val!=-1)&&(retval!=val)) if((val!=-1)&&(retval!=val))
return -1; return -1;
@ -1183,7 +1183,7 @@ int initConfGain(int isettings,int val,int imod){
retval=((bus_r(addr)&SETTINGS_MASK)>>SETTINGS_OFFSET); retval=((bus_r(addr)&SETTINGS_MASK)>>SETTINGS_OFFSET);
#ifdef VERBOSE #ifdef VERBOSE
printf("Settings read from reg is %d\n",retval); printf("Settings read from reg is %d\n",retval);
#endif #endif
if((isettings!=-1)&&(retval!=isettings)){ if((isettings!=-1)&&(retval!=isettings)){
printf("\n\nSettings r\n\n"); printf("\n\nSettings r\n\n");
return -1; return -1;

View File

@ -9,8 +9,8 @@
#define RGSH1VALS {300,200,400} #define RGSH1VALS {300,200,400}
#define RGSH2VALS {260,300,260} #define RGSH2VALS {260,300,260}
//high,dynamic,low,medium,very high // high,dynamic,low,medium,very high
#define CONF_GAIN {0,0, 0, 1, 6, 2, 1}//dynamic gain confgain yet to be figured out-probably 8 or 16 #define CONF_GAIN {0,0, 0, 8, 6, 2, 1}//dynamic gain confgain yet to be figured out-probably 8 or 16
#define DEFAULTGAIN {11.66,9.32,14.99} #define DEFAULTGAIN {11.66,9.32,14.99}

View File

@ -291,7 +291,7 @@
#define GAIN_MASK 0x0000000f #define GAIN_MASK 0x0000000f
#define GAIN_OFFSET 0 #define GAIN_OFFSET 0
#define SETTINGS_MASK 0x000000f0 #define SETTINGS_MASK 0x000000f0
#define SETTINGS_OFFSET 4 #define SETTINGS_OFFSET 8
/* CHIP_OF_INTRST_REG */ /* CHIP_OF_INTRST_REG */