- Removed -fwritable-string
This commit is contained in:
@ -615,7 +615,7 @@ static int DornierStatNew(pVelSelDriv self, int *iCode, float *fCur){
|
||||
memset(pDorn,0,sizeof(Dornier));
|
||||
|
||||
/* host name */
|
||||
pPtr = Tcl_GetVar2(pTcl,name,"Host",TCL_GLOBAL_ONLY);
|
||||
pPtr = (char *)Tcl_GetVar2(pTcl,name,"Host",TCL_GLOBAL_ONLY);
|
||||
if(!pPtr)
|
||||
{
|
||||
Tcl_AppendResult(pTcl,"ERROR: no hostname found in",name,NULL);
|
||||
@ -625,7 +625,7 @@ static int DornierStatNew(pVelSelDriv self, int *iCode, float *fCur){
|
||||
strncpy(pHost,pPtr,131);
|
||||
|
||||
/* port number */
|
||||
pPtr = Tcl_GetVar2(pTcl,name,"Port",TCL_GLOBAL_ONLY);
|
||||
pPtr = (char *)Tcl_GetVar2(pTcl,name,"Port",TCL_GLOBAL_ONLY);
|
||||
if(!pPtr)
|
||||
{
|
||||
Tcl_AppendResult(pTcl,"ERROR: no port number found in",name,NULL);
|
||||
@ -640,7 +640,7 @@ static int DornierStatNew(pVelSelDriv self, int *iCode, float *fCur){
|
||||
}
|
||||
|
||||
/* time out. This one gets defaulted when not specified */
|
||||
pPtr = Tcl_GetVar2(pTcl,name,"Timeout",TCL_GLOBAL_ONLY);
|
||||
pPtr = (char *)Tcl_GetVar2(pTcl,name,"Timeout",TCL_GLOBAL_ONLY);
|
||||
if(!pPtr)
|
||||
{
|
||||
pDorn->iTimeOut = 1000;
|
||||
@ -656,7 +656,7 @@ static int DornierStatNew(pVelSelDriv self, int *iCode, float *fCur){
|
||||
}
|
||||
|
||||
/* minimum control speed */
|
||||
pPtr = Tcl_GetVar2(pTcl,name,"MinControl",TCL_GLOBAL_ONLY);
|
||||
pPtr = (char *)Tcl_GetVar2(pTcl,name,"MinControl",TCL_GLOBAL_ONLY);
|
||||
if(!pPtr)
|
||||
{
|
||||
pDorn->minRPM = 3100;
|
||||
|
11
ecbdriv.c
11
ecbdriv.c
@ -632,8 +632,9 @@ static int controlMotor(pECBMotDriv self, int enable){
|
||||
usleep(delay);
|
||||
return 1;
|
||||
}else {
|
||||
|
||||
/*
|
||||
disable motor
|
||||
disable air cushions
|
||||
*/
|
||||
in.e = 8;
|
||||
in.b = 11; /* set control signal */
|
||||
@ -644,15 +645,21 @@ static int controlMotor(pECBMotDriv self, int enable){
|
||||
return 0;
|
||||
}
|
||||
usleep(delay);
|
||||
|
||||
/*
|
||||
clear enable
|
||||
*/
|
||||
in.e = 0;
|
||||
in.b = 11; /* set control signal */
|
||||
in.c = -self->ecbIndex;
|
||||
in.c = self->ecbIndex;
|
||||
status = ecbExecute(self->ecb,MOPARA,in,&out);
|
||||
if(status != 1){
|
||||
self->errorCode = COMMERROR;
|
||||
return 0;
|
||||
}
|
||||
usleep(delay);
|
||||
|
||||
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
@ -214,7 +214,7 @@ static int EL734Run(void *pData,float fValue){
|
||||
self = (pEL734Driv)pData;
|
||||
assert(self);
|
||||
|
||||
self->oredMsr = 0;
|
||||
self->oredMsr = 3;
|
||||
snprintf(pCommand,79,"p %d %.3f\r",self->iMotor,fValue);
|
||||
status = transactEL734(self->controller,pCommand,strlen(pCommand),
|
||||
pReply,79);
|
||||
@ -632,6 +632,7 @@ MotorDriver *CreateEL734HP(SConnection *pCon, int argc, char *argv[]){
|
||||
pNew->KillPrivate = KillEL734;
|
||||
pNew->controller = controller;
|
||||
pNew->iMotor = motor;
|
||||
pNew->oredMsr = 3;
|
||||
|
||||
/*
|
||||
connection will already have been set up, read limits
|
||||
|
2
make_gen
2
make_gen
@ -8,7 +8,7 @@
|
||||
|
||||
OBJ=psi.o buffer.o ruli.o dmc.o nxsans.o nextrics.o sps.o pimotor.o \
|
||||
pipiezo.o sanswave.o faverage.o fowrite.o amor2t.o nxamor.o \
|
||||
amorstat.o tasinit.o tasdrive.o tasutil.o tasscan.o swmotor.o \
|
||||
amorstat.o tasinit.o tasdriveo.o tasutil.o tasscan.o swmotor.o \
|
||||
polterwrite.o ecb.o frame.o el734driv.o el734dc.o ecbdriv.o \
|
||||
ecbcounter.o el737driv.o sinqhmdriv.o tdchm.o velodorn.o \
|
||||
velodornier.o docho.o sanscook.o tecsdriv.o itc4driv.o itc4.o\
|
||||
|
@ -11,8 +11,8 @@ include ../linux_def
|
||||
|
||||
CC = gcc
|
||||
CFLAGS = -I$(HDFROOT)/include -DHDF4 -DHDF5 $(NI) -Ihardsup \
|
||||
-I.. -fwritable-strings -DCYGNUS -DNONINTF -g $(DFORTIFY) \
|
||||
-Wall -Wno-unused -Wno-comment -Wno-switch -Werror
|
||||
-I.. -DCYGNUS -DNONINTF -g $(DFORTIFY) \
|
||||
-Wall -Werror -Wno-unused -Wno-comment -Wno-switch
|
||||
|
||||
EXTRA=nintf.o
|
||||
|
||||
|
12
pimotor.c
12
pimotor.c
@ -310,7 +310,7 @@
|
||||
memset(pNew,0,sizeof(C804Driv));
|
||||
|
||||
/* connection parameters */
|
||||
pPar = Tcl_GetVar2(pTcl,pArray,"Computer",TCL_LEAVE_ERR_MSG);
|
||||
pPar = (char *)Tcl_GetVar2(pTcl,pArray,"Computer",TCL_LEAVE_ERR_MSG);
|
||||
if(!pPar)
|
||||
{
|
||||
Tcl_SetResult(pTcl,"Failed to find serial port server host name",NULL);
|
||||
@ -320,7 +320,7 @@
|
||||
pNew->hostname = strdup(pPar);
|
||||
|
||||
pPar = NULL;
|
||||
pPar = Tcl_GetVar2(pTcl,pArray,"port",TCL_LEAVE_ERR_MSG);
|
||||
pPar = (char *)Tcl_GetVar2(pTcl,pArray,"port",TCL_LEAVE_ERR_MSG);
|
||||
if(!pPar)
|
||||
{
|
||||
Tcl_SetResult(pTcl,"Failed to find serial port server port adress",NULL);
|
||||
@ -337,7 +337,7 @@
|
||||
pNew->iPort = iVal;
|
||||
|
||||
pPar = NULL;
|
||||
pPar = Tcl_GetVar2(pTcl,pArray,"channel",TCL_LEAVE_ERR_MSG);
|
||||
pPar = (char *)Tcl_GetVar2(pTcl,pArray,"channel",TCL_LEAVE_ERR_MSG);
|
||||
if(!pPar)
|
||||
{
|
||||
Tcl_SetResult(pTcl,"Failed to find serial port server channel adress",NULL);
|
||||
@ -354,7 +354,7 @@
|
||||
pNew->iChannel = iVal;
|
||||
pPar = NULL;
|
||||
|
||||
pPar = Tcl_GetVar2(pTcl,pArray,"motor",TCL_LEAVE_ERR_MSG);
|
||||
pPar = (char *)Tcl_GetVar2(pTcl,pArray,"motor",TCL_LEAVE_ERR_MSG);
|
||||
if(!pPar)
|
||||
{
|
||||
Tcl_SetResult(pTcl,"Failed to find motor number",NULL);
|
||||
@ -372,7 +372,7 @@
|
||||
|
||||
/* limits */
|
||||
pPar = NULL;
|
||||
pPar = Tcl_GetVar2(pTcl,pArray,"lowerlimit",TCL_LEAVE_ERR_MSG);
|
||||
pPar = (char *)Tcl_GetVar2(pTcl,pArray,"lowerlimit",TCL_LEAVE_ERR_MSG);
|
||||
if(!pPar)
|
||||
{
|
||||
Tcl_SetResult(pTcl,"Failed to find lower motor limit",NULL);
|
||||
@ -389,7 +389,7 @@
|
||||
pNew->fLower = dVal;
|
||||
|
||||
pPar = NULL;
|
||||
pPar = Tcl_GetVar2(pTcl,pArray,"upperlimit",TCL_LEAVE_ERR_MSG);
|
||||
pPar = (char *)Tcl_GetVar2(pTcl,pArray,"upperlimit",TCL_LEAVE_ERR_MSG);
|
||||
if(!pPar)
|
||||
{
|
||||
Tcl_SetResult(pTcl,"Failed to find upper motor limit",NULL);
|
||||
|
@ -297,7 +297,7 @@
|
||||
memset(pNew,0,sizeof(PiPiezo));
|
||||
|
||||
/* connection parameters */
|
||||
pPar = Tcl_GetVar2(pTcl,pArray,"Computer",TCL_GLOBAL_ONLY);
|
||||
pPar = (char *)Tcl_GetVar2(pTcl,pArray,"Computer",TCL_GLOBAL_ONLY);
|
||||
if(!pPar)
|
||||
{
|
||||
Tcl_SetResult(pTcl,"Failed to find serial port server host name",NULL);
|
||||
@ -307,7 +307,7 @@
|
||||
pNew->hostname = strdup(pPar);
|
||||
|
||||
pPar = NULL;
|
||||
pPar = Tcl_GetVar2(pTcl,pArray,"port",TCL_GLOBAL_ONLY);
|
||||
pPar = (char *)Tcl_GetVar2(pTcl,pArray,"port",TCL_GLOBAL_ONLY);
|
||||
if(!pPar)
|
||||
{
|
||||
Tcl_SetResult(pTcl,"Failed to find serial port server port adress",NULL);
|
||||
@ -324,7 +324,7 @@
|
||||
pNew->iPort = iVal;
|
||||
|
||||
pPar = NULL;
|
||||
pPar = Tcl_GetVar2(pTcl,pArray,"channel",TCL_GLOBAL_ONLY);
|
||||
pPar = (char *)Tcl_GetVar2(pTcl,pArray,"channel",TCL_GLOBAL_ONLY);
|
||||
if(!pPar)
|
||||
{
|
||||
Tcl_SetResult(pTcl,"Failed to find serial port server channel adress",NULL);
|
||||
@ -341,7 +341,7 @@
|
||||
pNew->iChannel = iVal;
|
||||
pPar = NULL;
|
||||
|
||||
pPar = Tcl_GetVar2(pTcl,pArray,"motor",TCL_GLOBAL_ONLY);
|
||||
pPar = (char *)Tcl_GetVar2(pTcl,pArray,"motor",TCL_GLOBAL_ONLY);
|
||||
if(!pPar)
|
||||
{
|
||||
Tcl_SetResult(pTcl,"Failed to find motor number",NULL);
|
||||
|
@ -159,7 +159,7 @@ static int SinqHttpConfigure(pHistDriver self, SConnection *pCon,
|
||||
eError);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* looser credentials
|
||||
*/
|
||||
@ -175,7 +175,6 @@ static int SinqHttpConfigure(pHistDriver self, SConnection *pCon,
|
||||
eError);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/* actual configuration. Check for flag INIT in
|
||||
options. We do not need to configure, if the HM has configured
|
||||
@ -228,7 +227,7 @@ static int SinqHttpConfigure(pHistDriver self, SConnection *pCon,
|
||||
httpStatus = ghttp_process(pPriv->syncRequest);
|
||||
confData = (char *)ghttp_get_body(pPriv->syncRequest);
|
||||
if(httpStatus != ghttp_done){
|
||||
confData = ghttp_get_error(pPriv->syncRequest);
|
||||
confData = (char *)ghttp_get_error(pPriv->syncRequest);
|
||||
snprintf(confCommand,511,"ERROR: http error %s occurred",
|
||||
confData);
|
||||
SCWrite(pCon,confCommand,eError);
|
||||
|
21
tcpdornier.c
21
tcpdornier.c
@ -869,7 +869,7 @@ static int TcpAsMotHalt(void *pData){
|
||||
|
||||
|
||||
/* host name */
|
||||
pPtr = Tcl_GetVar2(pTcl,name,"Host",TCL_GLOBAL_ONLY);
|
||||
pPtr = (char *)Tcl_GetVar2(pTcl,name,"Host",TCL_GLOBAL_ONLY);
|
||||
if(!pPtr)
|
||||
{
|
||||
Tcl_AppendResult(pTcl,"ERROR: no hostname found in",name,NULL);
|
||||
@ -879,7 +879,7 @@ static int TcpAsMotHalt(void *pData){
|
||||
strncpy(host,pPtr,131);
|
||||
|
||||
/* port number */
|
||||
pPtr = Tcl_GetVar2(pTcl,name,"Port",TCL_GLOBAL_ONLY);
|
||||
pPtr = (char *)Tcl_GetVar2(pTcl,name,"Port",TCL_GLOBAL_ONLY);
|
||||
if(!pPtr)
|
||||
{
|
||||
Tcl_AppendResult(pTcl,"ERROR: no port number found in",name,NULL);
|
||||
@ -904,13 +904,13 @@ static int TcpAsMotHalt(void *pData){
|
||||
/*
|
||||
username and password
|
||||
*/
|
||||
pPtr = Tcl_GetVar2(pTcl,name,"User",TCL_GLOBAL_ONLY);
|
||||
pPtr = (char *)Tcl_GetVar2(pTcl,name,"User",TCL_GLOBAL_ONLY);
|
||||
if(!pPtr){
|
||||
strncpy(pDorn->user,"NVS",131);
|
||||
} else {
|
||||
strncpy(pDorn->user,pPtr,131);
|
||||
}
|
||||
pPtr = Tcl_GetVar2(pTcl,name,"Password",TCL_GLOBAL_ONLY);
|
||||
pPtr = (char *)Tcl_GetVar2(pTcl,name,"Password",TCL_GLOBAL_ONLY);
|
||||
if(!pPtr){
|
||||
strncpy(pDorn->pword,"NVS",131);
|
||||
} else {
|
||||
@ -918,7 +918,7 @@ static int TcpAsMotHalt(void *pData){
|
||||
}
|
||||
|
||||
/* time out. This one gets defaulted when not specified */
|
||||
pPtr = Tcl_GetVar2(pTcl,name,"Timeout",TCL_GLOBAL_ONLY);
|
||||
pPtr = (char *)Tcl_GetVar2(pTcl,name,"Timeout",TCL_GLOBAL_ONLY);
|
||||
if(!pPtr)
|
||||
{
|
||||
pDorn->timeout = 5;
|
||||
@ -932,7 +932,7 @@ static int TcpAsMotHalt(void *pData){
|
||||
}
|
||||
}
|
||||
|
||||
pPtr = Tcl_GetVar2(pTcl,name,"Debug",TCL_GLOBAL_ONLY);
|
||||
pPtr = (char *)Tcl_GetVar2(pTcl,name,"Debug",TCL_GLOBAL_ONLY);
|
||||
if(pPtr != NULL)
|
||||
{
|
||||
setRS232Debug(pDorn->controller, 10);
|
||||
@ -964,7 +964,7 @@ static int TcpAsMotHalt(void *pData){
|
||||
pNew->Init = TcpDornierInit;
|
||||
|
||||
/* tolerance This one gets defaulted when not specified */
|
||||
pPtr = Tcl_GetVar2(pTcl,name,"Tolerance",TCL_GLOBAL_ONLY);
|
||||
pPtr = (char *)Tcl_GetVar2(pTcl,name,"Tolerance",TCL_GLOBAL_ONLY);
|
||||
if(!pPtr)
|
||||
{
|
||||
pNew->fTolerance = 10.;
|
||||
@ -1055,7 +1055,8 @@ int VelSelTcpFactory(SConnection *pCon, SicsInterp *pSics, void *pData,
|
||||
/*
|
||||
now initialize additional parameters for the motor
|
||||
*/
|
||||
pPtr = Tcl_GetVar2(pSics->pTcl,argv[2],"TiltTolerance",TCL_GLOBAL_ONLY);
|
||||
pPtr = (char *)Tcl_GetVar2(pSics->pTcl,argv[2],"TiltTolerance",
|
||||
TCL_GLOBAL_ONLY);
|
||||
pAstDriv->fTolerance = .1;
|
||||
if(pPtr != NULL){
|
||||
iRet = Tcl_GetDouble(pSics->pTcl,pPtr,&d);
|
||||
@ -1065,7 +1066,7 @@ int VelSelTcpFactory(SConnection *pCon, SicsInterp *pSics, void *pData,
|
||||
}
|
||||
|
||||
limit = 10.;
|
||||
pPtr = Tcl_GetVar2(pSics->pTcl,argv[2],"TiltUpper",TCL_GLOBAL_ONLY);
|
||||
pPtr = (char *)Tcl_GetVar2(pSics->pTcl,argv[2],"TiltUpper",TCL_GLOBAL_ONLY);
|
||||
if(pPtr != NULL){
|
||||
iRet = Tcl_GetDouble(pSics->pTcl,pPtr,&d);
|
||||
if(iRet == TCL_OK){
|
||||
@ -1075,7 +1076,7 @@ int VelSelTcpFactory(SConnection *pCon, SicsInterp *pSics, void *pData,
|
||||
pAstDriv->fUpper = limit;
|
||||
MotorSetPar(pTilt,pCon,"softupperlim",limit);
|
||||
|
||||
pPtr = Tcl_GetVar2(pSics->pTcl,argv[2],"TiltLower",TCL_GLOBAL_ONLY);
|
||||
pPtr = (char *)Tcl_GetVar2(pSics->pTcl,argv[2],"TiltLower",TCL_GLOBAL_ONLY);
|
||||
limit = -10.;
|
||||
if(pPtr != NULL){
|
||||
iRet = Tcl_GetDouble(pSics->pTcl,pPtr,&d);
|
||||
|
@ -595,7 +595,7 @@ typedef enum {vStart, eRegel, eHalted} eVeloMode;
|
||||
memset(pDorn,0,sizeof(Dornier));
|
||||
|
||||
/* host name */
|
||||
pPtr = Tcl_GetVar2(pTcl,name,"Host",TCL_GLOBAL_ONLY);
|
||||
pPtr = (char *)Tcl_GetVar2(pTcl,name,"Host",TCL_GLOBAL_ONLY);
|
||||
if(!pPtr)
|
||||
{
|
||||
Tcl_AppendResult(pTcl,"ERROR: no hostname found in",name,NULL);
|
||||
@ -605,7 +605,7 @@ typedef enum {vStart, eRegel, eHalted} eVeloMode;
|
||||
pDorn->pComputer = strdup(pPtr);
|
||||
|
||||
/* port number */
|
||||
pPtr = Tcl_GetVar2(pTcl,name,"Port",TCL_GLOBAL_ONLY);
|
||||
pPtr = (char *)Tcl_GetVar2(pTcl,name,"Port",TCL_GLOBAL_ONLY);
|
||||
if(!pPtr)
|
||||
{
|
||||
Tcl_AppendResult(pTcl,"ERROR: no port number found in",name,NULL);
|
||||
@ -622,7 +622,7 @@ typedef enum {vStart, eRegel, eHalted} eVeloMode;
|
||||
pDorn->iPort = iVal;
|
||||
|
||||
/* channel number */
|
||||
pPtr = Tcl_GetVar2(pTcl,name,"Channel",TCL_GLOBAL_ONLY);
|
||||
pPtr = (char *)Tcl_GetVar2(pTcl,name,"Channel",TCL_GLOBAL_ONLY);
|
||||
if(!pPtr)
|
||||
{
|
||||
Tcl_AppendResult(pTcl,"ERROR: no channel number found in",name,NULL);
|
||||
@ -639,7 +639,7 @@ typedef enum {vStart, eRegel, eHalted} eVeloMode;
|
||||
pDorn->iChannel = iVal;
|
||||
|
||||
/* time out. This one gets defaulted when not specified */
|
||||
pPtr = Tcl_GetVar2(pTcl,name,"Timeout",TCL_GLOBAL_ONLY);
|
||||
pPtr = (char *)Tcl_GetVar2(pTcl,name,"Timeout",TCL_GLOBAL_ONLY);
|
||||
if(!pPtr)
|
||||
{
|
||||
pDorn->iTimeOut = 1000;
|
||||
|
Reference in New Issue
Block a user