5#include "pros/motor_group.hpp"
68 pros::MotorGroup* leftMotors,
69 pros::MotorGroup* rightMotors);
83 pros::MotorGroup** rightOut);
144 float maxSpeed = 127.0f,
bool reversed =
false);
Pose, sensor specs, and the global odometry / pose-estimation API.
Tank-drive chassis class.
Single tracking wheel for odometry.
Umbrella header for LightLib's own classes.
Public LightLib odometry / pose-estimation API.
void extras_init(light::Drive *chassis, pros::MotorGroup *leftMotors, pros::MotorGroup *rightMotors)
Register the user's drivetrain objects with LightLib.
void getDriveMotorGroups(pros::MotorGroup **leftOut, pros::MotorGroup **rightOut)
Look up the registered drivetrain motor groups.
void moveToPoint(float targetX, float targetY, int timeout, float maxSpeed, bool reversed)
Drive the chassis to a field-relative point (legacy entry point).
light::Drive * getChassis()
Lightweight PID controller used by characterization helpers.
LightPID(float kP, float kI, float kD)
Construct with gains.
float prevError
Previous-cycle error.
float integralCap
Anti-windup clamp (set 0 to disable).
float integral
Accumulated integral term.
float update(float error)
Advance one step.
void reset()
Zero out the integral and previous-error history.
Drive chassis
The drive chassis, configured in main.cpp and used everywhere else.