Remove superfluous trailing white space from C files
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
This file contains the implementation of a driver for the Julabo
|
||||
LH45 Temperature controller.
|
||||
|
||||
|
||||
|
||||
Mark Koennecke, Juli 1997
|
||||
Mark Lesha, January 2006 (based on ITC4 code)
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
|
||||
typedef struct __EVDriver *pEVDriver;
|
||||
|
||||
#include <evdriver.i>
|
||||
#include <evdriver.i>
|
||||
/* Do we need these ?
|
||||
#include <sics.h>
|
||||
#include <modriv.h>
|
||||
@@ -65,8 +65,8 @@
|
||||
|
||||
pEVDriver CreateLH45Driver(int argc, char *argv[]);
|
||||
int ConfigLH45(pEVDriver self);
|
||||
|
||||
|
||||
|
||||
|
||||
/*-----------------------------------------------------------------------*/
|
||||
typedef struct {
|
||||
pLH45 pData;
|
||||
@@ -85,12 +85,12 @@
|
||||
{
|
||||
pLH45Driv pMe = NULL;
|
||||
int iRet;
|
||||
|
||||
|
||||
assert(self);
|
||||
pMe = (pLH45Driv)self->pPrivate;
|
||||
assert(pMe);
|
||||
|
||||
iRet = LH45_Read(&pMe->pData,fPos);
|
||||
|
||||
iRet = LH45_Read(&pMe->pData,fPos);
|
||||
if(iRet <= 0 )
|
||||
{
|
||||
pMe->iLastError = iRet;
|
||||
@@ -103,13 +103,13 @@
|
||||
return 0;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
/*----------------------------------------------------------------------------*/
|
||||
static int LH45Run(pEVDriver self, float fVal)
|
||||
{
|
||||
pLH45Driv pMe = NULL;
|
||||
int iRet;
|
||||
|
||||
|
||||
assert(self);
|
||||
pMe = (pLH45Driv )self->pPrivate;
|
||||
assert(pMe);
|
||||
@@ -126,7 +126,7 @@
|
||||
static int LH45Error(pEVDriver self, int *iCode, char *error, int iErrLen)
|
||||
{
|
||||
pLH45Driv pMe = NULL;
|
||||
|
||||
|
||||
assert(self);
|
||||
pMe = (pLH45Driv)self->pPrivate;
|
||||
assert(pMe);
|
||||
@@ -138,7 +138,7 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
LH45_ErrorTxt(&pMe->pData,pMe->iLastError,error,iErrLen);
|
||||
LH45_ErrorTxt(&pMe->pData,pMe->iLastError,error,iErrLen);
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
@@ -147,7 +147,7 @@
|
||||
{
|
||||
pLH45Driv pMe = NULL;
|
||||
int iRet;
|
||||
|
||||
|
||||
assert(self);
|
||||
pMe = (pLH45Driv )self->pPrivate;
|
||||
assert(pMe);
|
||||
@@ -160,13 +160,13 @@
|
||||
}
|
||||
return 1;
|
||||
|
||||
}
|
||||
}
|
||||
/*--------------------------------------------------------------------------*/
|
||||
static int LH45Init(pEVDriver self)
|
||||
{
|
||||
pLH45Driv pMe = NULL;
|
||||
int iRet;
|
||||
|
||||
|
||||
assert(self);
|
||||
pMe = (pLH45Driv )self->pPrivate;
|
||||
assert(pMe);
|
||||
@@ -183,28 +183,28 @@
|
||||
{
|
||||
pMe->iLastError = iRet;
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
/*--------------------------------------------------------------------------*/
|
||||
static int LH45Close(pEVDriver self)
|
||||
{
|
||||
pLH45Driv pMe = NULL;
|
||||
|
||||
|
||||
assert(self);
|
||||
pMe = (pLH45Driv )self->pPrivate;
|
||||
assert(pMe);
|
||||
|
||||
LH45_Close(&pMe->pData);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
/*---------------------------------------------------------------------------*/
|
||||
static int LH45Fix(pEVDriver self, int iError)
|
||||
{
|
||||
pLH45Driv pMe = NULL;
|
||||
int iRet;
|
||||
|
||||
|
||||
assert(self);
|
||||
pMe = (pLH45Driv )self->pPrivate;
|
||||
assert(pMe);
|
||||
@@ -230,11 +230,11 @@
|
||||
if(iRet)
|
||||
{
|
||||
return DEVREDO;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
return DEVFAULT;
|
||||
}
|
||||
}
|
||||
break;
|
||||
/* handable protocoll errors */
|
||||
case EL734__BAD_TMO:
|
||||
@@ -243,47 +243,47 @@
|
||||
case -501: /* Bad_COM */
|
||||
return DEVREDO;
|
||||
case -504: /* Badly formatted */
|
||||
return DEVREDO;
|
||||
return DEVREDO;
|
||||
default:
|
||||
return DEVFAULT;
|
||||
break;
|
||||
break;
|
||||
}
|
||||
return DEVFAULT;
|
||||
}
|
||||
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
// static int LH45Halt(pEVDriver *self)
|
||||
// {
|
||||
// assert(self);
|
||||
//
|
||||
//
|
||||
// return 1;
|
||||
// }
|
||||
/*------------------------------------------------------------------------*/
|
||||
void KillLH45(void *pData)
|
||||
{
|
||||
pLH45Driv pMe = NULL;
|
||||
|
||||
|
||||
pMe = (pLH45Driv)pData;
|
||||
assert(pMe);
|
||||
|
||||
|
||||
if(pMe->pHost)
|
||||
{
|
||||
free(pMe->pHost);
|
||||
}
|
||||
free(pMe);
|
||||
}
|
||||
}
|
||||
/*------------------------------------------------------------------------*/
|
||||
pEVDriver CreateLH45Driver(int argc, char *argv[])
|
||||
{
|
||||
pEVDriver pNew = NULL;
|
||||
pLH45Driv pSim = NULL;
|
||||
|
||||
|
||||
/* check for arguments */
|
||||
if(argc < 3)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
pNew = CreateEVDriver(argc,argv);
|
||||
pSim = (pLH45Driv)malloc(sizeof(LH45Driv));
|
||||
memset(pSim,0,sizeof(LH45Driv));
|
||||
@@ -293,23 +293,23 @@
|
||||
}
|
||||
pNew->pPrivate = pSim;
|
||||
pNew->KillPrivate = KillLH45;
|
||||
|
||||
|
||||
/* initalise pLH45Driver */
|
||||
pSim->iControl = atoi(argv[2]);
|
||||
pSim->iRead = atoi(argv[1]);
|
||||
pSim->iLastError = 0;
|
||||
pSim->iTmo = 10;
|
||||
|
||||
|
||||
/* The LH45 doesn't require divisors or multipliers
|
||||
and they are always forced to 1.0 */
|
||||
pSim->fDiv = 1.0;
|
||||
pSim->fMult = 1.0;
|
||||
|
||||
|
||||
pSim->pHost = strdup(argv[0]);
|
||||
pSim->iPort = 0;
|
||||
pSim->iChannel = 0;
|
||||
|
||||
|
||||
|
||||
|
||||
/* initialise function pointers */
|
||||
pNew->SetValue = LH45Run;
|
||||
pNew->GetValue = GetLH45Pos;
|
||||
@@ -318,20 +318,20 @@
|
||||
pNew->TryFixIt = LH45Fix;
|
||||
pNew->Init = LH45Init;
|
||||
pNew->Close = LH45Close;
|
||||
|
||||
return pNew;
|
||||
}
|
||||
|
||||
return pNew;
|
||||
}
|
||||
/*--------------------------------------------------------------------------*/
|
||||
int ConfigLH45(pEVDriver self)
|
||||
{
|
||||
pLH45Driv pMe = NULL;
|
||||
int iRet;
|
||||
|
||||
|
||||
assert(self);
|
||||
pMe = (pLH45Driv )self->pPrivate;
|
||||
assert(pMe);
|
||||
|
||||
iRet = LH45_Config(&pMe->pData, pMe->iTmo, pMe->iRead,
|
||||
iRet = LH45_Config(&pMe->pData, pMe->iTmo, pMe->iRead,
|
||||
pMe->iControl,pMe->fDiv,pMe->fMult);
|
||||
if(iRet < 0)
|
||||
{
|
||||
@@ -344,17 +344,17 @@
|
||||
int SetSensorLH45(pEVDriver self, int iSensor)
|
||||
{
|
||||
pLH45Driv pMe = NULL;
|
||||
|
||||
|
||||
assert(self);
|
||||
pMe = (pLH45Driv )self->pPrivate;
|
||||
assert(pMe);
|
||||
|
||||
|
||||
/* The LH45 allows bath temp, external temp and tank temp to be read
|
||||
so allow iRead=1 to 3 for each of these respectively */
|
||||
if( (iSensor < 1) || (iSensor > 3) )
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
pMe->iRead = iSensor;
|
||||
pMe->pData->iRead = iSensor;
|
||||
return 1;
|
||||
@@ -363,7 +363,7 @@
|
||||
int SetControlLH45(pEVDriver self, int iSensor)
|
||||
{
|
||||
pLH45Driv pMe = NULL;
|
||||
|
||||
|
||||
assert(self);
|
||||
pMe = (pLH45Driv )self->pPrivate;
|
||||
assert(pMe);
|
||||
@@ -373,7 +373,7 @@
|
||||
if( (iSensor < 1) || (iSensor > 2) )
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
pMe->iControl = iSensor;
|
||||
pMe->pData->iControl = iSensor;
|
||||
return 1;
|
||||
@@ -382,7 +382,7 @@
|
||||
int SetTMOLH45(pEVDriver self, int iSensor)
|
||||
{
|
||||
pLH45Driv pMe = NULL;
|
||||
|
||||
|
||||
assert(self);
|
||||
pMe = (pLH45Driv )self->pPrivate;
|
||||
assert(pMe);
|
||||
@@ -390,7 +390,7 @@
|
||||
if(iSensor < 10)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
pMe->iTmo = iSensor;
|
||||
return 1;
|
||||
}
|
||||
@@ -398,7 +398,7 @@
|
||||
int GetControlLH45(pEVDriver self)
|
||||
{
|
||||
pLH45Driv pMe = NULL;
|
||||
|
||||
|
||||
assert(self);
|
||||
pMe = (pLH45Driv )self->pPrivate;
|
||||
assert(pMe);
|
||||
@@ -409,7 +409,7 @@
|
||||
int GetSensorLH45(pEVDriver self)
|
||||
{
|
||||
pLH45Driv pMe = NULL;
|
||||
|
||||
|
||||
assert(self);
|
||||
pMe = (pLH45Driv )self->pPrivate;
|
||||
assert(pMe);
|
||||
@@ -420,7 +420,7 @@
|
||||
int GetTMOLH45(pEVDriver self)
|
||||
{
|
||||
pLH45Driv pMe = NULL;
|
||||
|
||||
|
||||
assert(self);
|
||||
pMe = (pLH45Driv )self->pPrivate;
|
||||
assert(pMe);
|
||||
@@ -431,7 +431,7 @@
|
||||
float GetDivisorLH45(pEVDriver self)
|
||||
{
|
||||
pLH45Driv pMe = NULL;
|
||||
|
||||
|
||||
assert(self);
|
||||
pMe = (pLH45Driv )self->pPrivate;
|
||||
assert(pMe);
|
||||
@@ -442,7 +442,7 @@
|
||||
int SetDivisorLH45(pEVDriver self, float fDiv)
|
||||
{
|
||||
pLH45Driv pMe = NULL;
|
||||
|
||||
|
||||
assert(self);
|
||||
pMe = (pLH45Driv )self->pPrivate;
|
||||
assert(pMe);
|
||||
@@ -455,7 +455,7 @@
|
||||
float GetMultLH45(pEVDriver self)
|
||||
{
|
||||
pLH45Driv pMe = NULL;
|
||||
|
||||
|
||||
assert(self);
|
||||
pMe = (pLH45Driv )self->pPrivate;
|
||||
assert(pMe);
|
||||
@@ -466,13 +466,13 @@
|
||||
int SetMultLH45(pEVDriver self, float fDiv)
|
||||
{
|
||||
pLH45Driv pMe = NULL;
|
||||
|
||||
|
||||
assert(self);
|
||||
pMe = (pLH45Driv )self->pPrivate;
|
||||
assert(pMe);
|
||||
|
||||
|
||||
/* The LH45 doesn't need multiplier, force to 1.0 */
|
||||
pMe->fMult = 1.0; /* fDiv */;
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user