frc2399 / 2022-Season

This is our NEW repository for the 2022 Season.
Other
0 stars 5 forks source link

Make a version of the Intake command that works with the trigger on the XBox #103

Open hschilling opened 2 years ago

hschilling commented 2 years ago

Could do something like in RobotContainer.java

    m_intake.setDefaultCommand(
                new IntakeCmdWithSupplier(m_intake,() -> -XBOX.getRawAxis(XboxConstants.INTAKE))
                        );

Would need to change make a new version of this

https://github.com/frc2399/2022-Season/blob/main/src/main/java/frc/robot/commands/intake/IntakeCmd.java

where we pass in a

Supplier<Double> speedFunction

rather than the current

double speed.

So maybe call this new version IntakeCmdWithSupplier ??? It would look like this

IntakeCmdWithSupplier(Intake intakeSubsystem, Supplier<Double> speedFunction)

See how

https://github.com/frc2399/2022-Season/blob/main/src/main/java/frc/robot/commands/drivetrain/ArcadeDriveCmd.java 

does that.