- CONST Woes

This commit is contained in:
koennecke
2007-02-23 14:32:26 +00:00
parent 6c6da3f11f
commit 82fcf26008
5 changed files with 20 additions and 41 deletions

BIN
libpsi.a

Binary file not shown.

View File

@ -23,7 +23,7 @@
#include "rs232c_def.h"
#include "el734_def.h"
#include "psi/hardsup/serialsinq.h"
#include "sics.h"
#include <sics.h>
#define False 0
#define True 1
@ -43,7 +43,7 @@ EXTERN void SerialMurder(ClientData pData)
}
/*------------------ a forward declaration -----------------------------*/
EXTERN int SurielSend(ClientData clientData, Tcl_Interp *interp,
int argc, CONST char *argv[]);
int argc, char *argv[]);
/*----------------------------------------------------------------------------
Controller is the main entry point for this stuff. It connects to a motor
@ -53,7 +53,7 @@ EXTERN int SurielSend(ClientData clientData, Tcl_Interp *interp,
---------------------------------------------------------------------------*/
int Controller(ClientData clientData, Tcl_Interp *interp,
int argc, CONST char *argv[])
int argc, char *argv[])
{
int iRet;
int iPort, iChannel, iMotor;
@ -143,7 +143,7 @@ int Controller(ClientData clientData, Tcl_Interp *interp,
----------------------------------------------------------------------------*/
EXTERN int SurielSend(ClientData clientData, Tcl_Interp *interp,
int argc, CONST char *argv[])
int argc, char *argv[])
{
char pBueffel[256];
char pAnswer[256];

View File

@ -9,10 +9,10 @@
Mark Koennecke, January 1998
----------------------------------------------------------------------------*/
#include <tcl.h>
#include "sics.h"
#include <sics.h>
int Controller(ClientData clientData, Tcl_Interp *interp,
int argc, CONST char *argv[]);
int argc, char *argv[]);
int SerialInit(SConnection *pCon,SicsInterp *pSics, void *pData,
int argc, char *argv[])

View File

@ -570,27 +570,19 @@ static int TASScanPoint(pScanData self, int iPoint)
if(pVar)
{
if(isTASMotor(ScanVarName(pVar)) >= 0)
{
pMot = FindMotor(self->pSics,ScanVarName(pVar));
if(pMot)
{
status = MotorGetSoftPosition(pMot,self->pCon,&fVal);
if(!status)
{
fVal = -9999.77;
}
}
else
{
if(pVar->pInter != NULL)
{
fVal = pVar->pInter->GetValue(pVar->pObject,self->pCon);
}
}
if(pVar->pInter != NULL)
{
fVal = pVar->pInter->GetValue(pVar->pObject,self->pCon);
}
else
{
fVal = -9999.99;
}
}
else if((iPtr = isTASVar(pVar->Name)) >= 0 )
{
fVal = pTAS->tasPar[iPtr]->fVal;
{
fVal = pTAS->tasPar[iPtr]->fVal;
}
}
sprintf(pWork,"%9.4f ", fVal);
@ -880,16 +872,12 @@ static int TASScanCount(pScanData self, int iPoint)
if(pVar)
{
if( (iPtr = isTASEnergy(pVar->Name)) >= 0)
{
fVal = pTAS->tasPar[EI+iPtr]->fVal;
{
fVal = pTAS->tasPar[EI+iPtr]->fVal;
}
else
{
pMot = FindMotor(self->pSics,pVar->Name);
if(pMot)
{
MotorGetSoftPosition(pMot,self->pCon,&fVal);
}
{
fVal = readDrivable(pVar->Name,self->pCon);
}
AppendScanVar(pVar,fVal);
}

View File

@ -799,15 +799,6 @@ float readDrivable(char *val, SConnection *pCon){
pMotor pMot = NULL;
float fVal;
/*
if motor: read motor
*/
pMot = FindMotor(pServ->pSics,val);
if(pMot != NULL){
MotorGetSoftPosition(pMot,pCon,&fVal);
return fVal;
}
/*
else: read general drivable
*/