Skip to content

Intake functions & commands #5

@cyndiac

Description

@cyndiac

All work is in RobotContainer.java, subsystems/Intake.java and commands/IntakeCone.java, IntakeCube.java, OuttakeGamePiece.java

Intake.java

  • motor initialization (CAN ID 6)
  • motor current limit
  • motor in brake mode
  • functions within Intake.java:
    • set____Power()
    • stopIntake()
    • setGamePieceType(int newGamePiece)

Commands

  • commands/IntakeCone.java -- init - set game piece to cone, set intake power
  • commands/IntakeCone.java -- end - set to holding power
  • commands/IntakeCube.java -- init - set game piece to cube, set power
  • commands/IntakeCube.java -- end - set to holding power
  • commands/OuttakePiece.java -- init - set power
  • commands/OuttakePiece.java -- end - set to holding power (in case of incomplete outtake)

Map commands to joystick in RobotContainer.java

  • declare all commands before RobotContainer init (~line 30)
  • configureBindings():
    • IntakeCone while A is held down
    • IntakeCube while B is held down
    • OuttakePiece while codriver X is held down
    • OuttakePiece while driver leftBumper is held down
    • StopIntake when Y is pressed (onTrue) -- should almost never be necessary, but nice to have in case

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions