mirror of
https://github.com/Team4388/RiseOfRidgebotics2020.git
synced 2026-06-09 08:48:01 -06:00
Even More Janky Code
Storage
This commit is contained in:
@@ -17,16 +17,20 @@ import edu.wpi.first.wpilibj.Spark;
|
||||
import edu.wpi.first.wpilibj2.command.SubsystemBase;
|
||||
import frc4388.robot.Constants.IntakeConstants;
|
||||
|
||||
|
||||
|
||||
public class Intake extends SubsystemBase {
|
||||
CANSparkMax m_intakeMotor = new CANSparkMax(IntakeConstants.INTAKE_SPARK_ID, MotorType.kBrushless);
|
||||
CANSparkMax m_extenderMotor = new CANSparkMax(IntakeConstants.EXTENDER_SPARK_ID, MotorType.kBrushless);
|
||||
CANDigitalInput m_extenderForwardLimit;
|
||||
CANDigitalInput m_extenderReverseLimit;
|
||||
|
||||
|
||||
/**
|
||||
* Creates a new Intake.
|
||||
*/
|
||||
public Intake() {
|
||||
CANDigitalInput m_extenderForwardLimit;
|
||||
CANDigitalInput m_extenderReverseLimit;
|
||||
|
||||
m_intakeMotor.restoreFactoryDefaults();
|
||||
m_extenderMotor.restoreFactoryDefaults();
|
||||
|
||||
@@ -50,7 +54,7 @@ public class Intake extends SubsystemBase {
|
||||
* Runs intake motor
|
||||
* @param input the percent output to run motor at
|
||||
*/
|
||||
public void runIntake(double input) {
|
||||
public void runIntake(final double input) {
|
||||
m_intakeMotor.set(input);
|
||||
}
|
||||
|
||||
@@ -58,7 +62,7 @@ public class Intake extends SubsystemBase {
|
||||
* Runs extender motor
|
||||
* @param input the percent output to run motor at
|
||||
*/
|
||||
public void runExtender(double input) {
|
||||
public void runExtender(final double input) {
|
||||
m_extenderMotor.set(input);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,12 +9,14 @@ package frc4388.robot.subsystems;
|
||||
|
||||
import com.ctre.phoenix.motorcontrol.can.TalonSRX;
|
||||
import com.ctre.phoenix.motorcontrol.can.WPI_TalonSRX;
|
||||
import com.revrobotics.CANDigitalInput;
|
||||
import com.revrobotics.CANEncoder;
|
||||
import com.revrobotics.CANPIDController;
|
||||
import com.revrobotics.CANSparkMax;
|
||||
import com.revrobotics.ControlType;
|
||||
import com.revrobotics.SparkMax;
|
||||
import com.revrobotics.CANSparkMaxLowLevel.MotorType;
|
||||
import com.revrobotics.CANDigitalInput.LimitSwitchPolarity;
|
||||
|
||||
import edu.wpi.first.wpilibj.DigitalInput;
|
||||
import edu.wpi.first.wpilibj.Encoder;
|
||||
@@ -95,7 +97,6 @@ public class Storage extends SubsystemBase {
|
||||
m_storageMotor.set(0);
|
||||
}
|
||||
}
|
||||
|
||||
public void storageIntake(Intake intake) {
|
||||
m_intake = intake;
|
||||
if (m_beamSensors[1].get() == false){
|
||||
@@ -110,11 +111,11 @@ public void storageIntake(Intake intake) {
|
||||
}
|
||||
}
|
||||
public void storageOuttake() {
|
||||
m_storageMotor.set(1);
|
||||
m_storageMotor.set(1);
|
||||
|
||||
/*
|
||||
*If shooting move storage motor until top sensor is tripped
|
||||
*If intaking move storage motor until bottom sensor is tripped
|
||||
*/
|
||||
}
|
||||
/*
|
||||
*If shooting move storage motor until top sensor is tripped
|
||||
*If intaking move storage motor until bottom sensor is tripped
|
||||
*
|
||||
*/
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user