From: hadaq Date: Sun, 27 Oct 2002 08:37:54 +0000 (+0000) Subject: Quickhack for allowing two mdc crates, tested in mdc1 -- mm X-Git-Url: https://jspc29.x-matter.uni-frankfurt.de/git/?a=commitdiff_plain;h=29405e40b18314842f68f11e07ceb9d5a048fead;p=daqdata.git Quickhack for allowing two mdc crates, tested in mdc1 -- mm --- diff --git a/hadaq/hwmdc.c b/hadaq/hwmdc.c index d29731f..5f423ac 100644 --- a/hadaq/hwmdc.c +++ b/hadaq/hwmdc.c @@ -1,4 +1,4 @@ -static char *rcsId = "$Header: /misc/hadesprojects/daq/cvsroot/eventbuilder/hadaq/Attic/hwmdc.c,v 6.21 2002-10-24 16:45:39 hadaq Exp $"; +static char *rcsId = "$Header: /misc/hadesprojects/daq/cvsroot/eventbuilder/hadaq/Attic/hwmdc.c,v 6.22 2002-10-27 08:37:54 hadaq Exp $"; #define _POSIX_C_SOURCE 199309L @@ -16,7 +16,17 @@ static char *rcsId = "$Header: /misc/hadesprojects/daq/cvsroot/eventbuilder/hada #include "subevt.h" #include "hwsam.h" -#define NSAMS 18 +#define MDCCRATE 1 + +#if MDCCRATE == 0 +#define FIRSTSAM 0 +#define NSAMS 12 +#endif + +#if MDCCRATE == 1 +#define FIRSTSAM 12 +#define NSAMS 5 +#endif struct HardwareS { size_t maxSubEvtSize; @@ -53,7 +63,7 @@ Hardware *newHardware(void) char buf[12]; my->sam[i] = malloc(sizeof(HwSam)); - sprintf(buf, "sam%d", i); + sprintf(buf, "sam%d", i + FIRSTSAM); if (0 > conHwSam(my->sam[i], buf, param)) { syslog(LOG_ERR, "%s:%d:%s", __FILE__, __LINE__, strerror(errno)); return NULL;