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@522 951219d9-93cf-4727-9268-0efd64621fa3
This commit is contained in:
l_maliakal_d
2013-04-26 08:29:43 +00:00
parent 6ca969e08f
commit 507debd7f4
6 changed files with 27 additions and 8 deletions

View File

@ -52,19 +52,28 @@ char mess[1000];
int digitalTestBit = 0;
void check_detector_type(){
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);
}
}
int init_detector( int b) {
#ifndef PICASSOD
printf("This is a GOTTHARD detector with %d chips per module\n", NCHIP);
#else
printf("This is a PICASSO detector with %d chips per module\n", NCHIP);
#endif
if (mapCSP0()==FAIL) { printf("Could not map memory\n");
exit(1);
exit(-1);
}
//check if it is really gotthard
check_detector_type();
//testFpga();
if (b) {
#ifdef MCB_FUNCS