Skip to content

Commit 011d8da

Browse files
eddieeddie
authored andcommitted
Updated Code
1 parent a15e673 commit 011d8da

6 files changed

Lines changed: 19 additions & 9 deletions

File tree

gradlew

100755100644
File mode changed.

src/main/deploy/swerve/modules/backright.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"front": -11.875,
44
"left": -11.875
55
},
6-
"absoluteEncoderOffset": 123.89,
6+
"absoluteEncoderOffset": 305,
77
"drive": {
88
"type": "sparkflex_vortex",
99
"id": 4,

src/main/java/frc/robot/Robot.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -165,15 +165,15 @@ public void teleopPeriodic()
165165
public void testInit()
166166
{
167167
CommandScheduler.getInstance().cancelAll();
168-
DataLogManager.start();
169-
System.out.println("Logging started for Test Mode.");
168+
// DataLogManager.start();
169+
// System.out.println("Logging started for Test Mode.");
170170
}
171171

172172
@Override
173173
public void testExit() {
174174
// Stop logging when exiting Test Mode to save space/resources
175-
DataLogManager.stop();
176-
System.out.println("Logging stopped.");
175+
// DataLogManager.stop();
176+
// System.out.println("Logging stopped.");
177177
}
178178

179179
/**

src/main/java/frc/robot/RobotContainer.java

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public class RobotContainer
5858
{
5959

6060
// Replace with CommandPS4Controller or CommandJoystick if needed
61-
final CommandXboxController driverXbox = new CommandXboxController(0);
61+
final CommandXboxController driverXbox = new CommandXboxController(0);
6262
final CommandJoystick redbuttonbox= new CommandJoystick(1);
6363
final CommandJoystick otherbuttonbox= new CommandJoystick(2);
6464
// The robot's subsystems and commands are defined here...
@@ -270,11 +270,16 @@ private void configureBindings()
270270
//TODO: ask Eddie how to fix these.
271271
redbuttonbox.button(8).whileTrue(intakeSubsystem.RunIntake());
272272
// Why is this subsystem function not returning a runable? check the subsystem again.
273-
redbuttonbox.button(9).whileTrue(intakeStopCommand);
273+
redbuttonbox.button(9).whileTrue(raiseIntakeCommand);
274274
redbuttonbox.button(10).whileTrue(shooterMotorSubsystem.ForwordSlowSpin(0.5));
275275
otherbuttonbox.button(1).whileTrue(shooterMotorSubsystem.ForwordSlowSpin(-0.5));
276-
otherbuttonbox.button(3).whileTrue(shooterMotorSubsystem.ForwordSlowSpin(.75));
277276
otherbuttonbox.button(2).whileTrue(shooterMotorSubsystem.SpinStop());
277+
otherbuttonbox.button(3).whileTrue(shooterMotorSubsystem.ForwordSlowSpin(.75));
278+
otherbuttonbox.button(4).whileTrue(indexer.StopSpin());
279+
280+
driverXbox.b().whileTrue(indexer.StopSpin());
281+
driverXbox.rightTrigger().whileTrue(intakeSubsystem.goToPositionCommand(0));
282+
driverXbox.leftTrigger().whileTrue(intakeSubsystem.goToPositionCommand(25.5));
278283

279284

280285
// buttonBox2.(button5 ).onTrue(algaeArm.ArmStop().andThen(roller.CoralStop()).andThen(climber.ClimbStop()));

src/main/java/frc/robot/commands/IntakeGoToPositionNegPoint8Command.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ public IntakeGoToPositionNegPoint8Command(IntakeSubsystem subsystem) {
1313

1414
@Override
1515
public void initialize() {
16-
intake_subsystem.goToPositionCommand(-0.8);
16+
intake_subsystem.goToPositionCommand(25.5);
1717
}
1818

1919
@Override

src/main/java/frc/robot/subsystems/IndexerSubsystem.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,11 @@ public Command BackwardSpin() {
6767
);
6868
}
6969

70+
public Command StopSpin() {
71+
return this.runOnce(
72+
() -> runDutyCycleMotor(-IndexerConstants.SINGLE_MOTOR_SPEED)// Run reverse while held
73+
);
74+
}
7075
// public Command BackwardSlowSpin() {
7176
// return this.runEnd(
7277
// () -> runDutyCycleMotor(-0.2),

0 commit comments

Comments
 (0)