mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2026-01-16 16:08:38 +01:00
fixed bug mv in dacs for command line
This commit is contained in:
@@ -3330,9 +3330,9 @@ string slsDetectorCommand::cmdDAC(int narg, char *args[], int action) {
|
|||||||
|
|
||||||
if (action==PUT_ACTION) {
|
if (action==PUT_ACTION) {
|
||||||
|
|
||||||
if(narg > 2)
|
if(narg >= 3)
|
||||||
if(!strcasecmp(args[2],"mv"))
|
if(!strcasecmp(args[2],"mv"))
|
||||||
mode = 1;
|
mode = 1;
|
||||||
#ifdef DACS_INT
|
#ifdef DACS_INT
|
||||||
|
|
||||||
if (sscanf(args[1],"%d", &val))
|
if (sscanf(args[1],"%d", &val))
|
||||||
@@ -3346,6 +3346,10 @@ string slsDetectorCommand::cmdDAC(int narg, char *args[], int action) {
|
|||||||
myDet->setDAC(val,dac,mode);
|
myDet->setDAC(val,dac,mode);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
else if(narg >= 2)
|
||||||
|
if(!strcasecmp(args[1],"mv"))
|
||||||
|
mode = 1;
|
||||||
|
|
||||||
#ifdef DACS_INT
|
#ifdef DACS_INT
|
||||||
sprintf(answer,"%d",myDet->setDAC(-1,dac,mode));
|
sprintf(answer,"%d",myDet->setDAC(-1,dac,mode));
|
||||||
#else
|
#else
|
||||||
|
|||||||
Reference in New Issue
Block a user