Package com.team2813.lib2813.subsystems
Class ParameterizedIntakeSubsystem
java.lang.Object
edu.wpi.first.wpilibj2.command.SubsystemBase
com.team2813.lib2813.subsystems.ParameterizedIntakeSubsystem
- All Implemented Interfaces:
Sendable,Subsystem,AutoCloseable
A subsystem for an intake.
- Since:
- 2.0.0
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedParameterizedIntakeSubsystem(Motor intakeMotor, ParameterizedIntakeSubsystem.Params params) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()protected final voidMakes intake wheels spin in the intake direction.final Commandprotected final voidMakes intake wheels spin in the outtake direction.final Commandprotected final voidsetMotorDemand(double demand) Runs the motor with the provided demand value.protected final CommandsetMotorDemandCommand(double demand) Returns a command that runs the motor with the provided demand value.final voidStops the motor.final CommandMethods inherited from class edu.wpi.first.wpilibj2.command.SubsystemBase
addChild, getName, getSubsystem, initSendable, setName, setSubsystemMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface edu.wpi.first.wpilibj2.command.Subsystem
defer, getCurrentCommand, getDefaultCommand, idle, periodic, register, removeDefaultCommand, run, runEnd, runOnce, setDefaultCommand, simulationPeriodic, startEnd, startRun
-
Constructor Details
-
ParameterizedIntakeSubsystem
protected ParameterizedIntakeSubsystem(Motor intakeMotor, ParameterizedIntakeSubsystem.Params params)
-
-
Method Details
-
intakeItemCommand
-
outtakeItemCommand
-
stopMotorCommand
-
intakeGamePiece
protected final void intakeGamePiece()Makes intake wheels spin in the intake direction. -
outtakeGamePiece
protected final void outtakeGamePiece()Makes intake wheels spin in the outtake direction. -
setMotorDemand
protected final void setMotorDemand(double demand) Runs the motor with the provided demand value.- Parameters:
demand- Demand of the motor. Meaning depends on theControlMode.
-
setMotorDemandCommand
Returns a command that runs the motor with the provided demand value.- Parameters:
demand- Demand of the motor. Meaning depends on theControlMode.
-
stopMotor
public final void stopMotor()Stops the motor. -
close
public void close()- Specified by:
closein interfaceAutoCloseable
-