- CONST Woes
This commit is contained in:
@ -23,7 +23,7 @@
|
|||||||
#include "rs232c_def.h"
|
#include "rs232c_def.h"
|
||||||
#include "el734_def.h"
|
#include "el734_def.h"
|
||||||
#include "psi/hardsup/serialsinq.h"
|
#include "psi/hardsup/serialsinq.h"
|
||||||
#include "sics.h"
|
#include <sics.h>
|
||||||
|
|
||||||
#define False 0
|
#define False 0
|
||||||
#define True 1
|
#define True 1
|
||||||
@ -43,7 +43,7 @@ EXTERN void SerialMurder(ClientData pData)
|
|||||||
}
|
}
|
||||||
/*------------------ a forward declaration -----------------------------*/
|
/*------------------ a forward declaration -----------------------------*/
|
||||||
EXTERN int SurielSend(ClientData clientData, Tcl_Interp *interp,
|
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
|
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 Controller(ClientData clientData, Tcl_Interp *interp,
|
||||||
int argc, CONST char *argv[])
|
int argc, char *argv[])
|
||||||
{
|
{
|
||||||
int iRet;
|
int iRet;
|
||||||
int iPort, iChannel, iMotor;
|
int iPort, iChannel, iMotor;
|
||||||
@ -143,7 +143,7 @@ int Controller(ClientData clientData, Tcl_Interp *interp,
|
|||||||
|
|
||||||
----------------------------------------------------------------------------*/
|
----------------------------------------------------------------------------*/
|
||||||
EXTERN int SurielSend(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 pBueffel[256];
|
||||||
char pAnswer[256];
|
char pAnswer[256];
|
||||||
|
4
serial.c
4
serial.c
@ -9,10 +9,10 @@
|
|||||||
Mark Koennecke, January 1998
|
Mark Koennecke, January 1998
|
||||||
----------------------------------------------------------------------------*/
|
----------------------------------------------------------------------------*/
|
||||||
#include <tcl.h>
|
#include <tcl.h>
|
||||||
#include "sics.h"
|
#include <sics.h>
|
||||||
|
|
||||||
int Controller(ClientData clientData, Tcl_Interp *interp,
|
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 SerialInit(SConnection *pCon,SicsInterp *pSics, void *pData,
|
||||||
int argc, char *argv[])
|
int argc, char *argv[])
|
||||||
|
40
tasscan.c
40
tasscan.c
@ -570,27 +570,19 @@ static int TASScanPoint(pScanData self, int iPoint)
|
|||||||
if(pVar)
|
if(pVar)
|
||||||
{
|
{
|
||||||
if(isTASMotor(ScanVarName(pVar)) >= 0)
|
if(isTASMotor(ScanVarName(pVar)) >= 0)
|
||||||
{
|
|
||||||
pMot = FindMotor(self->pSics,ScanVarName(pVar));
|
|
||||||
if(pMot)
|
|
||||||
{
|
|
||||||
status = MotorGetSoftPosition(pMot,self->pCon,&fVal);
|
|
||||||
if(!status)
|
|
||||||
{
|
{
|
||||||
fVal = -9999.77;
|
if(pVar->pInter != NULL)
|
||||||
}
|
{
|
||||||
}
|
fVal = pVar->pInter->GetValue(pVar->pObject,self->pCon);
|
||||||
else
|
}
|
||||||
{
|
else
|
||||||
if(pVar->pInter != NULL)
|
{
|
||||||
{
|
fVal = -9999.99;
|
||||||
fVal = pVar->pInter->GetValue(pVar->pObject,self->pCon);
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else if((iPtr = isTASVar(pVar->Name)) >= 0 )
|
else if((iPtr = isTASVar(pVar->Name)) >= 0 )
|
||||||
{
|
{
|
||||||
fVal = pTAS->tasPar[iPtr]->fVal;
|
fVal = pTAS->tasPar[iPtr]->fVal;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
sprintf(pWork,"%9.4f ", fVal);
|
sprintf(pWork,"%9.4f ", fVal);
|
||||||
@ -880,16 +872,12 @@ static int TASScanCount(pScanData self, int iPoint)
|
|||||||
if(pVar)
|
if(pVar)
|
||||||
{
|
{
|
||||||
if( (iPtr = isTASEnergy(pVar->Name)) >= 0)
|
if( (iPtr = isTASEnergy(pVar->Name)) >= 0)
|
||||||
{
|
{
|
||||||
fVal = pTAS->tasPar[EI+iPtr]->fVal;
|
fVal = pTAS->tasPar[EI+iPtr]->fVal;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
pMot = FindMotor(self->pSics,pVar->Name);
|
fVal = readDrivable(pVar->Name,self->pCon);
|
||||||
if(pMot)
|
|
||||||
{
|
|
||||||
MotorGetSoftPosition(pMot,self->pCon,&fVal);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
AppendScanVar(pVar,fVal);
|
AppendScanVar(pVar,fVal);
|
||||||
}
|
}
|
||||||
|
@ -799,15 +799,6 @@ float readDrivable(char *val, SConnection *pCon){
|
|||||||
pMotor pMot = NULL;
|
pMotor pMot = NULL;
|
||||||
float fVal;
|
float fVal;
|
||||||
|
|
||||||
/*
|
|
||||||
if motor: read motor
|
|
||||||
*/
|
|
||||||
pMot = FindMotor(pServ->pSics,val);
|
|
||||||
if(pMot != NULL){
|
|
||||||
MotorGetSoftPosition(pMot,pCon,&fVal);
|
|
||||||
return fVal;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
else: read general drivable
|
else: read general drivable
|
||||||
*/
|
*/
|
||||||
|
Reference in New Issue
Block a user