mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-13 05:17:13 +02:00
more tests
This commit is contained in:
@ -1331,6 +1331,9 @@ int* getDetectorPosition() {
|
||||
// Detector Specific
|
||||
|
||||
int checkDetectorType() {
|
||||
#ifdef VIRTUAL
|
||||
return OK;
|
||||
#endif
|
||||
LOG(logINFO, ("Checking type of module\n"));
|
||||
FILE* fd = fopen(TYPE_FILE_NAME, "r");
|
||||
if (fd == NULL) {
|
||||
|
@ -1098,11 +1098,6 @@ int getADC(enum ADCINDEX ind){
|
||||
}
|
||||
|
||||
int setHighVoltage(int val){
|
||||
#ifdef VIRTUAL
|
||||
if (val >= 0)
|
||||
highvoltage = val;
|
||||
return highvoltage;
|
||||
#endif
|
||||
u_int32_t addr = HV_REG;
|
||||
u_int32_t sel = 0x0;
|
||||
|
||||
|
@ -1284,7 +1284,9 @@ int powerChip (int on){
|
||||
bus_w(CHIP_POWER_REG, bus_r(CHIP_POWER_REG) & ~CHIP_POWER_ENABLE_MSK);
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef VIRTUAL
|
||||
return ((bus_r(CHIP_POWER_REG) & CHIP_POWER_ENABLE_MSK) >> CHIP_POWER_ENABLE_OFST);
|
||||
#endif
|
||||
return ((bus_r(CHIP_POWER_REG) & CHIP_POWER_STATUS_MSK) >> CHIP_POWER_STATUS_OFST);
|
||||
}
|
||||
|
||||
|
@ -1112,6 +1112,9 @@ uint64_t getPatternBitMask() {
|
||||
}
|
||||
|
||||
int checkDetectorType() {
|
||||
#ifdef VIRTUAL
|
||||
return OK;
|
||||
#endif
|
||||
LOG(logINFO, ("Checking type of module\n"));
|
||||
FILE* fd = fopen(TYPE_FILE_NAME, "r");
|
||||
if (fd == NULL) {
|
||||
|
Reference in New Issue
Block a user