Added IPS Driver M.Z.

This commit is contained in:
cvs
2004-07-06 13:11:33 +00:00
parent ac9d119ffb
commit 731108ea98
4 changed files with 890 additions and 7 deletions

26
psi.c
View File

@ -39,6 +39,7 @@
#include "tdchm.h"
#include "tecsdriv.h"
#include "itc4.h"
#include "ipsdriv.h"
#include "bruker.h"
#include "ltc11.h"
#include "A1931.h"
@ -313,6 +314,8 @@ static void ConfigureController(char *name, pEVControl pNew,
EVCSetPar(pNew,"lowerlimit",1.0,pCon);
if(strcmp(name,"tecs") == 0){
TecsCustomize(pCon, pNew);
} else if(strcmp(name,"ips") == 0){
IpsCustomize(pCon, pNew);
} else if(strcmp(name,"euro") == 0){
EVCSetPar(pNew,"upperlimit",750.0,pCon);
EVCSetPar(pNew,"lowerlimit",15.0,pCon);
@ -367,6 +370,17 @@ static pEVControl InstallPsiEnvironmentController(SicsInterp *pSics,
commandInstalled = 1;
}
}
} else if(strcmp(argv[3],"ips") == 0) {
checkError = 1;
pDriv = CreateIpsDriver(argc-4,&argv[4]);
if(pDriv){
pNew = CreateEVController(pDriv,argv[2],&status);
if(pNew != NULL){
AddCommand(pSics,argv[2],IpsWrapper,DeleteEVController,
pNew);
commandInstalled = 1;
}
}
} else if(strcmp(argv[3],"bruker") == 0){
checkError = 1;
pDriv = CreateBrukerDriver(argc-4,&argv[4]);
@ -429,12 +443,6 @@ static pEVControl InstallPsiEnvironmentController(SicsInterp *pSics,
SCWrite(pCon,"ERROR: failed to create driver",eError);
return NULL;
}
if(pNew == NULL){
SCWrite(pCon,"ERROR: failed to create environment device object",
eError);
DeleteEVDriver(pDriv);
return NULL;
}
if(status != 1) {
SCWrite(pCon,"ERROR: failed to initialize device",
eError);
@ -442,6 +450,12 @@ static pEVControl InstallPsiEnvironmentController(SicsInterp *pSics,
sprintf(pBueffel,"HW reported: %s",pError);
SCWrite(pCon,pBueffel,eError);
}
if(pNew == NULL){
SCWrite(pCon,"ERROR: failed to create environment device object",
eError);
DeleteEVDriver(pDriv);
return NULL;
}
if(commandInstalled == 0){
AddCommand(pSics,argv[2],EVControlWrapper,DeleteEVController,pNew);
}