diff --git a/slsDetectorServers/gotthard2DetectorServer/bin/gotthard2DetectorServer_developer b/slsDetectorServers/gotthard2DetectorServer/bin/gotthard2DetectorServer_developer index 5cfff1d29..358b97764 100755 Binary files a/slsDetectorServers/gotthard2DetectorServer/bin/gotthard2DetectorServer_developer and b/slsDetectorServers/gotthard2DetectorServer/bin/gotthard2DetectorServer_developer differ diff --git a/slsDetectorServers/gotthard2DetectorServer/slsDetectorFunctionList.c b/slsDetectorServers/gotthard2DetectorServer/slsDetectorFunctionList.c index 57258fb84..97657bfaf 100644 --- a/slsDetectorServers/gotthard2DetectorServer/slsDetectorFunctionList.c +++ b/slsDetectorServers/gotthard2DetectorServer/slsDetectorFunctionList.c @@ -438,7 +438,7 @@ int readConfigFile() { continue; } - FILE_LOG(logDEBUG1, ("Command to process: (size:%d) %s\n", strlen(line), line)); + FILE_LOG(logDEBUG1, ("Command to process: (size:%d) %.*s\n", strlen(line), strlen(line) -1, line)); memset(command, 0, LZ); // vchip command @@ -648,7 +648,6 @@ int setOnChipDAC(enum ONCHIP_DACINDEX ind, int chipIndex, int val) { } FILE_LOG(logINFO, ("Setting on chip dac[%d - %s]: 0x%x\n", (int)ind, names[ind], val)); - char buffer[2]; buffer[1] = ((val & 0xF) << 4) | (((int)ind) & 0xF); // LSB (4 bits) + ADDR (4 bits) buffer[0] = (val >> 4) & 0x3F; // MSB (6 bits) diff --git a/slsDetectorServers/gotthard2DetectorServer/slsDetectorServer_defs.h b/slsDetectorServers/gotthard2DetectorServer/slsDetectorServer_defs.h index 2672a7c85..5431a3d2b 100644 --- a/slsDetectorServers/gotthard2DetectorServer/slsDetectorServer_defs.h +++ b/slsDetectorServers/gotthard2DetectorServer/slsDetectorServer_defs.h @@ -9,7 +9,7 @@ #define NCHAN (128) #define NCHIP (10) #define NDAC (16) -#define ONCHIP_NDAC (6) +#define ONCHIP_NDAC (7) #define DYNAMIC_RANGE (16) #define HV_SOFT_MAX_VOLTAGE (200) #define HV_HARD_MAX_VOLTAGE (530) @@ -66,10 +66,11 @@ enum ONCHIP_DACINDEX {G2_VCHIP_COMP_FE, /* 0 */ \ G2_VCHIP_OPA_1ST, /* 1 */ \ G2_VCHIP_OPA_FD, /* 2 */ \ G2_VCHIP_COMP_ADC, /* 3 */ \ - G2_VCHIP_REF_COMP_FE, /* 4 */ \ - G2_VCHIP_CS /* 5 */ \ + G2_VCHIP_UNUSED, /* 4 */ \ + G2_VCHIP_REF_COMP_FE, /* 5 */ \ + G2_VCHIP_CS /* 6 */ \ }; -#define ONCHIP_DAC_NAMES "vchip_comp_fe", "vchip_opa_1st", "vchip_opa_fd", "vchip_comp_adc", "vchip_ref_comp_fe", "vchip_cs" +#define ONCHIP_DAC_NAMES "vchip_comp_fe", "vchip_opa_1st", "vchip_opa_fd", "vchip_comp_adc", "vchip_unused", "vchip_ref_comp_fe", "vchip_cs" enum CLKINDEX {READOUT_C0, READOUT_C1, SYSTEM_C0, SYSTEM_C1, SYSTEM_C2, SYSTEM_C3, NUM_CLOCKS}; diff --git a/slsDetectorServers/slsDetectorServer/src/ASIC_Driver.c b/slsDetectorServers/slsDetectorServer/src/ASIC_Driver.c index b6d4816e2..39af05e55 100755 --- a/slsDetectorServers/slsDetectorServer/src/ASIC_Driver.c +++ b/slsDetectorServers/slsDetectorServer/src/ASIC_Driver.c @@ -32,14 +32,19 @@ int ASIC_Driver_Set (int index, int length, char* buffer) { { char printbuffer[2 * length + 15]; memset(printbuffer, 0, 2 * length); - strcpy(printbuffer, "\t values: ["); + strcpy(printbuffer, "\t[values: "); int i; for (i = 0; i < length; ++i) { char bytes[10]=""; - sprintf(bytes, "\t0x%02hhx", buffer[i]); + sprintf(bytes, "0x%02hhx", buffer[i]); strcat(printbuffer, bytes); + if (i < length - 1) { + strcat(printbuffer, "\t"); + } } - strcat(printbuffer, "]"); + int len = strlen(printbuffer); + printbuffer[len - 1] = ']'; + printbuffer[len] = '\0'; FILE_LOG(logDEBUG1, ("%s\n", printbuffer)); } diff --git a/slsSupportLib/include/versionAPI.h b/slsSupportLib/include/versionAPI.h index 4f70df8d9..d87273b7c 100644 --- a/slsSupportLib/include/versionAPI.h +++ b/slsSupportLib/include/versionAPI.h @@ -8,5 +8,5 @@ #define APIGOTTHARD 0x191111 #define APIJUNGFRAU 0x191111 #define APIEIGER 0x191111 -#define APIGOTTHARD2 0x191111 #define APIMYTHEN3 0x191111 +#define APIGOTTHARD2 0x191112