]> jspc29.x-matter.uni-frankfurt.de Git - daqdata.git/commitdiff
Quickhack for allowing two mdc crates, tested in mdc1 -- mm
authorhadaq <hadaq>
Sun, 27 Oct 2002 08:37:54 +0000 (08:37 +0000)
committerhadaq <hadaq>
Sun, 27 Oct 2002 08:37:54 +0000 (08:37 +0000)
hadaq/hwmdc.c

index d29731faa10d8baba9e1063af3d061f8c0f80067..5f423ace611aa8eb62bc49bf3105b008f5d8af4e 100644 (file)
@@ -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;