2024-01-19 21:24:11 -07:00
|
|
|
// Copyright (c) FIRST and other WPILib contributors.
|
|
|
|
|
// Open Source Software; you can modify and/or share it under the terms of
|
|
|
|
|
// the WPILib BSD license file in the root directory of this project.
|
|
|
|
|
|
|
|
|
|
package frc4388.robot.subsystems;
|
|
|
|
|
|
|
|
|
|
import com.revrobotics.CANSparkMax;
|
|
|
|
|
import com.revrobotics.SparkLimitSwitch;
|
|
|
|
|
|
|
|
|
|
import edu.wpi.first.wpilibj.CAN;
|
|
|
|
|
import edu.wpi.first.wpilibj.motorcontrol.Spark;
|
|
|
|
|
import edu.wpi.first.wpilibj2.command.SubsystemBase;
|
2024-01-20 10:10:17 -07:00
|
|
|
import frc4388.robot.Constants.IntakeConstants;
|
2024-01-19 21:24:11 -07:00
|
|
|
|
|
|
|
|
public class Intake extends SubsystemBase {
|
|
|
|
|
/** Creates a new Intake. */
|
2024-01-22 17:43:40 -07:00
|
|
|
private Spark intakeMotor;
|
|
|
|
|
private Spark pivot;
|
|
|
|
|
public Intake(Spark intakeMotor, Spark pivot) {
|
2024-01-19 21:24:11 -07:00
|
|
|
this.intakeMotor = intakeMotor;
|
2024-01-22 17:43:40 -07:00
|
|
|
this.pivot = pivot;
|
2024-01-19 21:24:11 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void spinIntakeMotor() {
|
2024-01-20 10:10:17 -07:00
|
|
|
intakeMotor.set(IntakeConstants.INTAKE_SPEED);
|
2024-01-19 21:24:11 -07:00
|
|
|
}
|
|
|
|
|
|
2024-01-22 17:43:40 -07:00
|
|
|
public void rotateArmIn() { //handoff
|
|
|
|
|
//TODO
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void rotateArmOut() { //intake
|
|
|
|
|
//TODO
|
|
|
|
|
spinIntakeMotor();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void rotateArm() {
|
|
|
|
|
//TODO
|
|
|
|
|
}
|
|
|
|
|
|
2024-01-19 21:24:11 -07:00
|
|
|
@Override
|
|
|
|
|
public void periodic() {
|
|
|
|
|
// This method will be called once per scheduler run
|
|
|
|
|
}
|
|
|
|
|
}
|