merge bug fix of set module

This commit is contained in:
Dhanya Maliakal 2017-10-27 16:16:29 +02:00
commit 7ff23b25b3
7 changed files with 21 additions and 19 deletions

View File

@ -536,7 +536,9 @@ int receiveModuleGeneral(int file_des, sls_detector_module* myMod, int receiveA
ts+=receiveData(file_des,&(myMod->nadc),sizeof(myMod->nadc),INT32);
ts+=receiveData(file_des,&(myMod->reg),sizeof(myMod->reg),INT32);
ts+=receiveData(file_des,myMod->dacs,sizeof(myMod->ndac),INT32);
if(receiveAll){ // temporary fix
ts+=receiveData(file_des,myMod->adcs,sizeof(myMod->nadc),INT32);
}
/*some detectors dont require sending all trimbits etc.*/
if(receiveAll){
ts+=receiveData(file_des,myMod->chipregs,sizeof(myMod->nchip),INT32);

View File

@ -1,9 +1,9 @@
Path: slsDetectorsPackage/slsDetectorSoftware/jungfrauDetectorServer
URL: origin git@git.psi.ch:sls_detectors_software/sls_detector_software.git
Repository Root: origin git@git.psi.ch:sls_detectors_software/sls_detector_software.git
Repsitory UUID: 037182a000f003ee636f25cd50a622c608c9e646
Revision: 90
Repsitory UUID: 4148ec5bbbaa20171fbda3e9c53e59a0d2d77db0
Revision: 93
Branch: developer
Last Changed Author: Dhanya_Maliakal
Last Changed Rev: 1562
Last Changed Date: 2017-09-14 11:50:30.000000002 +0200 ./Makefile
Last Changed Rev: 1610
Last Changed Date: 2017-10-25 16:48:35.000000002 +0200 ./RegisterDefs.h

View File

@ -1,11 +1,11 @@
//#define SVNPATH ""
#define SVNURL "git@git.psi.ch:sls_detectors_software/sls_detector_software.git"
//#define SVNREPPATH ""
#define SVNREPUUID "037182a000f003ee636f25cd50a622c608c9e646"
//#define SVNREV 0x1562
#define SVNREPUUID "4148ec5bbbaa20171fbda3e9c53e59a0d2d77db0"
//#define SVNREV 0x1610
//#define SVNKIND ""
//#define SVNSCHED ""
#define SVNAUTH "Dhanya_Maliakal"
#define SVNREV 0x1562
#define SVNDATE 0x20170914
#define SVNREV 0x1610
#define SVNDATE 0x20171025
//

View File

@ -651,7 +651,7 @@ int getModule(sls_detector_module *myMod){
for(i=0;i<NDAC;i++)
setDAC((enum DACINDEX)i,-1,-1,0,retval);
//copy to local copy as well
//copy from local copy
if (detectorModules)
copyModule(myMod,detectorModules);
else
@ -876,7 +876,7 @@ int setHighVoltage(int val){
// limit values
if (val < 60) {
dacvalue = 0;
val = 60;
val = 0;
} else if (val >= 200) {
dacvalue = 0x1;
val = 200;

View File

@ -1725,7 +1725,7 @@ int set_module(int file_des) {
int *myChan = NULL;
myDac=(int*)malloc(getNumberOfDACsPerModule()*sizeof(int));
if (myDac == NULL) {
if (getNumberOfDACsPerModule() > 0 && myDac == NULL) {
ret = FAIL;
sprintf(mess,"could not allocate dacs\n");
cprintf(RED, "Warning: %s", mess);
@ -1733,7 +1733,7 @@ int set_module(int file_des) {
else {
myModule.dacs=myDac;
myAdc=(int*)malloc(getNumberOfADCsPerModule()*sizeof(int));
if (myAdc == NULL) {
if (getNumberOfADCsPerModule() > 0 && myAdc == NULL) {
ret = FAIL;
sprintf(mess,"could not allocate adcs\n");
cprintf(RED, "Warning: %s", mess);
@ -1746,7 +1746,7 @@ int set_module(int file_des) {
myModule.chanregs=NULL;
#else
myChip=(int*)malloc(getNumberOfChipsPerModule()*sizeof(int));
if (myChip == NULL) {
if (getNumberOfChipsPerModule() > 0 && myChip == NULL) {
ret = FAIL;
sprintf(mess,"could not allocate chips\n");
cprintf(RED, "Warning: %s", mess);
@ -1754,7 +1754,7 @@ int set_module(int file_des) {
else {
myModule.chipregs=myChip;
myChan=(int*)malloc(getNumberOfChannelsPerModule()*sizeof(int));
if (myChan == NULL) {
if (getNumberOfChannelsPerModule() > 0 && myChan == NULL) {
ret = FAIL;
sprintf(mess,"could not allocate chans\n");
cprintf(RED, "Warning: %s", mess);
@ -1947,7 +1947,7 @@ int get_module(int file_des) {
}
else {
myDac=(int*)malloc(getNumberOfDACsPerModule()*sizeof(int));
if (myDac == NULL) {
if (getNumberOfDACsPerModule() > 0 && myDac == NULL) {
ret = FAIL;
sprintf(mess,"could not allocate dacs\n");
cprintf(RED, "Warning: %s", mess);
@ -1955,7 +1955,7 @@ int get_module(int file_des) {
else {
myModule.dacs=myDac;
myAdc=(int*)malloc(getNumberOfADCsPerModule()*sizeof(int));
if (myAdc == NULL) {
if (getNumberOfADCsPerModule() > 0 && myAdc == NULL) {
ret = FAIL;
sprintf(mess,"could not allocate adcs\n");
cprintf(RED, "Warning: %s", mess);
@ -1968,7 +1968,7 @@ int get_module(int file_des) {
myModule.chanregs=NULL;
#else
myChip=(int*)malloc(getNumberOfChipsPerModule()*sizeof(int));
if (myChip == NULL) {
if (getNumberOfChipsPerModule() > 0 && myChip == NULL) {
ret = FAIL;
sprintf(mess,"could not allocate chips\n");
cprintf(RED, "Warning: %s", mess);
@ -1976,7 +1976,7 @@ int get_module(int file_des) {
else {
myModule.chipregs=myChip;
myChan=(int*)malloc(getNumberOfChannelsPerModule()*sizeof(int));
if (myChan == NULL) {
if (getNumberOfChannelsPerModule() > 0 && myChan == NULL) {
ret = FAIL;
sprintf(mess,"could not allocate chans\n");
cprintf(RED, "Warning: %s", mess);