Package frc.robot.subsystems.Intake
Class Intake
java.lang.Object
edu.wpi.first.wpilibj2.command.SubsystemBase
frc.robot.subsystems.Intake.Intake
- All Implemented Interfaces:
edu.wpi.first.util.sendable.Sendable
,edu.wpi.first.wpilibj2.command.Subsystem
- Direct Known Subclasses:
IntakeRealIO
public abstract class Intake
extends edu.wpi.first.wpilibj2.command.SubsystemBase
-
Nested Class Summary
-
Field Summary
Modifier and TypeFieldDescriptionedu.wpi.first.wpilibj.DoubleSolenoid.Value
The current setting of the solenoid controlled by commands.edu.wpi.first.wpilibj.DoubleSolenoid.Value
The default setting of the solenoid determined by the switch on the driver dashboard. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
intake()
Starts the intake wheels.void
outtake()
Starts the intake wheels in reverse.void
periodic()
protected abstract void
setSolenoid
(edu.wpi.first.wpilibj.DoubleSolenoid.Value state) void
setSolenoidDefault
(edu.wpi.first.wpilibj.DoubleSolenoid.Value state) Sets the solenoid's default state.void
setSolenoidValue
(edu.wpi.first.wpilibj.DoubleSolenoid.Value state) Sets the solenoid's current state.protected abstract void
setWheels
(double volts) void
void
stop()
Stops all intake activity.void
stopFeed()
Stops the wheels.Methods inherited from class edu.wpi.first.wpilibj2.command.SubsystemBase
addChild, getName, getSubsystem, initSendable, setName, setSubsystem
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface edu.wpi.first.wpilibj2.command.Subsystem
defer, getCurrentCommand, getDefaultCommand, register, removeDefaultCommand, run, runEnd, runOnce, setDefaultCommand, startEnd
-
Field Details
-
solenoid_default
public edu.wpi.first.wpilibj.DoubleSolenoid.Value solenoid_defaultThe default setting of the solenoid determined by the switch on the driver dashboard. -
solenoid_current
public edu.wpi.first.wpilibj.DoubleSolenoid.Value solenoid_currentThe current setting of the solenoid controlled by commands. This overrides solenoid_default -
commands
-
-
Constructor Details
-
Intake
public Intake()
-
-
Method Details
-
intake
public void intake()Starts the intake wheels. -
outtake
public void outtake()Starts the intake wheels in reverse. -
stopFeed
public void stopFeed()Stops the wheels. -
stop
public void stop()Stops all intake activity. This resets the solenoid to the default position. -
setSolenoidDefault
public void setSolenoidDefault(edu.wpi.first.wpilibj.DoubleSolenoid.Value state) Sets the solenoid's default state. This should primarily be done by the dashboard switch.- Parameters:
state
- The desired state.
-
setSolenoidValue
public void setSolenoidValue(edu.wpi.first.wpilibj.DoubleSolenoid.Value state) Sets the solenoid's current state. Passing null will allow the solenoid to return to the default state.- Parameters:
state
- The desired state.
-
setSolenoid
protected abstract void setSolenoid(edu.wpi.first.wpilibj.DoubleSolenoid.Value state) -
setWheels
protected abstract void setWheels(double volts) -
periodic
public void periodic() -
simulationPeriodic
public void simulationPeriodic()
-