Skip to content

Commit

Permalink
init commit
Browse files Browse the repository at this point in the history
  • Loading branch information
eshen7 committed Feb 3, 2024
1 parent fedc2cd commit fc9874e
Show file tree
Hide file tree
Showing 42 changed files with 760 additions and 403 deletions.
81 changes: 0 additions & 81 deletions src/main/java/team3647/frc2023/constants/ShooterConstants.java

This file was deleted.

149 changes: 0 additions & 149 deletions src/main/java/team3647/frc2023/subsystems/Superstructure.java

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package team3647.frc2023.auto;
package team3647.frc2024.auto;

import com.choreo.lib.Choreo;
import com.choreo.lib.ChoreoControlFunction;
Expand All @@ -15,11 +15,11 @@
import java.util.function.BooleanSupplier;
import java.util.function.Consumer;
import java.util.function.Supplier;
import team3647.frc2023.constants.AutoConstants;
import team3647.frc2023.constants.FieldConstants;
import team3647.frc2023.subsystems.Superstructure;
import team3647.frc2023.subsystems.SwerveDrive;
import team3647.frc2023.util.TargetingUtil;
import team3647.frc2024.constants.AutoConstants;
import team3647.frc2024.constants.FieldConstants;
import team3647.frc2024.subsystems.Superstructure;
import team3647.frc2024.subsystems.SwerveDrive;
import team3647.frc2024.util.TargetingUtil;

public class AutoCommands {
private final SwerveDrive swerve;
Expand Down Expand Up @@ -115,8 +115,12 @@ public Command spinUp() {
return Commands.parallel(superstructure.spinUp(), superstructure.feed());
}

public double getPivotAngleByPose(Pose2d pose) {
return targeting.getPivotAngleByPose(pose) * 180 / Math.PI;
public double getPivotAngleByPose(Supplier<Pose2d> pose) {
return targeting.getPivotAngleByPose(pose.get()) * 180 / Math.PI;
}

public double getPivotAngle() {
return targeting.getPivotAngle(FieldConstants.kBlueSpeaker) * 180 / Math.PI;
}

public Command target() {
Expand Down Expand Up @@ -153,7 +157,7 @@ public Command pathAndShootWithOverride(String path, Alliance color) {
public Command followChoreoPathWithOverrideAndPivot(String path, Alliance color) {
return Commands.deadline(
followChoreoPathWithOverride(path, color),
superstructure.pivotCommands.setAngle(() -> getPivotAngleByPose(getFinal(path))));
superstructure.pivotCommands.setAngle(() -> getPivotAngle()));
}

public Command followChoreoPathWithOverride(String path, Alliance color) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package team3647.frc2023.auto;
package team3647.frc2024.auto;

import edu.wpi.first.math.geometry.Pose2d;
import edu.wpi.first.wpilibj2.command.Command;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package team3647.frc2023.auto;
package team3647.frc2024.auto;

import edu.wpi.first.math.geometry.Pose2d;
import team3647.frc2023.constants.FieldConstants;
import team3647.frc2024.constants.FieldConstants;

public class Repathing {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package team3647.frc2023.commands;
package team3647.frc2024.commands;

import edu.wpi.first.math.filter.SlewRateLimiter;
import edu.wpi.first.math.geometry.Rotation2d;
Expand All @@ -12,9 +12,9 @@
import java.util.function.BooleanSupplier;
import java.util.function.DoubleSupplier;
import java.util.function.Supplier;
import team3647.frc2023.constants.FieldConstants;
import team3647.frc2023.subsystems.SwerveDrive;
import team3647.frc2023.util.AutoDrive.DriveMode;
import team3647.frc2024.constants.FieldConstants;
import team3647.frc2024.subsystems.SwerveDrive;
import team3647.frc2024.util.AutoDrive.DriveMode;
import team3647.lib.LinearRegression;

public class DrivetrainCommands {
Expand Down Expand Up @@ -49,7 +49,7 @@ public Command driveVisionTeleop(

// var translation = new Translation2d(motionXComponent, motionYComponent);

if (mode == DriveMode.SHOOT_ON_THE_MOVE && enabeld) {
if (mode != DriveMode.NONE && enabeld) {
motionTurnComponent = autoDriveTwist2d.dtheta;
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package team3647.frc2023.commands;
package team3647.frc2024.commands;

import edu.wpi.first.wpilibj2.command.Command;
import edu.wpi.first.wpilibj2.command.Commands;
import edu.wpi.first.wpilibj2.command.Subsystem;
import java.util.Set;
import team3647.frc2023.subsystems.Intake;
import team3647.frc2024.subsystems.Intake;

public class IntakeCommands {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,21 @@
package team3647.frc2023.commands;
package team3647.frc2024.commands;

import edu.wpi.first.wpilibj2.command.Command;
import edu.wpi.first.wpilibj2.command.Commands;
import edu.wpi.first.wpilibj2.command.Subsystem;
import java.util.Set;
import team3647.frc2023.subsystems.Kicker;
import team3647.frc2024.subsystems.Kicker;

public class KickerCommands {

public Command kick() {
return Commands.run(() -> kicker.openLoop(0.5), kicker);
}

public Command slowFeed() {
return Commands.run(() -> kicker.openLoop(0.1), kicker);
}

public Command unkick() {
return Commands.run(() -> kicker.openLoop(-0.1), kicker);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
package team3647.frc2023.commands;
package team3647.frc2024.commands;

import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard;
import edu.wpi.first.wpilibj2.command.Command;
import edu.wpi.first.wpilibj2.command.Commands;
import edu.wpi.first.wpilibj2.command.Subsystem;
import java.util.Set;
import java.util.function.DoubleSupplier;
import team3647.frc2023.constants.PivotConstants;
import team3647.frc2023.subsystems.Pivot;
import team3647.frc2024.constants.PivotConstants;
import team3647.frc2024.subsystems.Pivot;

public class PivotCommands {

Expand Down
Loading

0 comments on commit fc9874e

Please sign in to comment.