gotthard2: vetoref taken as decimal and not hex in server

This commit is contained in:
maliakal_d 2020-07-30 12:03:36 +02:00
parent e9c03c6eaf
commit 6f5635a402
5 changed files with 7 additions and 7 deletions

View File

@ -25,5 +25,5 @@ vcom_adc2 704
#configure adc chip index adc index value(max 0x7F)
confadc -1 -1 0x22
#vetoreference gain index value(max 0x3ff)
vetoref 1 0x0
#vetoreference gain index value(max 1023)
vetoref 1 0

View File

@ -552,7 +552,7 @@ int readConfigFile() {
int value = 0;
// cannot scan values
if (sscanf(line, "%s %d 0x%x", command, &igain, &value) != 3) {
if (sscanf(line, "%s %d %d", command, &igain, &value) != 3) {
sprintf(initErrorMessage,
"Could not scan vetoref commands from on-board server "
"config file. Line:[%s].\n",
@ -1776,7 +1776,7 @@ void getInjectedChannels(int *offset, int *increment) {
}
int setVetoReference(int gainIndex, int value) {
LOG(logINFO, ("Setting veto reference [chip:-1, G%d, value:0x%x]\n",
LOG(logINFO, ("Setting veto reference [chip:-1, G%d, value:%d]\n",
gainIndex, value));
int values[NCHAN];
int gainIndices[NCHAN];

View File

@ -6455,7 +6455,7 @@ int set_veto_reference(int file_des) {
if (receiveData(file_des, args, sizeof(args), INT32) < 0)
return printSocketReadError();
LOG(logINFO,
("Setting Veto Reference: [G%d, value:0x%x]\n", args[0], args[1]));
("Setting Veto Reference: [G%d, value:%d]\n", args[0], args[1]));
#ifndef GOTTHARD2D
functionNotImplemented();
@ -6473,7 +6473,7 @@ int set_veto_reference(int file_des) {
} else if (value > ADU_MAX_VAL) {
ret = FAIL;
sprintf(mess,
"Could not set veto reference. Invalid ADU value 0x%x, "
"Could not set veto reference. Invalid ADU value %d, "
"must be 12 bit.\n",
value);
LOG(logERROR, (mess));

View File

@ -6,7 +6,7 @@
#define APIEIGER 0x200729
#define APICTB 0x200729
#define APIGOTTHARD 0x200729
#define APIGOTTHARD2 0x200729
#define APIJUNGFRAU 0x200729
#define APIMYTHEN3 0x200729
#define APIMOENCH 0x200729
#define APIGOTTHARD2 0x200730