Skip to content

Commit

Permalink
Merge branch 'main' of github.com:StuyPulse/BigWang
Browse files Browse the repository at this point in the history
  • Loading branch information
BenG49 committed Jan 31, 2024
2 parents e0b0d43 + 6adab61 commit d8223e0
Show file tree
Hide file tree
Showing 8 changed files with 31 additions and 16 deletions.
6 changes: 4 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,10 @@ final String STUYLIB_VERSION = 'v2024.1.4'

def ROBOT_MAIN_CLASS = "com.stuypulse.robot.Main"

sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
java {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}

// Define my targets (RoboRIO) and artifacts (deployable files)
// This is added by GradleRIO's backing project DeployUtils.
Expand Down
19 changes: 14 additions & 5 deletions src/main/java/com/stuypulse/robot/RobotContainer.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

package com.stuypulse.robot;

import com.pathplanner.lib.auto.AutoBuilder;
import com.stuypulse.robot.commands.*;
import com.stuypulse.robot.commands.amper.*;
import com.stuypulse.robot.commands.auton.*;
Expand Down Expand Up @@ -39,7 +40,7 @@ public class RobotContainer {
public final Gamepad driver = new AutoGamepad(Ports.Gamepad.DRIVER);
public final Gamepad operator = new AutoGamepad(Ports.Gamepad.OPERATOR);

// Subsystem
// Subsystems
public final AprilTagVision vision = AprilTagVision.getInstance();
public final NoteVision noteVision = NoteVision.getInstance();
public final Odometry odometry = Odometry.getInstance();
Expand All @@ -52,12 +53,14 @@ public class RobotContainer {
public final SwerveDrive swerve = SwerveDrive.getInstance();

// Autons
private static SendableChooser<Command> autonChooser = new SendableChooser<>();

// Robot container
private static SendableChooser<Command> autonChooser;

// RobotContainer
public RobotContainer() {
swerve.configureAutoBuilder();

configureDefaultCommands();
configureNamedCommands();
configureButtonBindings();
configureAutons();
}
Expand All @@ -70,6 +73,12 @@ private void configureDefaultCommands() {
swerve.setDefaultCommand(new SwerveDriveDrive(driver));
}

/**********************/
/*** NAMED COMMANDS ***/
/**********************/

private void configureNamedCommands() {}

/***************/
/*** BUTTONS ***/
/***************/
Expand All @@ -85,7 +94,7 @@ private void configureButtonBindings() {
/**************/

public void configureAutons() {
autonChooser.setDefaultOption("Do Nothing", new DoNothingAuton());
autonChooser = AutoBuilder.buildAutoChooser();

SmartDashboard.putData("Autonomous", autonChooser);
}
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/com/stuypulse/robot/constants/Cameras.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ public interface Limelight {

public CameraConfig[] APRILTAG_CAMERAS = new CameraConfig[] {
new CameraConfig("samera0", new Pose3d(new Translation3d(), new Rotation3d())),
new CameraConfig("samera1", new Pose3d(new Translation3d(), new Rotation3d()))
new CameraConfig("samera1", new Pose3d(new Translation3d(), new Rotation3d())),
new CameraConfig("samera2", new Pose3d(new Translation3d(), new Rotation3d())),
};

public static class CameraConfig {
Expand Down
3 changes: 3 additions & 0 deletions src/main/java/com/stuypulse/robot/constants/Field.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@
*/
public interface Field {

double WIDTH = Units.inchesToMeters(323.25);
double LENGTH = Units.inchesToMeters(651.25);

double NOTE_LENGTH = Units.inchesToMeters(14.0);

/*** APRILTAGS ***/
Expand Down
Empty file.
Empty file.
6 changes: 3 additions & 3 deletions vendordeps/PathplannerLib.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"fileName": "PathplannerLib.json",
"name": "PathplannerLib",
"version": "2024.1.4",
"version": "2024.1.6",
"uuid": "1b42324f-17c6-4875-8e77-1c312bc8c786",
"frcYear": "2024",
"mavenUrls": [
Expand All @@ -12,15 +12,15 @@
{
"groupId": "com.pathplanner.lib",
"artifactId": "PathplannerLib-java",
"version": "2024.1.4"
"version": "2024.1.6"
}
],
"jniDependencies": [],
"cppDependencies": [
{
"groupId": "com.pathplanner.lib",
"artifactId": "PathplannerLib-cpp",
"version": "2024.1.4",
"version": "2024.1.6",
"libName": "PathplannerLib",
"headerClassifier": "headers",
"sharedLibrary": false,
Expand Down
10 changes: 5 additions & 5 deletions vendordeps/photonlib.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"fileName": "photonlib.json",
"name": "photonlib",
"version": "v2024.2.0",
"version": "v2024.2.2",
"uuid": "515fe07e-bfc6-11fa-b3de-0242ac130004",
"frcYear": "2024",
"mavenUrls": [
Expand All @@ -14,7 +14,7 @@
{
"groupId": "org.photonvision",
"artifactId": "photonlib-cpp",
"version": "v2024.2.0",
"version": "v2024.2.2",
"libName": "photonlib",
"headerClassifier": "headers",
"sharedLibrary": true,
Expand All @@ -29,7 +29,7 @@
{
"groupId": "org.photonvision",
"artifactId": "photontargeting-cpp",
"version": "v2024.2.0",
"version": "v2024.2.2",
"libName": "photontargeting",
"headerClassifier": "headers",
"sharedLibrary": true,
Expand All @@ -46,12 +46,12 @@
{
"groupId": "org.photonvision",
"artifactId": "photonlib-java",
"version": "v2024.2.0"
"version": "v2024.2.2"
},
{
"groupId": "org.photonvision",
"artifactId": "photontargeting-java",
"version": "v2024.2.0"
"version": "v2024.2.2"
}
]
}

0 comments on commit d8223e0

Please sign in to comment.