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

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

#include "..\HTDriversV1.6\drivers\HTGYRO-driver.h"

Go to the source code of this file.

Data Structures

struct  GYRO


#define _GYRO_H
#define MOD_ID   MOD_GYRO
#define GYROF_USER_MASK   0x00ff
#define GYROF_INVERSE   0x0001
#define GYRO_CAL_INTERVAL   10
#define GyroGetTurnRate(p)   (p.turnRate)
#define GyroGetHeading(p)   (p.heading)


void GyroCal (__out GYRO &gyro, __in int numSamples, __in int calInterval)
void GyroTask (__inout GYRO &gyro)
void GyroReset (__out GYRO &gyro)
void GyroInit (__out GYRO &gyro, __in int sensorID, __in int gyroFlags)

Define Documentation

#define _GYRO_H

Definition at line 16 of file gyro.h.

#define GYRO_CAL_INTERVAL   10

Definition at line 37 of file gyro.h.


Definition at line 36 of file gyro.h.

#define GYROF_INVERSE   0x0001

Definition at line 31 of file gyro.h.

#define GYROF_USER_MASK   0x00ff

Definition at line 30 of file gyro.h.

#define GyroGetHeading (   p)    (p.heading)

Definition at line 43 of file gyro.h.

#define GyroGetTurnRate (   p)    (p.turnRate)

Definition at line 42 of file gyro.h.

#define MOD_ID   MOD_GYRO

Definition at line 25 of file gyro.h.

Function Documentation

void GyroCal ( __out GYRO gyro,
__in int  numSamples,
__in int  calInterval 

This function calibrates the gyro for zero offset and deadband.

gyroPoints to the GYRO structure to be initialized.
numSamplesSpecifies the number of calibration samples.
calIntervalSpecifies the calibration interval in msec.

Definition at line 67 of file gyro.h.

void GyroInit ( __out GYRO gyro,
__in int  sensorID,
__in int  gyroFlags 

This function initializes the gyro sensor.

gyroPoints to the GYRO structure to be initialized.
sensorIDSpecifies the ID of the gyro sensor.
gyroFlagsSpecifies the gyro flags.

Definition at line 182 of file gyro.h.

void GyroReset ( __out GYRO gyro)

This function resets the gyro heading.

gyroPoints to the GYRO structure to be reset.

Definition at line 159 of file gyro.h.

void GyroTask ( __inout GYRO gyro)

This function performs the gyro task where it integrates the turn rate into a heading value.

gyroPoints to the GYRO structure.

Definition at line 122 of file gyro.h.

 All Data Structures Files Functions Variables Defines