|
| TrackingWheel (pros::ADIEncoder *encoder, float diameter, float distance, float gearRatio=1) |
| Create a new tracking wheel. More...
|
|
| TrackingWheel (pros::Rotation *encoder, float diameter, float distance, float gearRatio=1) |
| Create a new tracking wheel. More...
|
|
| TrackingWheel (pros::Motor_Group *motors, float diameter, float distance, float rpm) |
| Create a new tracking wheel. More...
|
|
void | reset () |
| Reset the tracking wheel position to 0. More...
|
|
float | getDistanceTraveled () |
| Get the distance traveled by the tracking wheel. More...
|
|
float | getOffset () |
| Get the offset of the tracking wheel from the center of rotation. More...
|
|
int | getType () |
| Get the type of tracking wheel. More...
|
|
◆ TrackingWheel() [1/3]
lemlib::TrackingWheel::TrackingWheel |
( |
pros::ADIEncoder * |
encoder, |
|
|
float |
diameter, |
|
|
float |
distance, |
|
|
float |
gearRatio = 1 |
|
) |
| |
Create a new tracking wheel.
- Parameters
-
encoder | the optical shaft encoder to use |
diameter | diameter of the tracking wheel in inches |
distance | distance between the tracking wheel and the center of rotation in inches |
gearRatio | gear ratio of the tracking wheel, defaults to 1 |
◆ TrackingWheel() [2/3]
lemlib::TrackingWheel::TrackingWheel |
( |
pros::Rotation * |
encoder, |
|
|
float |
diameter, |
|
|
float |
distance, |
|
|
float |
gearRatio = 1 |
|
) |
| |
Create a new tracking wheel.
- Parameters
-
encoder | the v5 rotation sensor to use |
diameter | diameter of the tracking wheel in inches |
distance | distance between the tracking wheel and the center of rotation in inches |
gearRatio | gear ratio of the tracking wheel, defaults to 1 |
◆ TrackingWheel() [3/3]
lemlib::TrackingWheel::TrackingWheel |
( |
pros::Motor_Group * |
motors, |
|
|
float |
diameter, |
|
|
float |
distance, |
|
|
float |
rpm |
|
) |
| |
Create a new tracking wheel.
- Parameters
-
motors | the motor group to use |
diameter | diameter of the drivetrain wheels in inches |
distance | half the track width of the drivetrain in inches |
rpm | theoretical maximum rpm of the drivetrain wheels |
◆ getDistanceTraveled()
float lemlib::TrackingWheel::getDistanceTraveled |
( |
| ) |
|
Get the distance traveled by the tracking wheel.
- Returns
- float distance traveled in inches
◆ getOffset()
float lemlib::TrackingWheel::getOffset |
( |
| ) |
|
Get the offset of the tracking wheel from the center of rotation.
- Returns
- float offset in inches
◆ getType()
int lemlib::TrackingWheel::getType |
( |
| ) |
|
Get the type of tracking wheel.
- Returns
- int - 1 if motor group, 0 otherwise
◆ reset()
void lemlib::TrackingWheel::reset |
( |
| ) |
|
Reset the tracking wheel position to 0.
The documentation for this class was generated from the following file: