C# Class CSharpRoboticsLib.Drive.DriveEncoders

Encapsulates a left and right encoder and provides drive-specific calculations
Mostra file Open project: shockwave4488/CSharpRoboticsLib Class Usage Examples

Public Methods

Method Description
DriveEncoders ( WPILib.Encoder left, WPILib.Encoder right ) : CSharpRoboticsLib.WPIExtensions

Encapsulates a Left and Right Encoder, with the right encoder reversed.

DriveEncoders ( int lAChannel, int lBChannel, int rAChannel, int rBChannel ) : CSharpRoboticsLib.WPIExtensions

Initialializes both encoders to the channels specified, with the RIGHT encoder reversed.

Reset ( ) : void

Resets both encoders

SetDistancePerPulse ( double wheelDiameter, int countPerRevolution ) : void

Sets the Left and Right DistancePerPulse in feet based on Wheel Diameter and counts per revolution

Protected Methods

Method Description
DriveEncoders ( ) : CSharpRoboticsLib.WPIExtensions

Just for EnhancedDriveEncoders

Method Details

DriveEncoders() protected method

Just for EnhancedDriveEncoders
protected DriveEncoders ( ) : CSharpRoboticsLib.WPIExtensions
return CSharpRoboticsLib.WPIExtensions

DriveEncoders() public method

Encapsulates a Left and Right Encoder, with the right encoder reversed.
public DriveEncoders ( WPILib.Encoder left, WPILib.Encoder right ) : CSharpRoboticsLib.WPIExtensions
left WPILib.Encoder Left Encoder
right WPILib.Encoder Right Encoder
return CSharpRoboticsLib.WPIExtensions

DriveEncoders() public method

Initialializes both encoders to the channels specified, with the RIGHT encoder reversed.
public DriveEncoders ( int lAChannel, int lBChannel, int rAChannel, int rBChannel ) : CSharpRoboticsLib.WPIExtensions
lAChannel int Left A Channel
lBChannel int Left B Channel
rAChannel int Right A Channel
rBChannel int Right B Channel
return CSharpRoboticsLib.WPIExtensions

Reset() public method

Resets both encoders
public Reset ( ) : void
return void

SetDistancePerPulse() public method

Sets the Left and Right DistancePerPulse in feet based on Wheel Diameter and counts per revolution
public SetDistancePerPulse ( double wheelDiameter, int countPerRevolution ) : void
wheelDiameter double Diameter of your drive wheels IN INCHES
countPerRevolution int
return void