mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-20 08:38:00 +02:00
included serverMAC function for gotthard
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorSoftware@102 951219d9-93cf-4727-9268-0efd64621fa3
This commit is contained in:
@ -2011,7 +2011,7 @@ float slsDetector::setDAC(float val, dacIndex index, int imod){
|
||||
|
||||
#ifdef VERBOSE
|
||||
std::cout<< std::endl;
|
||||
std::cout<< "Setting DAC/POT/TEMP "<< index << "of module " << imod << " to " << val << std::endl;
|
||||
std::cout<< "Setting DAC/POT/TEMP/HV/ADC_WRITE "<< index << "of module " << imod << " to " << val << std::endl;
|
||||
#endif
|
||||
if (thisDetector->onlineFlag==ONLINE_FLAG) {
|
||||
if (controlSocket) {
|
||||
@ -2046,10 +2046,10 @@ float slsDetector::setDAC(float val, dacIndex index, int imod){
|
||||
}
|
||||
}
|
||||
#ifdef VERBOSE
|
||||
std::cout<< "Dac/Pot/Temp set to "<< retval << std::endl;
|
||||
std::cout<< "Dac/Pot/Temp/HV/ADC_write set to "<< retval << std::endl;
|
||||
#endif
|
||||
if (ret==FAIL) {
|
||||
std::cout<< "Set dac/pot/temp failed " << std::endl;
|
||||
std::cout<< "Set dac/pot/temp/HV/ADC_write failed " << std::endl;
|
||||
}
|
||||
return retval;
|
||||
};
|
||||
@ -6189,6 +6189,15 @@ string slsDetector::executeLine(int narg, char *args[], int action) {
|
||||
sprintf(answer,"%f",setDAC(-1,TEMPERATURE_FPGA));
|
||||
return string(answer);
|
||||
}
|
||||
/* GOTTHARD ADC_WRITE_REG */
|
||||
else if (var=="adc_write") {
|
||||
if (action==PUT_ACTION) {
|
||||
sscanf(args[1],"%f",&fval);
|
||||
setDAC(fval,G_ADC_WRITE);
|
||||
}
|
||||
sprintf(answer,"%f",setDAC(-1,G_ADC_WRITE));
|
||||
return string(answer);
|
||||
}
|
||||
|
||||
//timers
|
||||
|
||||
|
Reference in New Issue
Block a user