Added a motor driver which ignores air cushion errors for TRICS (falsely triggered)

This commit is contained in:
2014-10-13 13:38:51 +02:00
parent 07cd8a0215
commit 32e55f2176
3 changed files with 115 additions and 0 deletions

13
psi.c
View File

@ -145,6 +145,7 @@ static void AddPsiCommands(SicsInterp * pInter)
/*---------------------------------------------------------------------*/
MotorDriver *CreateEL734HP(SConnection * pCon, int argc, char *argv[]);
MotorDriver *CreateEL734HPT(SConnection * pCon, int argc, char *argv[]);
MotorDriver *CreateEL734Air(SConnection * pCon, int argc, char *argv[]);
MotorDriver *MakePiPiezo(Tcl_Interp * pTcl, char *pArray);
/*-------------------------------------------------------------------*/
static pMotor CreatePsiMotor(SConnection * pCon, int argc, char *argv[])
@ -180,6 +181,18 @@ static pMotor CreatePsiMotor(SConnection * pCon, int argc, char *argv[])
SCWrite(pCon, pBueffel, eError);
return NULL;
}
} else if (strcmp(argv[1], "el734air") == 0) {
pDriver = (MotorDriver *) CreateEL734Air(pCon, argc - 2, &argv[2]);
if (!pDriver) {
return NULL;
}
/* create the motor */
pNew = MotorInit("EL734air", argv[0], pDriver);
if (!pNew) {
snprintf(pBueffel,131, "Failure to create motor %s", argv[1]);
SCWrite(pCon, pBueffel, eError);
return NULL;
}
} else if (strcmp(argv[1], "el734hpt") == 0) {
pDriver = (MotorDriver *) CreateEL734HPT(pCon, argc - 2, &argv[2]);
if (!pDriver) {