mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-21 17:18:00 +02:00
gotthard2: inejct channel done
This commit is contained in:
@ -30,22 +30,12 @@ int ASIC_Driver_Set (int index, int length, char* buffer) {
|
||||
sprintf(fname, "%s%d", ASIC_Driver_DriverFileName, index + 1);
|
||||
FILE_LOG(logDEBUG1, ("\t[chip index: %d, length: %d, fname: %s]\n", index, length, fname));
|
||||
{
|
||||
char printbuffer[2 * length + 15];
|
||||
memset(printbuffer, 0, 2 * length);
|
||||
strcpy(printbuffer, "\t[values: ");
|
||||
FILE_LOG(logDEBUG1, ("\t[values: \n"));
|
||||
int i;
|
||||
for (i = 0; i < length; ++i) {
|
||||
char bytes[10]="";
|
||||
sprintf(bytes, "0x%02hhx", buffer[i]);
|
||||
strcat(printbuffer, bytes);
|
||||
if (i < length - 1) {
|
||||
strcat(printbuffer, "\t");
|
||||
}
|
||||
FILE_LOG(logDEBUG1, ("\t%d: 0x%02hhx\n", i, buffer[i]));
|
||||
}
|
||||
int len = strlen(printbuffer);
|
||||
printbuffer[len - 1] = ']';
|
||||
printbuffer[len] = '\0';
|
||||
FILE_LOG(logDEBUG1, ("%s\n", printbuffer));
|
||||
FILE_LOG(logDEBUG1, ("\t]\n"));
|
||||
}
|
||||
|
||||
int fd=open(fname, O_RDWR);
|
||||
|
@ -6177,7 +6177,7 @@ int set_inject_channel(int file_des) {
|
||||
ret = setInjectChannel(offset, increment);
|
||||
if (ret == FAIL) {
|
||||
ret = FAIL;
|
||||
sprintf(mess, "Could not inject channel\n", offset, increment);
|
||||
strcpy(mess, "Could not inject channel\n");
|
||||
FILE_LOG(logERROR, (mess));
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user