diff --git a/src/main/java/frc4388/robot/RobotContainer.java b/src/main/java/frc4388/robot/RobotContainer.java index 965062a..b58ccfe 100644 --- a/src/main/java/frc4388/robot/RobotContainer.java +++ b/src/main/java/frc4388/robot/RobotContainer.java @@ -128,7 +128,7 @@ public class RobotContainer { // resets the yaw of the pigeon new JoystickButton(getDriverJoystick(), XboxController.X_BUTTON) - .whileHeld(new RunCommand(() -> m_robotDrive.tankDriveVelocity(1, 1), m_robotDrive)); + .whileHeld(new RunCommand(() -> m_robotDrive.tankDriveVelocity(9, 3), m_robotDrive)); // turn 45 degrees new JoystickButton(getDriverJoystick(), XboxController.Y_BUTTON) @@ -195,14 +195,14 @@ public class RobotContainer { new Pose2d(0, 0, new Rotation2d(0)), // Pass through these two interior waypoints, making an 's' curve path List.of( - new Translation2d(3, 0) - //new Translation2d(2, -1) + new Translation2d(10, 0) ), // End 3 meters straight ahead of where we started, facing forward - new Pose2d(3, 0, new Rotation2d(0)), + new Pose2d(20, 20, new Rotation2d(0)), // Pass config config); - + // 10 = 20, 20 = 35, 30 = 53.5 + // (0,10) = (8,22) RamseteCommand ramseteCommand = new RamseteCommand( exampleTrajectory, m_robotDrive::getPose, diff --git a/src/main/java/frc4388/robot/subsystems/Drive.java b/src/main/java/frc4388/robot/subsystems/Drive.java index 696c3c8..5258a46 100644 --- a/src/main/java/frc4388/robot/subsystems/Drive.java +++ b/src/main/java/frc4388/robot/subsystems/Drive.java @@ -275,10 +275,10 @@ public class Drive extends SubsystemBase { m_currentTimeSec = (int)(System.currentTimeMillis() / 1000); SmartDashboard.putNumber("Time Seconds", System.currentTimeMillis()); - if (m_currentTimeSec % 10 == 0) { + if (m_currentTimeSec % 30 == 0) { coolFalcon(true); SmartDashboard.putBoolean("Solenoid", true); - } else if ((m_currentTimeSec - 2) % 10 == 0) { + } else if ((m_currentTimeSec - 1) % 30 == 0) { coolFalcon(false); SmartDashboard.putBoolean("Solenoid", false); } @@ -467,6 +467,8 @@ public class Drive extends SubsystemBase { m_rightBackMotor.selectProfileSlot(DriveConstants.SLOT_VELOCITY, DriveConstants.PID_PRIMARY); m_leftBackMotor.selectProfileSlot(DriveConstants.SLOT_VELOCITY, DriveConstants.PID_PRIMARY); + System.err.println(moveVelLeft); + m_rightBackMotor.set(TalonFXControlMode.Velocity, moveVelRight); m_leftBackMotor.set(TalonFXControlMode.Velocity, moveVelLeft); m_leftFrontMotor.follow(m_leftBackMotor); @@ -531,9 +533,12 @@ public class Drive extends SubsystemBase { m_currentAngleYaw = 0; m_kinematicsTargetAngle = 0; } - +//lol +//sko +//ridge /** - * Returns the heading of the robot +//brayden=bad coder + * Returns the heading of the robot * @return The robot's heading in degrees, from -180 to 180 */ public double getHeading() {