Now you can download a copy of these docs so you can use them offline! Download now

SendablePIDController Class Reference

#include <SendablePIDController.h>

Inheritance diagram for SendablePIDController:
Collaboration diagram for SendablePIDController:

List of all members.

Public Member Functions

 SendablePIDController (double p, double i, double d, PIDSource *source, PIDOutput *output)
 SendablePIDController (double p, double i, double d, PIDSource *source, PIDOutput *output, double period)
virtual void SetSetpoint (float setpoint)
virtual void SetPID (double p, double i, double d)
virtual void Enable ()
virtual void Disable ()
virtual std::string GetType ()
virtual NetworkTableGetTable ()
virtual void ValueChanged (NetworkTable *table, const char *name, NetworkTables_Types type)
virtual void ValueConfirmed (NetworkTable *table, const char *name, NetworkTables_Types type)

Detailed Description

A SendablePIDController is a PIDController that can be sent over to the SmartDashboard using the PutData(...) method.

It is useful if you want to test values of a PIDController without having to recompile code between tests. Also, consider using Preferences to save the important values between matches.

See also:
SmartDashboard

Definition at line 26 of file SendablePIDController.h.


Constructor & Destructor Documentation

SendablePIDController::SendablePIDController ( double  p,
double  i,
double  d,
PIDSource source,
PIDOutput output 
)

Allocate a PID object with the given constants for P, I, D, using a 50ms period.

Parameters:
p the proportional coefficient
i the integral coefficient
d the derivative coefficient
source The PIDSource object that is used to get values
output The PIDOutput object that is set to the output value

Definition at line 25 of file SendablePIDController.cpp.

SendablePIDController::SendablePIDController ( double  p,
double  i,
double  d,
PIDSource source,
PIDOutput output,
double  period 
)

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

Parameters:
p the proportional coefficient
i the integral coefficient
d the derivative coefficient
source The PIDSource object that is used to get values
output The PIDOutput object that is set to the output value
period the loop time for doing calculations in seconds. This particularly effects calculations of the integral and differential terms. The default is 50ms.

Definition at line 42 of file SendablePIDController.cpp.


Member Function Documentation

void SendablePIDController::Disable (  )  [virtual]

Stop running the PIDController, this sets the output to zero before stopping.

Definition at line 102 of file SendablePIDController.cpp.

void SendablePIDController::Enable (  )  [virtual]

Begin running the PIDController

Definition at line 91 of file SendablePIDController.cpp.

void SendablePIDController::SetPID ( double  p,
double  i,
double  d 
) [virtual]

Set the PID Controller gain parameters. Set the proportional, integral, and differential coefficients.

Parameters:
p Proportional coefficient
i Integral coefficient
d Differential coefficient

Definition at line 76 of file SendablePIDController.cpp.

void SendablePIDController::SetSetpoint ( float  setpoint  )  [virtual]

Set the setpoint for the PIDController

Parameters:
setpoint the desired setpoint

Definition at line 59 of file SendablePIDController.cpp.


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

Generated on Thu Jan 12 2012 22:35:36 for WPILibC++ by doxygen 1.7.1