Drivetrain teleop drive and basic auto seems to be ok now

This commit is contained in:
Bradley Bickford 2024-03-10 14:01:47 -04:00
parent 5f15633044
commit 51f2ad4c30
2 changed files with 12 additions and 2 deletions

View File

@ -157,7 +157,7 @@ public class RobotContainer {
);
//intake.setDefaultCommand(intake.intakeUpCommand());
intake.setDefaultCommand(intake.manualPivot(operator::getLeftY, operator::getRightY));
intake.setDefaultCommand(intake.manualPivot(() -> -operator.getLeftY(), operator::getRightY));
shooter.setDefaultCommand(
shooter.angleSpeedsSetpoints(

View File

@ -420,7 +420,17 @@ public class Drivetrain extends SubsystemBase {
/** Zeroes the heading of the robot. */
public void zeroHeading() {
m_gyro.reset();
Pose2d tempPose = m_poseEstimator.getEstimatedPosition();
Rotation2d tempRotation = Rotation2d.fromDegrees(0);
resetOdometry(
new Pose2d(
tempPose.getX(),
tempPose.getY(),
tempRotation
)
);
}
public Command zeroHeadingCommand() {