Functions | Variables
cphidgetspatial.c File Reference
#include "stdafx.h"
#include "cphidgetspatial.h"
#include "cusb.h"
#include "math.h"
#include "csocket.h"
#include "cthread.h"
Include dependency graph for cphidgetspatial.c:

Go to the source code of this file.

Functions

 CPhidget_read ((CPhidgetHandle) phid)
PHIDGET21_API int CCONV CPhidgetSpatial_resetCompassCorrectionParameters (CPhidgetSpatialHandle phid)
PHIDGET21_API int CCONV CPhidgetSpatial_setAnalogAccelCalibrationValues (CPhidgetSpatialHandle phid, double gainPositive[3], double gainNegative[3], double offset[3], double factor1[3], double factor2[3])
PHIDGET21_API int CCONV CPhidgetSpatial_setAnalogGyroCalibrationValues (CPhidgetSpatialHandle phid, double gainPositive[3], double gainNegative[3], double offset[3], double factor1[3], double factor2[3])
PHIDGET21_API int CCONV CPhidgetSpatial_setCompassCorrectionParameters (CPhidgetSpatialHandle phid, double magField, double offset0, double offset1, double offset2, double gain0, double gain1, double gain2, double T0, double T1, double T2, double T3, double T4, double T5)
PHIDGET21_API int CCONV CPhidgetSpatial_setDigitalAccelCalibrationValues (CPhidgetSpatialHandle phid, double gainPositive[3], double gainNegative[3], double offset[3], double factor1[3], double factor2[3])
PHIDGET21_API int CCONV CPhidgetSpatial_setDigitalGyroCalibrationValues (CPhidgetSpatialHandle phid, double gainPositive[3], double gainNegative[3], double offset[3], double factor1[3], double factor2[3])
PHIDGET21_API int CCONV CPhidgetSpatial_unZeroGyro (CPhidgetSpatialHandle phid)
TESTATTACHED TESTATTACHED
TESTATTACHED PHIDGET21_API int
CCONV 
CPhidgetSpatial_zeroGyro (CPhidgetSpatialHandle phid)
 for (i=0;i< SPATIAL_MAX_ACCELAXES;i++)
 for (i=0;i< phid->phid.attr.spatial.numAccelAxes;i++)
static double getCorrectedField (CPhidgetSpatialHandle phid, double fields[], int axis)
 if ()
 if (phid->doZeroGyro)
 if (timestampdiff(phid->latestDataTime, phid->lastEventTime) >=dataRate)
TESTATTACHED if (newVal< phid->interruptRate)
static int setCalibrationValues_inFirmware (CPhidgetSpatialHandle phid, int tableID, int index, double gainPositive[3], double gainNegative[3], double offset[3], double factor1[3], double factor2[3])
static int setCompassCorrectionTable_inFimrware (CPhidgetSpatialHandle phid, double magField, double offset0, double offset1, double offset2, double gain0, double gain1, double gain2, double T0, double T1, double T2, double T3, double T4, double T5)
 switch (phid->phid.deviceUID)
 TESTPTR (phid)
static void updateLatestDataTime (CPhidgetSpatialHandle phid, int i)
static void updateTimestamp (CPhidgetSpatialHandle phid, int time)
 ZEROMEM (accelAvg, sizeof(accelAvg))
 ZEROMEM (angularRateAvg, sizeof(angularRateAvg))
 ZEROMEM (magneticFieldAvg, sizeof(magneticFieldAvg))

Variables

done __pad0__
double accelAvg [SPATIAL_MAX_ACCELAXES]
phid accelerationMax = PUNI_DBL
phid accelerationMin = PUNI_DBL
double angularRateAvg [SPATIAL_MAX_ACCELAXES]
phid angularRateMax = PUNI_DBL
phid angularRateMin = PUNI_DBL
phid bufferReadPtr = 0
phid bufferWritePtr = 0
int cal
int count = 0
phid dataRate = PUNI_INT
phid dataRateMax = PUNI_INT
phid dataRateMin = PUNI_INT
unsigned char doneGyroZero = PFALSE
phid doZeroGyro = PFALSE
return EPHIDGET_OK
return EPHIDGET_UNEXPECTED
CPhidgetSpatial_SpatialEventDataHandleeventData
int i = 0
phid interruptRate = PUNI_INT
int j = 0
phid lastTimeCounterValid = PFALSE
double magneticFieldAvg [SPATIAL_MAX_ACCELAXES]
double magneticFieldCorr [SPATIAL_MAX_ACCELAXES]
phid magneticFieldMax = PUNI_DBL
phid magneticFieldMin = PUNI_DBL
phid timestamp microseconds = 0
phid timestamp seconds = 0
phid spatialDataNetwork = PUNI_BOOL

Function Documentation

PHIDGET21_API int CCONV CPhidgetSpatial_setCompassCorrectionParameters ( CPhidgetSpatialHandle  phid,
double  magField,
double  offset0,
double  offset1,
double  offset2,
double  gain0,
double  gain1,
double  gain2,
double  T0,
double  T1,
double  T2,
double  T3,
double  T4,
double  T5 
)

Definition at line 1468 of file cphidgetspatial.c.

for ( )

Definition at line 29 of file cphidgetspatial.c.

for ( i  = 0; i<phid->phid.attr.spatial.numAccelAxes; i++)

Definition at line 120 of file cphidgetspatial.c.

static double getCorrectedField ( CPhidgetSpatialHandle  phid,
double  fields[],
int  axis 
) [static]

Definition at line 934 of file cphidgetspatial.c.

if ( )

Definition at line 228 of file cphidgetspatial.c.

if ( phid->  doZeroGyro)

Definition at line 670 of file cphidgetspatial.c.

if ( timestampdiff(phid->latestDataTime, phid->lastEventTime) >=  dataRate)

Definition at line 702 of file cphidgetspatial.c.

TESTATTACHED if ( newVal< phid->  interruptRate)

Definition at line 1315 of file cphidgetspatial.c.

static int setCalibrationValues_inFirmware ( CPhidgetSpatialHandle  phid,
int  tableID,
int  index,
double  gainPositive[3],
double  gainNegative[3],
double  offset[3],
double  factor1[3],
double  factor2[3] 
) [static]

Definition at line 959 of file cphidgetspatial.c.

static int setCompassCorrectionTable_inFimrware ( CPhidgetSpatialHandle  phid,
double  magField,
double  offset0,
double  offset1,
double  offset2,
double  gain0,
double  gain1,
double  gain2,
double  T0,
double  T1,
double  T2,
double  T3,
double  T4,
double  T5 
) [static]

Definition at line 1072 of file cphidgetspatial.c.

switch ( phid->phid.  deviceUID)

Definition at line 52 of file cphidgetspatial.c.

TESTPTR ( phid  )
static void updateLatestDataTime ( CPhidgetSpatialHandle  phid,
int  i 
) [static]

Definition at line 211 of file cphidgetspatial.c.

static void updateTimestamp ( CPhidgetSpatialHandle  phid,
int  time 
) [static]

Definition at line 190 of file cphidgetspatial.c.

ZEROMEM ( accelAvg  ,
sizeof(accelAvg  
)
ZEROMEM ( angularRateAvg  ,
sizeof(angularRateAvg  
)

Variable Documentation

done __pad0__

Definition at line 917 of file cphidgetspatial.c.

Definition at line 221 of file cphidgetspatial.c.

Definition at line 19 of file cphidgetspatial.c.

Definition at line 20 of file cphidgetspatial.c.

Definition at line 221 of file cphidgetspatial.c.

Definition at line 21 of file cphidgetspatial.c.

Definition at line 22 of file cphidgetspatial.c.

Definition at line 140 of file cphidgetspatial.c.

Definition at line 141 of file cphidgetspatial.c.

int cal

Definition at line 219 of file cphidgetspatial.c.

int count = 0

Definition at line 219 of file cphidgetspatial.c.

Definition at line 16 of file cphidgetspatial.c.

Definition at line 17 of file cphidgetspatial.c.

Definition at line 15 of file cphidgetspatial.c.

unsigned char doneGyroZero = PFALSE

Definition at line 220 of file cphidgetspatial.c.

Definition at line 150 of file cphidgetspatial.c.

return EPHIDGET_OK

Definition at line 41 of file cphidgetspatial.c.

Definition at line 931 of file cphidgetspatial.c.

Definition at line 222 of file cphidgetspatial.c.

int i = 0

Definition at line 13 of file cphidgetspatial.c.

Definition at line 25 of file cphidgetspatial.c.

int j = 0

Definition at line 219 of file cphidgetspatial.c.

Definition at line 149 of file cphidgetspatial.c.

Definition at line 221 of file cphidgetspatial.c.

Definition at line 221 of file cphidgetspatial.c.

Definition at line 23 of file cphidgetspatial.c.

Definition at line 24 of file cphidgetspatial.c.

phid latestDataTime microseconds = 0

Definition at line 143 of file cphidgetspatial.c.

phid latestDataTime seconds = 0

Definition at line 142 of file cphidgetspatial.c.

Definition at line 27 of file cphidgetspatial.c.



pedal_monitor
Author(s): Pedro Mendes
autogenerated on Fri Jun 6 2014 18:37:21