Skip to content

Commit

Permalink
ohhhhhhhhhmy peeeeceeeeeeeeeeeeeeeeee
Browse files Browse the repository at this point in the history
  • Loading branch information
NoozAbooz committed Feb 11, 2025
1 parent 124489b commit 8e7be53
Show file tree
Hide file tree
Showing 11 changed files with 481 additions and 600 deletions.
Binary file modified firmware/catLib.a
Binary file not shown.
21 changes: 16 additions & 5 deletions include/catLib/drivetrain/chassis.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,27 +15,31 @@ namespace catlib {

void calibrate();

void initializeOdom();

void track();

void mirrorAutons(bool state);

void setPose(double x, double y, double theta, bool isRadian);

void setBrakeMode(pros::MotorBrake brakeMode);
void setBrakeMode(pros::motor_brake_mode_e brakeMode);

Vector2d getPose();

Vector3d getPoseWithTheta(bool isRadian);
Vector3d getPoseWithTheta(bool isRadian = false);

void arcadeDrive(double linear, double angular);

void tankDrive(double l, double r);

void setDrive(double l, double r);

void driveStraightPID(double targetDistance, double speedCap, double timeOut);
void movePID(double targetDistance, double timeOut = 2000, double speedCap = 1, double exitRange = 0.2);

void turnToHeadingPID(double targetDeg, double speedRatio, bool reversed);
void turnToHeadingPID(double heading, double speedRatio = 1, bool reversed = 0, double exitRange = 0.2);

void driveToPoint(double x, double y, double timeOut, double maxVoltage, double minVoltage);
void moveToPoint(double x, double y, double timeOut, double maxVoltage, double minVoltage);

void turnToPoint(double x, double y, double timeOut, double speedCap);

Expand All @@ -52,5 +56,12 @@ namespace catlib {
DriveType d;
Vector2d pose;
double heading;
double currentHeading;

double prevHeading;
double prevVertical;
double prevHorizontal;

bool mirror;
};
}
4 changes: 2 additions & 2 deletions include/deviceGlobals.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ inline pros::MotorGroup rightDrive({-7, 10, 8});

// Intake
inline pros::MotorGroup intake({-9, -19});
inline pros::Motor wallStake(16);
inline pros::Motor wallStake(20);

// Pneumatics
inline pros::adi::Pneumatics clampPiston('A', false);
Expand Down Expand Up @@ -116,7 +116,7 @@ inline catlib::OdomSensors cLsensors(
&vertical_tracker
);

inline catlib::Chassis cl (
inline catlib::Chassis cat (
&cLdt,
&lateral_pid,
&angular_pid,
Expand Down
694 changes: 347 additions & 347 deletions project.pros

Large diffs are not rendered by default.

Loading

0 comments on commit 8e7be53

Please sign in to comment.