editing configuremac to include adc number

git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorSoftware@298 951219d9-93cf-4727-9268-0efd64621fa3
This commit is contained in:
l_maliakal_d
2012-10-16 15:31:46 +00:00
parent 6fb6f72bc3
commit 6cf4fc5e43
10 changed files with 79 additions and 19 deletions

View File

@ -2487,13 +2487,10 @@ string slsDetectorCommand::cmdConfigureMac(int narg, char *args[], int action) {
char ans[1000];
if (action==PUT_ACTION){
if (sscanf(args[1],"%d",&ival))
if(ival==1){
if (sscanf(args[1],"%d",&ival)){
myDet->setOnline(ONLINE_FLAG);
ret=myDet->configureMAC();
}
else
return string("Not yet implemented with arguments other than 1");
ret=myDet->configureMAC(ival);
}
}
else
return string("Cannot get ")+cmd;
@ -2506,7 +2503,7 @@ string slsDetectorCommand::helpConfigureMac(int narg, char *args[], int action)
ostringstream os;
if (action==PUT_ACTION || action==HELP_ACTION)
os << "configuremac i \n configures the MAC of the detector. i=1 for configure; i=0 for unconfigure(not implemented yet)"<< std::endl;
os << "configuremac i \n configures the MAC of the detector. i is adc number. -1 for all adcs"<< std::endl;
if (action==GET_ACTION || action==HELP_ACTION)
os << "configuremac " << "Cannot get " << std::endl;