Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
90 changes: 28 additions & 62 deletions src/main/java/frc/robot/RobotContainer.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ public class RobotContainer {
private CommandXboxController operator = new CommandXboxController(2);
private final SendableChooser<Command> autoChooser;
public static boolean isExtended = false;
public static boolean intaking = false;
private SwerveDrivetrain.SwerveDriveState driveState = drivetrain.getState();

private Command shootGroup =
Expand Down Expand Up @@ -157,76 +158,41 @@ private void configureBindings() {
controller::getRightX));

/* Controls */
// Left Trigger = Flywheel On and Off
controller
.rightTrigger()
.toggleOnTrue(
new DrivetrainCommand(
drivetrain,
DrivetrainCommand.Position.AUTO_ALIGN_HUB,
controller::getLeftX,
controller::getLeftY,
controller::getRightX));
// Y = Shoot Toggle
controller
.y()
.leftTrigger()
.toggleOnTrue(
(shootGroup
.alongWith(hopperShoot)
.alongWith(new IntakeCommand(intake, IntakeCommand.Position.SLOW_INTAKE))));
// X = Intake Toggle
controller
.x()
.and(() -> !shootGroup.isScheduled())
.toggleOnTrue(new IntakeCommand(intake, IntakeCommand.Position.INTAKE));
// Left Plus = Kicker Outtake Toggle
new FlywheelCommand(flywheel, FlywheelCommand.Position.TRENCH_SHOT, drivetrain));
// Right Trigger = Shoot On and Off
controller
.povLeft()
.and(() -> !shootGroup.isScheduled())
.toggleOnTrue(new KickerCommand(kicker, KickerCommand.Position.OUTTAKE));
// Right Plus = Intake Outtake Toggle
.rightTrigger()
.toggleOnTrue(new KickerCommand(kicker, KickerCommand.Position.INTAKE));

// Left Back Button = Shoot Reverse BACK LEFT MAPPED TO A
controller.a().onTrue(new KickerCommand(kicker, KickerCommand.Position.OUTTAKE));

// Left Bumper = Hopper deploy/stow toggle
controller
.povRight()
.and(() -> !shootGroup.isScheduled())
.toggleOnTrue(new IntakeCommand(intake, IntakeCommand.Position.OUTTAKE));
// Right Stick Down = Retract Hopper
.leftBumper()
.onTrue(
Commands.defer(
() ->
new HopperCommand(
hopper, HopperCommand.Position.EXTEND_RETRACT, RobotContainer.isExtended),
java.util.Set.of(hopper)));

// Left Bumper = Intake ON/OFF toggle
controller
.rightStick()
.rightBumper()
.and(() -> !shootGroup.isScheduled())
.onTrue(
Commands.run(() -> hopper.move(HopperConfig.HOPPER_RETRACT_ROTATION), hopper)
.withDeadline(Commands.waitSeconds(2)));
.toggleOnTrue(new IntakeCommand(intake, IntakeCommand.Position.INTAKE));

// Right Bumper = Reverse intake, HELD, Back ight mapped to B
controller.b().whileTrue(new IntakeCommand(intake, IntakeCommand.Position.OUTTAKE));

// Back button = Zero Pigeon
controller.back().onTrue(Commands.runOnce(drivetrain::zeroPigeon));
// Right Bumper = Flywheel Toggle for pass
controller
.rightBumper()
.toggleOnTrue(new FlywheelCommand(flywheel, FlywheelCommand.Position.PASS, drivetrain));
// Left Bumper = Flywheel Toggle for trench shot speeds
controller
.leftBumper()
.toggleOnTrue(
new FlywheelCommand(flywheel, FlywheelCommand.Position.TRENCH_SHOT, drivetrain));
// Left Trigger = Flywheel Toggle for calculated shot speeds
controller
.leftTrigger()
.toggleOnTrue(
new FlywheelCommand(flywheel, FlywheelCommand.Position.CALCULATED_SHOT, drivetrain));
// Down Plus = Zero hopper
controller.povDown().onTrue(Commands.runOnce(() -> hopper.zero(), hopper));
// Intake Extend Shoot
controller
.b()
.toggleOnTrue(
Commands.parallel(
new KickerCommand(kicker, KickerCommand.Position.INTAKE),
new IntakeCommand(intake, IntakeCommand.Position.SLOW_INTAKE),
Commands.run(() -> hopper.move(HopperConfig.HOPPER_EXTEND_ROTATION))));
// Hopper Extend
controller
.a()
.onTrue(
Commands.run(() -> hopper.move(HopperConfig.HOPPER_EXTEND_ROTATION), hopper)
.withDeadline(Commands.waitSeconds(2)));

/* Operator */
operator
.leftBumper()
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/frc/robot/config/FlywheelConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ public class FlywheelConfig {

// Set
public static final double FLYWHEEL_RIGHT_MAX_CRUISE_VELOCITY = 3000;
public static final double FLYWHEEL_RIGHT_TARGET_ACCELERATION = 500;
public static final double FLYWHEEL_RIGHT_TARGET_ACCELERATION = 400;
public static final double FLYWHEEL_RIGHT_P = 0.25;
public static final double FLYWHEEL_RIGHT_I = 0;
public static final double FLYWHEEL_RIGHT_D = 0;
Expand All @@ -21,7 +21,7 @@ public class FlywheelConfig {

// Set
public static final double FLYWHEEL_LEFT_MAX_CRUISE_VELOCITY = 3000;
public static final double FLYWHEEL_LEFT_TARGET_ACCELERATION = 500;
public static final double FLYWHEEL_LEFT_TARGET_ACCELERATION = 400;
public static final double FLYWHEEL_LEFT_P = 0.25;
public static final double FLYWHEEL_LEFT_I = 0;
public static final double FLYWHEEL_LEFT_D = 0;
Expand Down
62 changes: 31 additions & 31 deletions vendordeps/Phoenix6-26.1.1.json → vendordeps/Phoenix6-26.3.0.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"fileName": "Phoenix6-26.1.1.json",
"fileName": "Phoenix6-26.3.0.json",
"name": "CTRE-Phoenix (v6)",
"version": "26.1.1",
"version": "26.3.0",
"frcYear": "2026",
"uuid": "e995de00-2c64-4df5-8831-c1441420ff19",
"mavenUrls": [
Expand All @@ -19,14 +19,14 @@
{
"groupId": "com.ctre.phoenix6",
"artifactId": "wpiapi-java",
"version": "26.1.1"
"version": "26.3.0"
}
],
"jniDependencies": [
{
"groupId": "com.ctre.phoenix6",
"artifactId": "api-cpp",
"version": "26.1.1",
"version": "26.3.0",
"isJar": false,
"skipInvalidPlatforms": true,
"validPlatforms": [
Expand All @@ -40,7 +40,7 @@
{
"groupId": "com.ctre.phoenix6",
"artifactId": "tools",
"version": "26.1.1",
"version": "26.3.0",
"isJar": false,
"skipInvalidPlatforms": true,
"validPlatforms": [
Expand All @@ -54,7 +54,7 @@
{
"groupId": "com.ctre.phoenix6.sim",
"artifactId": "api-cpp-sim",
"version": "26.1.1",
"version": "26.3.0",
"isJar": false,
"skipInvalidPlatforms": true,
"validPlatforms": [
Expand All @@ -68,7 +68,7 @@
{
"groupId": "com.ctre.phoenix6.sim",
"artifactId": "tools-sim",
"version": "26.1.1",
"version": "26.3.0",
"isJar": false,
"skipInvalidPlatforms": true,
"validPlatforms": [
Expand All @@ -82,7 +82,7 @@
{
"groupId": "com.ctre.phoenix6.sim",
"artifactId": "simTalonSRX",
"version": "26.1.1",
"version": "26.3.0",
"isJar": false,
"skipInvalidPlatforms": true,
"validPlatforms": [
Expand All @@ -96,7 +96,7 @@
{
"groupId": "com.ctre.phoenix6.sim",
"artifactId": "simVictorSPX",
"version": "26.1.1",
"version": "26.3.0",
"isJar": false,
"skipInvalidPlatforms": true,
"validPlatforms": [
Expand All @@ -110,7 +110,7 @@
{
"groupId": "com.ctre.phoenix6.sim",
"artifactId": "simPigeonIMU",
"version": "26.1.1",
"version": "26.3.0",
"isJar": false,
"skipInvalidPlatforms": true,
"validPlatforms": [
Expand All @@ -124,7 +124,7 @@
{
"groupId": "com.ctre.phoenix6.sim",
"artifactId": "simProTalonFX",
"version": "26.1.1",
"version": "26.3.0",
"isJar": false,
"skipInvalidPlatforms": true,
"validPlatforms": [
Expand All @@ -138,7 +138,7 @@
{
"groupId": "com.ctre.phoenix6.sim",
"artifactId": "simProTalonFXS",
"version": "26.1.1",
"version": "26.3.0",
"isJar": false,
"skipInvalidPlatforms": true,
"validPlatforms": [
Expand All @@ -152,7 +152,7 @@
{
"groupId": "com.ctre.phoenix6.sim",
"artifactId": "simProCANcoder",
"version": "26.1.1",
"version": "26.3.0",
"isJar": false,
"skipInvalidPlatforms": true,
"validPlatforms": [
Expand All @@ -166,7 +166,7 @@
{
"groupId": "com.ctre.phoenix6.sim",
"artifactId": "simProPigeon2",
"version": "26.1.1",
"version": "26.3.0",
"isJar": false,
"skipInvalidPlatforms": true,
"validPlatforms": [
Expand All @@ -180,7 +180,7 @@
{
"groupId": "com.ctre.phoenix6.sim",
"artifactId": "simProCANrange",
"version": "26.1.1",
"version": "26.3.0",
"isJar": false,
"skipInvalidPlatforms": true,
"validPlatforms": [
Expand All @@ -194,7 +194,7 @@
{
"groupId": "com.ctre.phoenix6.sim",
"artifactId": "simProCANdi",
"version": "26.1.1",
"version": "26.3.0",
"isJar": false,
"skipInvalidPlatforms": true,
"validPlatforms": [
Expand All @@ -208,7 +208,7 @@
{
"groupId": "com.ctre.phoenix6.sim",
"artifactId": "simProCANdle",
"version": "26.1.1",
"version": "26.3.0",
"isJar": false,
"skipInvalidPlatforms": true,
"validPlatforms": [
Expand All @@ -224,7 +224,7 @@
{
"groupId": "com.ctre.phoenix6",
"artifactId": "wpiapi-cpp",
"version": "26.1.1",
"version": "26.3.0",
"libName": "CTRE_Phoenix6_WPI",
"headerClassifier": "headers",
"sharedLibrary": true,
Expand All @@ -240,7 +240,7 @@
{
"groupId": "com.ctre.phoenix6",
"artifactId": "tools",
"version": "26.1.1",
"version": "26.3.0",
"libName": "CTRE_PhoenixTools",
"headerClassifier": "headers",
"sharedLibrary": true,
Expand All @@ -256,7 +256,7 @@
{
"groupId": "com.ctre.phoenix6.sim",
"artifactId": "wpiapi-cpp-sim",
"version": "26.1.1",
"version": "26.3.0",
"libName": "CTRE_Phoenix6_WPISim",
"headerClassifier": "headers",
"sharedLibrary": true,
Expand All @@ -272,7 +272,7 @@
{
"groupId": "com.ctre.phoenix6.sim",
"artifactId": "tools-sim",
"version": "26.1.1",
"version": "26.3.0",
"libName": "CTRE_PhoenixTools_Sim",
"headerClassifier": "headers",
"sharedLibrary": true,
Expand All @@ -288,7 +288,7 @@
{
"groupId": "com.ctre.phoenix6.sim",
"artifactId": "simTalonSRX",
"version": "26.1.1",
"version": "26.3.0",
"libName": "CTRE_SimTalonSRX",
"headerClassifier": "headers",
"sharedLibrary": true,
Expand All @@ -304,7 +304,7 @@
{
"groupId": "com.ctre.phoenix6.sim",
"artifactId": "simVictorSPX",
"version": "26.1.1",
"version": "26.3.0",
"libName": "CTRE_SimVictorSPX",
"headerClassifier": "headers",
"sharedLibrary": true,
Expand All @@ -320,7 +320,7 @@
{
"groupId": "com.ctre.phoenix6.sim",
"artifactId": "simPigeonIMU",
"version": "26.1.1",
"version": "26.3.0",
"libName": "CTRE_SimPigeonIMU",
"headerClassifier": "headers",
"sharedLibrary": true,
Expand All @@ -336,7 +336,7 @@
{
"groupId": "com.ctre.phoenix6.sim",
"artifactId": "simProTalonFX",
"version": "26.1.1",
"version": "26.3.0",
"libName": "CTRE_SimProTalonFX",
"headerClassifier": "headers",
"sharedLibrary": true,
Expand All @@ -352,7 +352,7 @@
{
"groupId": "com.ctre.phoenix6.sim",
"artifactId": "simProTalonFXS",
"version": "26.1.1",
"version": "26.3.0",
"libName": "CTRE_SimProTalonFXS",
"headerClassifier": "headers",
"sharedLibrary": true,
Expand All @@ -368,7 +368,7 @@
{
"groupId": "com.ctre.phoenix6.sim",
"artifactId": "simProCANcoder",
"version": "26.1.1",
"version": "26.3.0",
"libName": "CTRE_SimProCANcoder",
"headerClassifier": "headers",
"sharedLibrary": true,
Expand All @@ -384,7 +384,7 @@
{
"groupId": "com.ctre.phoenix6.sim",
"artifactId": "simProPigeon2",
"version": "26.1.1",
"version": "26.3.0",
"libName": "CTRE_SimProPigeon2",
"headerClassifier": "headers",
"sharedLibrary": true,
Expand All @@ -400,7 +400,7 @@
{
"groupId": "com.ctre.phoenix6.sim",
"artifactId": "simProCANrange",
"version": "26.1.1",
"version": "26.3.0",
"libName": "CTRE_SimProCANrange",
"headerClassifier": "headers",
"sharedLibrary": true,
Expand All @@ -416,7 +416,7 @@
{
"groupId": "com.ctre.phoenix6.sim",
"artifactId": "simProCANdi",
"version": "26.1.1",
"version": "26.3.0",
"libName": "CTRE_SimProCANdi",
"headerClassifier": "headers",
"sharedLibrary": true,
Expand All @@ -432,7 +432,7 @@
{
"groupId": "com.ctre.phoenix6.sim",
"artifactId": "simProCANdle",
"version": "26.1.1",
"version": "26.3.0",
"libName": "CTRE_SimProCANdle",
"headerClassifier": "headers",
"sharedLibrary": true,
Expand Down
Loading
Loading