r3788 | jgn | 2012-11-09 14:21:44 +1100 (Fri, 09 Nov 2012) | 1 line
This commit is contained in:

committed by
Douglas Clowes

parent
d02634ff13
commit
e79e28b819
@ -317,7 +317,7 @@ static int TclSetPar(void *self, SConnection *pCon, char *name, float newValue){
|
||||
strcmp(name, ACCEL) == 0 ||
|
||||
strcmp(name, DECEL) == 0) {
|
||||
if (!buildStandardCommandPart(pDriv, name, tclCommand, 1023)){
|
||||
pDriv->errorCode = PARANOTFOUND;
|
||||
pDriv->errorCode = FUNCNOTFOUND;
|
||||
return HWFault;
|
||||
}
|
||||
sscanf(tclCommandPara, "%s %f", tclCommand, &newValue);
|
||||
@ -333,6 +333,9 @@ static int TclSetPar(void *self, SConnection *pCon, char *name, float newValue){
|
||||
return HWFault;
|
||||
}
|
||||
return OKOK;
|
||||
} else {
|
||||
pDriv->errorCode = PARANOTFOUND;
|
||||
return HWFault;
|
||||
}
|
||||
|
||||
return 0;
|
||||
@ -387,7 +390,7 @@ int TclGetPar(void *self, char *name, float *value) {
|
||||
strcmp(name, ACCEL) == 0 ||
|
||||
strcmp(name, DECEL) == 0) {
|
||||
if(!buildStandardCommandPart(pDriv, name, tclCommand, 1023)){
|
||||
pDriv->errorCode = PARANOTFOUND;
|
||||
pDriv->errorCode = FUNCNOTFOUND;
|
||||
return HWFault;
|
||||
}
|
||||
status = Tcl_Eval(pServ->pSics->pTcl,tclCommand);
|
||||
@ -403,6 +406,9 @@ int TclGetPar(void *self, char *name, float *value) {
|
||||
}
|
||||
sscanf(result,"%f", value);
|
||||
return OKOK;
|
||||
} else {
|
||||
pDriv->errorCode = PARANOTFOUND;
|
||||
return HWFault;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
Reference in New Issue
Block a user