Compare commits

..

No commits in common. "d5a5504cd18fcad3b47b5c7d2ac4f76e0af57b87" and "90e033f921e5dcfbdaa4e0e500bdcfe293457f9c" have entirely different histories.

2 changed files with 15 additions and 28 deletions

0
gradlew vendored Executable file → Normal file
View File

View File

@ -11,7 +11,6 @@ import edu.wpi.first.wpilibj.util.Color;
import edu.wpi.first.wpilibj.util.Color8Bit; import edu.wpi.first.wpilibj.util.Color8Bit;
import edu.wpi.first.wpilibj2.command.Command; import edu.wpi.first.wpilibj2.command.Command;
import edu.wpi.first.wpilibj2.command.Commands; import edu.wpi.first.wpilibj2.command.Commands;
import edu.wpi.first.wpilibj2.command.InstantCommand;
import edu.wpi.first.wpilibj2.command.button.CommandXboxController; import edu.wpi.first.wpilibj2.command.button.CommandXboxController;
import frc.robot.LEDAnimationKit.AnimationManager; import frc.robot.LEDAnimationKit.AnimationManager;
import frc.robot.LEDAnimationKit.LEDStrip; import frc.robot.LEDAnimationKit.LEDStrip;
@ -39,12 +38,10 @@ public class RobotContainer {
private AnimationManager manager; private AnimationManager manager;
private FluidRainbow rainbow; //private FluidRainbow rainbow;
//private Breathing b1; private Breathing b1;
//private Breathing b2; private Breathing b2;
private boolean oneHandedMode;
public RobotContainer() { public RobotContainer() {
drivetrain = new Drivetrain(true); drivetrain = new Drivetrain(true);
@ -59,13 +56,13 @@ public class RobotContainer {
); );
strip.start(); strip.start();
rainbow = new FluidRainbow(strip, LEDConstants.kRainbowUpdateRate); //rainbow = new FluidRainbow(strip, LEDConstants.kRainbowUpdateRate);
rainbow.start(); //rainbow.start();
//l1 = new LogicalLEDStrip(strip, 0, 31); l1 = new LogicalLEDStrip(strip, 0, 31);
//l2 = new LogicalLEDStrip(strip, 31, 62); l2 = new LogicalLEDStrip(strip, 31, 62);
/*
b1 = new Breathing( b1 = new Breathing(
l1, l1,
LEDConstants.kBreathingUpdateRate, LEDConstants.kBreathingUpdateRate,
@ -82,16 +79,14 @@ public class RobotContainer {
LEDConstants.kBreathingMinPercentage, LEDConstants.kBreathingMinPercentage,
LEDConstants.kBreathingMaxPercentage LEDConstants.kBreathingMaxPercentage
); );
b2.start(); */ b2.start();
manager = new AnimationManager(new PhysicalLEDStrip[] {strip}); manager = new AnimationManager(new PhysicalLEDStrip[] {strip});
manager.registerAnimationForUpdate(rainbow); //manager.registerAnimationForUpdate(rainbow);
//manager.registerAnimationForUpdate(b1); manager.registerAnimationForUpdate(b1);
//manager.registerAnimationForUpdate(b2); manager.registerAnimationForUpdate(b2);
manager.start(LEDConstants.kAnimationManagerUpdateRate); manager.start(LEDConstants.kAnimationManagerUpdateRate);
oneHandedMode = false;
configureBindings(); configureBindings();
configureShuffleboard(); configureShuffleboard();
@ -106,19 +101,16 @@ public class RobotContainer {
) )
); );
driver.back().onTrue(new InstantCommand(() -> oneHandedMode = !oneHandedMode));
driver.start().onTrue(drivetrain.toggleSlowMode()); driver.start().onTrue(drivetrain.toggleSlowMode());
shooter.setDefaultCommand( shooter.setDefaultCommand(
shooter.setSpeed( shooter.setSpeed(
() -> oneHandedMode ? driver.getLeftTriggerAxis() : driver.getRightTriggerAxis() driver::getRightTriggerAxis
) )
); );
driver.a().and(() -> !oneHandedMode).onTrue(pusher.spin()); driver.a().onTrue(pusher.spin());
driver.a().and(() -> !oneHandedMode).onFalse(pusher.stop()); driver.a().onFalse(pusher.stop());
driver.leftBumper().and(() -> oneHandedMode).onTrue(pusher.spin());
driver.leftBumper().and(() -> oneHandedMode).onFalse(pusher.stop());
} }
private void configureShuffleboard() { private void configureShuffleboard() {
@ -129,11 +121,6 @@ public class RobotContainer {
.withSize(2, 1) .withSize(2, 1)
.withWidget(BuiltInWidgets.kBooleanBox); .withWidget(BuiltInWidgets.kBooleanBox);
tab.addBoolean("One Handed Mode?", () -> oneHandedMode)
.withPosition(2, 0)
.withSize(2, 1)
.withWidget(BuiltInWidgets.kBooleanBox);
Shuffleboard.selectTab("DRIVE"); Shuffleboard.selectTab("DRIVE");
} }