more tests

This commit is contained in:
2020-03-31 18:19:32 +02:00
parent 83010de9f4
commit 262b4b0b16
6 changed files with 77 additions and 43 deletions

View File

@ -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) {

View File

@ -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;

View File

@ -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);
}

View File

@ -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) {