a check in gotthard server to ensure that it is really gotthard and not moench module

git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorSoftware@526 951219d9-93cf-4727-9268-0efd64621fa3
This commit is contained in:
l_maliakal_d
2013-04-26 08:59:28 +00:00
parent a7bc91da1d
commit 528b34d2b5
3 changed files with 5 additions and 6 deletions

View File

@ -54,11 +54,13 @@ int digitalTestBit = 0;
void check_detector_type(){
void check_detector_type(int b){
if (((bus_r(PCB_REV_REG) & DETECTOR_TYPE_MASK)>> DETECTOR_TYPE_OFFSET) == MOENCH_MODULE){
printf("This is a MOENCH detector. Exiting Gotthard Server.\n");
exit(-1);
}
if(b)
printf("***This is a GOTTHARD detector with %d chips per module***\n", NCHIP);
}
@ -70,12 +72,9 @@ int init_detector( int b) {
exit(-1);
}
check_detector_type();
if(b)
printf("***This is a GOTTHARD detector with %d chips per module***\n", NCHIP);
check_detector_type(b);
if (b) {
#ifdef MCB_FUNCS
initDetector();
printf("Initializing Detector\n");