frc2019.robot.subsystems.Elevator¶
Subsystem for the elevator. The elevator consists of a baby carriage and a pulley system that brings it up. The baby carriage is what holds the arm.
Dependencies¶
- com.revrobotics.CANDigitalInput
- com.revrobotics.CANDigitalInput.LimitSwitchPolarity
- com.revrobotics.CANPIDController
- com.revrobotics.CANSparkMax
- com.revrobotics.CANSparkMax.IdleMode
- com.revrobotics.CANSparkMaxLowLevel.MotorType
- org.team3197.frc2019.robot.RobotMap
- org.team3197.frc2019.robot.RobotMap.DeadbandType
- org.team3197.frc2019.robot.commands.defaults.Elevate
- Implements the org.team3197.frc2019.robot.utilities.Drivable Interface.
- `org.team3197.frc2019.robot.utilities.FunctionCommand <>`_
- edu.wpi.first.wpilibj.SpeedControllerGroup
- LimitReset inherits properties of edu.wpi.first.wpilibj.buttons.Trigger
- Inherits properties of edu.wpi.first.wpilibj.command.Subsystem
- edu.wpi.first.wpilibj.smartdashboard.SmartDashboard
Commands¶
public Elevator()¶
Constructor for the subsystem Elevator.
Motors are brushless.
Motors are set to brake mode.
Limit Switches are normally open.
public void drive(double speed, boolean hold)¶
Drives the motor that pulls the elevator up and down.
public void resetEncoderPosition()¶
Resets the encoder position.
public double getEncoderPosition()¶
Gets the encoder position with the position of the encoder at reset subtracted.
public double getRawEncoderPosition()¶
Gets the encoder position.
public boolean get()¶
This function gets the bottomLimit.
TODO: Figure out why it needs it’s own class.
private class LimitReset¶
- Inherits the properties of edu.wpi.first.wpilibj.buttons.Trigger
public boolean get()¶
Gets the bottom limit.