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

Go to the source code of this file.

Functions

 CPhidget_read ((CPhidgetHandle) phid)
static int CPhidgetAdvancedServo_makePacket (CPhidgetAdvancedServoHandle phid, unsigned char *buffer, int Index)
PHIDGET21_API int CCONV CPhidgetAdvancedServo_setServoParameters (CPhidgetAdvancedServoHandle phid, int Index, double min_us, double max_us, double degrees, double velocity_max)
 for (i=0;i< ADVSERVO_MAXSERVOS;i++)
 for (i=0;i< phid->phid.attr.advancedservo.numMotors;i++)
int getServoParameterIndex (CPhidget_ServoType type)
 if ()
 if (phid->packetCounter[Index]==PUNK_INT) phid->packetCounter[Index]=0 = PFALSE
 if (CPhidget_statusFlagIsSet(phid->phid.status, PHIDGET_REMOTE_FLAG))
TESTATTACHED MASGN (phid.attr.advancedservo.numMotors)
double servo_degrees_to_us (CPhidgetServoParameters params, double degrees)
double servo_degrees_to_us_vel (CPhidgetServoParameters params, double degrees)
double servo_us_to_degrees (CPhidgetServoParameters params, double us, unsigned char round)
double servo_us_to_degrees_vel (CPhidgetServoParameters params, double us, unsigned char round)
TESTATTACHED TESTATTACHED setupNewAdvancedServoParams (phid, Index, Phid_Servo_Types[getServoParameterIndex(newVal)])
 switch (phid->phid.deviceIDSpec)
 TESTPTR (phid)
 TESTPTRS (phid, buffer)
TESTATTACHED TESTRANGE (servo_us_to_degrees_vel(phid->servoParams[Index], phid->accelerationMin, PFALSE)-0.5, servo_us_to_degrees_vel(phid->servoParams[Index], phid->accelerationMax, PFALSE)+0.5) new Val
TESTATTACHED TESTRANGE (servo_us_to_degrees(phid->servoParams[Index], phid->motorPositionMin[Index], PFALSE)-0.5, servo_us_to_degrees(phid->servoParams[Index], phid->motorPositionMax[Index], PFALSE)+0.5) new Val
 while (1)
 ZEROMEM (buffer, 8)

Variables

int accel = 0
phid accelerationMax = PUNI_DBL
phid accelerationMin = PUNI_DBL
unsigned char buffer [8] = {0}
double current [ADVSERVO_MAXSERVOS]
return EPHIDGET_OK
char error_buffer [128]
unsigned char flags = 0
int i = 0
 Index = Index & 0x07
unsigned char justStopped [ADVSERVO_MAXSERVOS]
double lastCurrent [ADVSERVO_MAXSERVOS]
double lastPosition [ADVSERVO_MAXSERVOS]
double lastVelocity [ADVSERVO_MAXSERVOS]
int maxpwm = 0
int minpwm = 0
unsigned char motorDone [ADVSERVO_MAXSERVOS]
unsigned char motorEngaged [ADVSERVO_MAXSERVOS]
phid motorPositionMaxLimit = PUNI_DBL
phid motorPositionMinLimit = PUNI_DBL
phid packetCounter &[Index] phid motorStoppedState [Index] = 0x0F PFALSE
phid outputPacketLen = 0
int packet_type = Index & 0x10
phid packetCounter [Index]
phid PGoodErrState = PFALSE
CThread_mutex_lockphid = (CPhidgetAnalogHandle)phidG
const CPhidgetServoParameters Phid_Servo_Types []
double position [ADVSERVO_MAXSERVOS] = 0
TESTATTACHEDpVal = servo_us_to_degrees_vel(phid->servoParams[Index], phid->motorAcceleration[Index], PTRUE)
int pwm = 0
int pwmEcho [ADVSERVO_MAXSERVOS]
int readcount = 100
int result = 0
int retval = EPHIDGET_OK
unsigned char speedRamping [ADVSERVO_MAXSERVOS]
double velocity [ADVSERVO_MAXSERVOS] = 0
phid velocityMaxLimit = PUNI_DBL
phid velocityMin = PUNI_DBL

Function Documentation

static int CPhidgetAdvancedServo_makePacket ( CPhidgetAdvancedServoHandle  phid,
unsigned char *  buffer,
int  Index 
) [static]
PHIDGET21_API int CCONV CPhidgetAdvancedServo_setServoParameters ( CPhidgetAdvancedServoHandle  phid,
int  Index,
double  min_us,
double  max_us,
double  degrees,
double  velocity_max 
)

Definition at line 891 of file cphidgetadvancedservo.c.

for ( )

Definition at line 22 of file cphidgetadvancedservo.c.

for ( i  = 0; i<phid->phid.attr.advancedservo.numMotors; i++)

Definition at line 84 of file cphidgetadvancedservo.c.

if ( )

Definition at line 169 of file cphidgetadvancedservo.c.

if ( phid->  packetCounter[Index] = =PUNK_INT) = PFALSE [pure virtual]

Definition at line 583 of file cphidgetadvancedservo.c.

TESTATTACHED MASGN ( phid.attr.advancedservo.  numMotors)
TESTATTACHED TESTATTACHED setupNewAdvancedServoParams ( phid  ,
Index  ,
Phid_Servo_Types  [getServoParameterIndex(newVal)] 
)
switch ( phid->phid.  deviceIDSpec)

Definition at line 61 of file cphidgetadvancedservo.c.

TESTPTR ( phid  )
TESTPTRS ( phid  ,
buffer   
)
while ( )

Definition at line 138 of file cphidgetadvancedservo.c.

ZEROMEM ( buffer  ,
 
)

Variable Documentation

int accel = 0

Definition at line 384 of file cphidgetadvancedservo.c.

Definition at line 18 of file cphidgetadvancedservo.c.

Definition at line 19 of file cphidgetadvancedservo.c.

unsigned char buffer = {0}

Definition at line 52 of file cphidgetadvancedservo.c.

Definition at line 164 of file cphidgetadvancedservo.c.

return EPHIDGET_OK

Definition at line 45 of file cphidgetadvancedservo.c.

char error_buffer[128]

Definition at line 167 of file cphidgetadvancedservo.c.

unsigned char flags = 0

Definition at line 385 of file cphidgetadvancedservo.c.

int i = 0

Definition at line 12 of file cphidgetadvancedservo.c.

Definition at line 388 of file cphidgetadvancedservo.c.

Definition at line 163 of file cphidgetadvancedservo.c.

Definition at line 165 of file cphidgetadvancedservo.c.

Definition at line 165 of file cphidgetadvancedservo.c.

Definition at line 165 of file cphidgetadvancedservo.c.

int maxpwm = 0

Definition at line 384 of file cphidgetadvancedservo.c.

int minpwm = 0

Definition at line 384 of file cphidgetadvancedservo.c.

unsigned char motorDone[ADVSERVO_MAXSERVOS]

Definition at line 163 of file cphidgetadvancedservo.c.

Definition at line 163 of file cphidgetadvancedservo.c.

Definition at line 14 of file cphidgetadvancedservo.c.

Definition at line 15 of file cphidgetadvancedservo.c.

Definition at line 400 of file cphidgetadvancedservo.c.

Definition at line 58 of file cphidgetadvancedservo.c.

int packet_type = Index & 0x10

Definition at line 387 of file cphidgetadvancedservo.c.

Definition at line 397 of file cphidgetadvancedservo.c.

Definition at line 20 of file cphidgetadvancedservo.c.

Definition at line 324 of file cphidgetadvancedservo.c.

Definition at line 164 of file cphidgetadvancedservo.c.

TESTATTACHED * pVal = servo_us_to_degrees_vel(phid->servoParams[Index], phid->motorAcceleration[Index], PTRUE)

Definition at line 570 of file cphidgetadvancedservo.c.

int pwm = 0

Definition at line 384 of file cphidgetadvancedservo.c.

Definition at line 166 of file cphidgetadvancedservo.c.

int readcount = 100

Definition at line 51 of file cphidgetadvancedservo.c.

int result = 0

Definition at line 51 of file cphidgetadvancedservo.c.

return retval = EPHIDGET_OK

Definition at line 384 of file cphidgetadvancedservo.c.

Definition at line 163 of file cphidgetadvancedservo.c.

Definition at line 164 of file cphidgetadvancedservo.c.

Definition at line 16 of file cphidgetadvancedservo.c.

Definition at line 17 of file cphidgetadvancedservo.c.



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