mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-07 02:20:42 +02:00
fixed bug mv in dacs for command line
This commit is contained in:
parent
828a2dbd17
commit
5e6153af9e
@ -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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user