TRC Library for FTC (2011) 2011
TRC Library Code Project

C:/Users/Michael/Ftc/2011/code/trclib/servo.h File Reference

Go to the source code of this file.

Data Structures

struct  SERVO

Defines

#define _SERVO_H
#define MOD_ID   MOD_SERVO
#define MIN_SERVO_VALUE   0
#define MAX_SERVO_VALUE   255

Functions

void ServoInit (__out SERVO &serv, __in int servoMotor, __in float posPerDegree, __in float initDegrees)
float ServoGetAngle (__out SERVO &serv)
void ServoSetAngle (__out SERVO &serv, __in float degree)

Define Documentation

#define _SERVO_H

Definition at line 16 of file servo.h.

#define MAX_SERVO_VALUE   255

Definition at line 29 of file servo.h.

#define MIN_SERVO_VALUE   0

Definition at line 28 of file servo.h.

#define MOD_ID   MOD_SERVO

Definition at line 23 of file servo.h.


Function Documentation

float ServoGetAngle ( __out SERVO serv)

This function gets the current servo position in degrees.

Parameters:
servPoints to the SERVO structure.
Returns:
Returns the current servo position in degrees.

Definition at line 102 of file servo.h.

void ServoInit ( __out SERVO serv,
__in int  servoMotor,
__in float  posPerDegree,
__in float  initDegrees 
)

This function initializes the servo system.

Parameters:
servPoints to the SERVO structure to be initialized.
servoMotorSpecifies the servo motor ID.
posPerDegreeSpecifies the position value per degree.
initDegreesSpecifies the initial position in degrees.
servoFlagsSpecifies the servo flags.

Definition at line 68 of file servo.h.

void ServoSetAngle ( __out SERVO serv,
__in float  degree 
)

This function sets servo position in degrees.

Parameters:
servPoints to the SERVO structure.
degreeSpecifies the servo position in degrees.

Definition at line 125 of file servo.h.

 All Data Structures Files Functions Variables Defines