Skip to content

Commit

Permalink
more intake controls
Browse files Browse the repository at this point in the history
  • Loading branch information
DerekChen1 committed Jan 31, 2024
1 parent d697617 commit baf9435
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 2 additions & 0 deletions src/main/java/frc/robot/RobotContainer.java
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,8 @@ private void configureButtonBindings() {
anthony.leftStick().onTrue(new HaltDriveCommandsCommand(drivebaseSubsystem));

anthony.b().onTrue(new IntakeCommand(intakeSubsystem, IntakeSubsystem.Modes.INTAKE));
anthony.a().onTrue(new IntakeCommand(intakeSubsystem, IntakeSubsystem.Modes.IDLE));
anthony.x().onTrue(new IntakeCommand(intakeSubsystem, IntakeSubsystem.Modes.OUTTAKE));

DoubleSupplier rotation =
exponential(
Expand Down
8 changes: 5 additions & 3 deletions src/main/java/frc/robot/subsystems/IntakeSubsystem.java
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,15 @@ public IntakeSubsystem() {
noteSensor = new DigitalInput(Constants.Intake.INTAKE_SENSOR_PORT);

if (Config.SHOW_SHUFFLEBOARD_DEBUG_DATA) {
tab.addDouble("intake power", () -> intakeMotor.getMotorVoltage().getValueAsDouble());
tab.addBoolean("Note Sensor Output", this::getNoteSensorBool);
tab.addDouble("intake voltage", () -> intakeMotor.getMotorVoltage().getValueAsDouble());
tab.addDouble(
"Serializer motor voltage", () -> serializerMotor.getMotorVoltage().getValueAsDouble());
tab.addBoolean("Note Sensor Output", this::getNoteSensorOutput);
tab.addString("Current Mode", () -> intakeMode.toString());
}
}

public boolean getNoteSensorBool() {
public boolean getNoteSensorOutput() {
return noteSensor.get();
}

Expand Down

0 comments on commit baf9435

Please sign in to comment.