removed ndac from sls_detector_module and from the servers (not used), fixed setting module by eiger bug in sending number of channels

This commit is contained in:
2018-11-02 17:08:25 +01:00
parent d1c8d0b01c
commit a99584a0da
18 changed files with 113 additions and 535 deletions

View File

@ -1020,7 +1020,7 @@ unsigned int* Feb_Control_GetTrimbits() {
unsigned int Feb_Control_AddressToAll() {
FILE_LOG(logINFO, ("in Feb_Control_AddressToAll()\n"));
FILE_LOG(logDEBUG1, ("in Feb_Control_AddressToAll()\n"));

View File

@ -17,7 +17,7 @@ all: clean versioning $(PROGS) #hv9m_blackfin_server
boot: $(OBJS)
versioning:
versioning:
@echo `tput setaf 6; ./updateGitVersion.sh; tput sgr0;`
$(PROGS): $(OBJS)

View File

@ -1,9 +1,9 @@
Path: slsDetectorPackage/slsDetectorServers/eigerDetectorServer
URL: origin git@github.com:slsdetectorgroup/slsDetectorPackage.git
Repository Root: origin git@github.com:slsdetectorgroup/slsDetectorPackage.git
Repsitory UUID: aec8c031dee83a17174c316415c3bd314b31aa8e
Revision: 8
Repsitory UUID: d1c8d0b01c4c306ab8148fd5c39d09aeeac77a17
Revision: 12
Branch: refactor
Last Changed Author: Dhanya_Thattil
Last Changed Rev: 4155
Last Changed Date: 2018-10-31 14:35:43.000000002 +0100 ./Beb.c
Last Changed Rev: 4164
Last Changed Date: 2018-11-02 15:52:57.000000002 +0100 ./Makefile

View File

@ -1,6 +1,6 @@
#define GITURL "git@github.com:slsdetectorgroup/slsDetectorPackage.git"
#define GITREPUUID "aec8c031dee83a17174c316415c3bd314b31aa8e"
#define GITREPUUID "d1c8d0b01c4c306ab8148fd5c39d09aeeac77a17"
#define GITAUTH "Dhanya_Thattil"
#define GITREV 0x4155
#define GITDATE 0x20181031
#define GITREV 0x4164
#define GITDATE 0x20181102
#define GITBRANCH "refactor"

View File

@ -30,7 +30,6 @@ enum detectorSettings thisSettings;
sls_detector_module *detectorModules=NULL;
int *detectorChans=NULL;
int *detectorDacs=NULL;
int *detectorAdcs=NULL;
int send_to_ten_gig = 0;
int ndsts_in_use=32;
@ -380,16 +379,12 @@ void allocateDetectorStructureMemory() {
detectorModules = malloc(sizeof(sls_detector_module));
detectorChans = malloc(NCHIP*NCHAN*sizeof(int));
detectorDacs = malloc(NDAC*sizeof(int));
detectorAdcs = malloc(NADC*sizeof(int));
FILE_LOG(logDEBUG1, ("modules from 0x%x to 0x%x\n",detectorModules, detectorModules));
FILE_LOG(logDEBUG1, ("chans from 0x%x to 0x%x\n",detectorChans, detectorChans));
FILE_LOG(logDEBUG1, ("dacs from 0x%x to 0x%x\n",detectorDacs, detectorDacs));
FILE_LOG(logDEBUG1, ("adcs from 0x%x to 0x%x\n",detectorAdcs, detectorAdcs));
(detectorModules)->dacs = detectorDacs;
(detectorModules)->adcs = detectorAdcs;
(detectorModules)->chanregs = detectorChans;
(detectorModules)->ndac = NDAC;
(detectorModules)->nadc = NADC;
(detectorModules)->nchip = NCHIP;
(detectorModules)->nchan = NCHIP * NCHAN;
(detectorModules)->reg = 0;
@ -1782,10 +1777,10 @@ void readFrame(int *ret, char *mess) {
int copyModule(sls_detector_module *destMod, sls_detector_module *srcMod) {
int idac, ichan, iadc;
int idac, ichan;
int ret=OK;
FILE_LOG(logDEBUG1, ("Copying module %x to module %x\n",srcMod,destMod));
FILE_LOG(logDEBUG1, ("Copying module\n"));
if (srcMod->serialnumber>=0) {
@ -1800,16 +1795,10 @@ int copyModule(sls_detector_module *destMod, sls_detector_module *srcMod) {
FILE_LOG(logINFO, ("Number of dacs of source is larger than number of dacs of destination\n"));
return FAIL;
}
if ((srcMod->nadc)>(destMod->nadc)) {
FILE_LOG(logINFO, ("Number of dacs of source is larger than number of dacs of destination\n"));
return FAIL;
}
FILE_LOG(logDEBUG1, ("DACs: src %d, dest %d\n",srcMod->ndac,destMod->ndac));
FILE_LOG(logDEBUG1, ("ADCs: src %d, dest %d\n",srcMod->nadc,destMod->nadc));
FILE_LOG(logDEBUG1, ("Chans: src %d, dest %d\n",srcMod->nchan,destMod->nchan));
destMod->ndac=srcMod->ndac;
destMod->nadc=srcMod->nadc;
destMod->nchip=srcMod->nchip;
destMod->nchan=srcMod->nchan;
if (srcMod->reg>=0)
@ -1835,10 +1824,6 @@ int copyModule(sls_detector_module *destMod, sls_detector_module *srcMod) {
*((destMod->dacs)+idac)=*((srcMod->dacs)+idac);
}
}
for (iadc=0; iadc<(srcMod->nadc); iadc++) {
if (*((srcMod->adcs)+iadc)>=0)
*((destMod->adcs)+iadc)=*((srcMod->adcs)+iadc);
}
return ret;
}
@ -1856,7 +1841,6 @@ int calculateDataBytes() {
int getTotalNumberOfChannels() {return ((int)getNumberOfChannelsPerChip() * (int)getNumberOfChips());}
int getNumberOfChips() {return NCHIP;}
int getNumberOfDACs() {return NDAC;}
int getNumberOfADCs() {return NADC;}
int getNumberOfChannelsPerChip() {return NCHAN;}

View File

@ -1,13 +1,4 @@
/*
* slsDetectorServer_defs.h
*
* Created on: Jan 24, 2013
* Author: l_maliakal_d
*/
#ifndef SLSDETECTORSERVER_DEFS_H_
#define SLSDETECTORSERVER_DEFS_H_
#pragma once
#include "sls_detector_defs.h"
#define GOODBYE (-200)
@ -46,7 +37,6 @@ enum {E_PARALLEL, E_NON_PARALLEL, E_SAFE};
/* Hardware Definitions */
#define NCHAN (256 * 256)
#define NCHIP (4)
#define NADC (0)
#define NDAC (16)
@ -90,5 +80,3 @@ enum {E_PARALLEL, E_NON_PARALLEL, E_SAFE};
#define SLAVE_HIGH_VOLTAGE_READ_VAL (-999)
#define HIGH_VOLTAGE_TOLERANCE (5)
#endif /* SLSDETECTORSERVER_DEFS_H_ */