diff --git a/slsDetectorServers/gotthardDetectorServer/bin/gotthardDetectorServer_refactor b/slsDetectorServers/gotthardDetectorServer/bin/gotthardDetectorServer_refactor index 8bade9afd..b1a6f14ba 100755 Binary files a/slsDetectorServers/gotthardDetectorServer/bin/gotthardDetectorServer_refactor and b/slsDetectorServers/gotthardDetectorServer/bin/gotthardDetectorServer_refactor differ diff --git a/slsDetectorServers/slsDetectorServer/LTC2620.h b/slsDetectorServers/slsDetectorServer/LTC2620.h index d92f42a83..075a55c7a 100755 --- a/slsDetectorServers/slsDetectorServer/LTC2620.h +++ b/slsDetectorServers/slsDetectorServer/LTC2620.h @@ -27,6 +27,7 @@ #define LTC2620_PWR_DOWN_VAL (-100) #define LTC2620_MIN_VAL (0) #define LTC2620_MAX_VAL (4095) // 12 bits +#define LTC2620_MAX_STEPS (LTC2620_MAX_VAL + 1) uint32_t LTC2620_Reg = 0x0; uint32_t LTC2620_CsMask = 0x0; diff --git a/slsDetectorServers/slsDetectorServer/common.h b/slsDetectorServers/slsDetectorServer/common.h index e57d039a9..8f07ecdd2 100755 --- a/slsDetectorServers/slsDetectorServer/common.h +++ b/slsDetectorServers/slsDetectorServer/common.h @@ -28,8 +28,8 @@ int ConvertToDifferentRange(int inputMin, int inputMax, int outputMin, int outpu return FAIL; } - double value = double((inputValue - inputMin) * (outputMax - outputMin)) - / double(inputMax - inputMin) + outputMin; + double value = (double)((inputValue - inputMin) * (outputMax - outputMin)) + / (double)(inputMax - inputMin) + outputMin; // double to integer conversion (if decimal places, round to integer) if ((value - (int)value) > 0.0001) { @@ -40,3 +40,4 @@ int ConvertToDifferentRange(int inputMin, int inputMax, int outputMin, int outpu FILE_LOG(logDEBUG1, ("\tConverted Ouput Value: %d\n", *outputValue)); return OK; } + diff --git a/slsDetectorServers/slsDetectorServer/slsDetectorServer_funcs.c b/slsDetectorServers/slsDetectorServer/slsDetectorServer_funcs.c index 5ac12e768..69a3faa3c 100755 --- a/slsDetectorServers/slsDetectorServer/slsDetectorServer_funcs.c +++ b/slsDetectorServers/slsDetectorServer/slsDetectorServer_funcs.c @@ -835,9 +835,9 @@ int set_dac(int file_des) { // dacs default: - if (mV && val > DAC_MAX_VOLTAGE_MV) { + if (mV && val > DAC_MAX_MV) { ret = FAIL; - sprintf(mess,"Could not set dac %d to value %d. Allowed limits (0 - %d mV).\n", ind, val, DAC_MAX_VOLTAGE_MV); + sprintf(mess,"Could not set dac %d to value %d. Allowed limits (0 - %d mV).\n", ind, val, DAC_MAX_MV); FILE_LOG(logERROR,(mess)); } else if (!mV && val > getMaxDacSteps() ) { ret = FAIL; diff --git a/slsSupportLib/include/versionAPI.h b/slsSupportLib/include/versionAPI.h index 1218c7a73..9026563e7 100644 --- a/slsSupportLib/include/versionAPI.h +++ b/slsSupportLib/include/versionAPI.h @@ -2,7 +2,7 @@ #define APIRECEIVER 0x180927 #define APIEIGER 0x181031 #define APIJUNGFRAU 0x181102 -#define APIGOTTHARD 0x181009 +#define APIGOTTHARD 0x190108 #define APICTB 0x180101 #define APIMOENCH 0x180101