2026-01-29 18:27:18 -08:00
|
|
|
package frc4388.robot.subsystems.climber;
|
|
|
|
|
|
|
|
|
|
import org.littletonrobotics.junction.Logger;
|
|
|
|
|
|
|
|
|
|
import edu.wpi.first.wpilibj2.command.SubsystemBase;
|
|
|
|
|
|
|
|
|
|
public class Climber extends SubsystemBase {
|
|
|
|
|
ClimberIO io;
|
|
|
|
|
ClimberStateAutoLogged state = new ClimberStateAutoLogged();
|
|
|
|
|
|
2026-02-11 15:18:12 -07:00
|
|
|
// Supplier<Pose2d> m_swervePoseSupplier;
|
2026-01-29 18:27:18 -08:00
|
|
|
|
|
|
|
|
public Climber(
|
2026-02-11 15:18:12 -07:00
|
|
|
ClimberIO io
|
|
|
|
|
// Supplier<Pose2d> swervePoseSupplier
|
2026-01-29 18:27:18 -08:00
|
|
|
) {
|
|
|
|
|
this.io = io;
|
2026-02-11 15:18:12 -07:00
|
|
|
// this.m_swervePoseSupplier = swervePoseSupplier;
|
2026-01-29 18:27:18 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// public enum ClimberMode {
|
|
|
|
|
// Up,
|
|
|
|
|
// Down,
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
// public void setMode(IntakeMode mode) {
|
|
|
|
|
// switch (mode) {
|
|
|
|
|
// case Up:
|
|
|
|
|
// io.setArmAngle(state, IntakeConstants.ARM_LIMIT_UPPER);
|
|
|
|
|
// io.setRollerVelocity(state, IntakeConstants.ROLLER_STOP);
|
|
|
|
|
// break;
|
|
|
|
|
// case Down:
|
|
|
|
|
// io.setArmAngle(state, IntakeConstants.ARM_LIMIT_LOWER);
|
|
|
|
|
// io.setRollerVelocity(state, IntakeConstants.ROLLER_MAX_VELOCITY);
|
|
|
|
|
// break;
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public void periodic() {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// FaultReporter.register(this); // TODO Implement fault reporter
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Logger.processInputs("Climber", state);
|
|
|
|
|
|
|
|
|
|
io.updateInputs(state);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|