mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-05-06 21:00:02 +02:00
gotthard server works
This commit is contained in:
parent
0a2c1d1406
commit
52785c6642
Binary file not shown.
@ -27,6 +27,7 @@
|
|||||||
#define LTC2620_PWR_DOWN_VAL (-100)
|
#define LTC2620_PWR_DOWN_VAL (-100)
|
||||||
#define LTC2620_MIN_VAL (0)
|
#define LTC2620_MIN_VAL (0)
|
||||||
#define LTC2620_MAX_VAL (4095) // 12 bits
|
#define LTC2620_MAX_VAL (4095) // 12 bits
|
||||||
|
#define LTC2620_MAX_STEPS (LTC2620_MAX_VAL + 1)
|
||||||
|
|
||||||
uint32_t LTC2620_Reg = 0x0;
|
uint32_t LTC2620_Reg = 0x0;
|
||||||
uint32_t LTC2620_CsMask = 0x0;
|
uint32_t LTC2620_CsMask = 0x0;
|
||||||
|
@ -28,8 +28,8 @@ int ConvertToDifferentRange(int inputMin, int inputMax, int outputMin, int outpu
|
|||||||
return FAIL;
|
return FAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
double value = double((inputValue - inputMin) * (outputMax - outputMin))
|
double value = (double)((inputValue - inputMin) * (outputMax - outputMin))
|
||||||
/ double(inputMax - inputMin) + outputMin;
|
/ (double)(inputMax - inputMin) + outputMin;
|
||||||
|
|
||||||
// double to integer conversion (if decimal places, round to integer)
|
// double to integer conversion (if decimal places, round to integer)
|
||||||
if ((value - (int)value) > 0.0001) {
|
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));
|
FILE_LOG(logDEBUG1, ("\tConverted Ouput Value: %d\n", *outputValue));
|
||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -835,9 +835,9 @@ int set_dac(int file_des) {
|
|||||||
|
|
||||||
// dacs
|
// dacs
|
||||||
default:
|
default:
|
||||||
if (mV && val > DAC_MAX_VOLTAGE_MV) {
|
if (mV && val > DAC_MAX_MV) {
|
||||||
ret = FAIL;
|
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));
|
FILE_LOG(logERROR,(mess));
|
||||||
} else if (!mV && val > getMaxDacSteps() ) {
|
} else if (!mV && val > getMaxDacSteps() ) {
|
||||||
ret = FAIL;
|
ret = FAIL;
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
#define APIRECEIVER 0x180927
|
#define APIRECEIVER 0x180927
|
||||||
#define APIEIGER 0x181031
|
#define APIEIGER 0x181031
|
||||||
#define APIJUNGFRAU 0x181102
|
#define APIJUNGFRAU 0x181102
|
||||||
#define APIGOTTHARD 0x181009
|
#define APIGOTTHARD 0x190108
|
||||||
#define APICTB 0x180101
|
#define APICTB 0x180101
|
||||||
#define APIMOENCH 0x180101
|
#define APIMOENCH 0x180101
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user