- Removed -fwritable-string
SKIPPED: psi/dornier2.c psi/ecbdriv.c psi/el734hp.c psi/libpsi.a psi/make_gen psi/makefile_linux psi/pimotor.c psi/pipiezo.c psi/sinqhttp.c psi/tcpdornier.c psi/velodornier.c
This commit is contained in:
44
devexec.c
44
devexec.c
@ -105,6 +105,7 @@
|
||||
int iStop;
|
||||
int iStatus;
|
||||
int iEnd;
|
||||
int drivePrint;
|
||||
long lTask;
|
||||
pTaskMan pTask;
|
||||
int iLock;
|
||||
@ -144,6 +145,7 @@
|
||||
pRes->pTask = pTask;
|
||||
pRes->lTask = -1;
|
||||
pRes->iLock = 0;
|
||||
pRes->drivePrint = 0;
|
||||
pRes->pCall = CreateCallBackInterface();
|
||||
pRes->lastRun = time(NULL);
|
||||
return pRes;
|
||||
@ -187,6 +189,7 @@
|
||||
pICountable pCountInt = NULL;
|
||||
static int overwriteOwner = -1;
|
||||
char *overwriteOption;
|
||||
float oldVal;
|
||||
|
||||
assert(self);
|
||||
assert(pDes);
|
||||
@ -239,6 +242,13 @@
|
||||
if(pDrivInt)
|
||||
{
|
||||
iRet = pDrivInt->SetValue(pData,pCon,fNew);
|
||||
if(iRet == OKOK && self->drivePrint == 1)
|
||||
{
|
||||
oldVal = pDrivInt->GetValue(pData,pCon);
|
||||
snprintf(pBueffel,131,"Driving %s from %8.3f to %8.3f",
|
||||
name, oldVal, fNew);
|
||||
SCWrite(pCon,pBueffel,eWarning);
|
||||
}
|
||||
}
|
||||
else if(pCountInt)
|
||||
{
|
||||
@ -289,6 +299,7 @@
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
/*-----------------------------------------------------------------------*/
|
||||
/*--------------------------------------------------------------------------*/
|
||||
int StartMotor(pExeList self, SicsInterp *pSics, SConnection *pCon,
|
||||
char *name, float fVal)
|
||||
@ -988,6 +999,39 @@
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
/*---------------------------------------------------------------------*/
|
||||
int DevexecAction(SConnection *pCon, SicsInterp *pSics, void *pData,
|
||||
int argc, char *argv[])
|
||||
{
|
||||
int val;
|
||||
char pBueffel[256];
|
||||
|
||||
pExeList self = (pExeList)pData;
|
||||
if(argc < 2)
|
||||
{
|
||||
SCWrite(pCon,"ERROR: not enough argumentd to devexec command",eError);
|
||||
return 0;
|
||||
}
|
||||
strtolower(argv[1]);
|
||||
if(strcmp(argv[1],"driveprint") == 0)
|
||||
{
|
||||
if(argc > 2 && SCMatchRights(pCon,usUser))
|
||||
{
|
||||
val = atoi(argv[2]);
|
||||
self->drivePrint = val;
|
||||
SCSendOK(pCon);
|
||||
return 1;
|
||||
} else {
|
||||
snprintf(pBueffel,255,"devexe.drivePrint = %d",
|
||||
self->drivePrint);
|
||||
SCWrite(pCon,pBueffel,eValue);
|
||||
return 1;
|
||||
}
|
||||
} else {
|
||||
SCWrite(pCon,"ERROR: unknown subcommand to devexec",eError);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
/*-------------------------------------------------------------------------*/
|
||||
int ContinueAction(SConnection *pCon, SicsInterp *pSics, void *pData,
|
||||
int argc, char *argv[])
|
||||
|
Reference in New Issue
Block a user