PID Class Reference

#include <PID.h>

List of all members.

Public Member Functions

 PID (float p, float i, float d, float max_pwm, int actual)
 ~PID (void)
float CalcPWM (int desired, int actual)


Detailed Description

Class implements a PID Control Loop.

On each "iteration" with new PID control values, call the CalcPWM() method

Implementation is currently incomplete -- does not yet have an implementation for "integral" control. (i.e. current this is just a PD control loop)


Constructor & Destructor Documentation

PID::PID ( float  p,
float  i,
float  d,
float  max_pwm,
int  actual 
)

Allocate a PID object with the given constants for P, I, D, and max_power

PID::~PID ( void   ) 

Free the PID object


Member Function Documentation

float PID::CalcPWM ( int  desired,
int  actual 
)

Calculate a PWM value for the motor given the current sensor info.


The documentation for this class was generated from the following files:

Generated on Thu Oct 2 14:01:29 2008 for WPI Robotics Library by  doxygen 1.5.5