adc command line bug, ctb api added to client

This commit is contained in:
maliakal_d 2019-02-06 17:25:36 +01:00
parent 0c1a3b7756
commit a76cc90972
2 changed files with 4 additions and 1 deletions

View File

@ -81,6 +81,9 @@ int slsDetector::checkDetectorVersionCompatibility() {
case GOTTHARD:
arg = APIGOTTHARD;
break;
case CHIPTESTBOARD:
arg = APICTB;
break;
default:
FILE_LOG(logERROR) << "Check version compatibility is not implemented for this detector";
setErrorMask((getErrorMask()) | (VERSION_COMPATIBILITY));

View File

@ -4063,7 +4063,7 @@ std::string slsDetectorCommand::cmdADC(int narg, char *args[], int action, int d
if (sscanf(args[0],"adc:%d",&idac)==1) {
// printf("chiptestboard!\n");
adc=(dacIndex)(idac+1000);
if (idac < SLOW_ADC0 || idac > SLOW_ADC_TEMP)
if (idac < (SLOW_ADC0 - 1000) || idac > (SLOW_ADC_TEMP - 1000))
return (std::string ("cannot set adc, must be between ") + std::to_string(SLOW_ADC0 - 1000) +
std::string (" and ") + std::to_string(SLOW_ADC_TEMP - 1000));
} else if (cmd=="temp_adc")