Skip to content

Commit

Permalink
Created Climber
Browse files Browse the repository at this point in the history
A few things that are still not final

Co-Authored-By: Brian Mai <[email protected]>
  • Loading branch information
MarkoKupresanin and bmai1 committed Jan 24, 2024
1 parent 7437efe commit ec05d35
Showing 1 changed file with 22 additions and 4 deletions.
26 changes: 22 additions & 4 deletions Robot2024/src/main/java/com/team2813/subsystems/Climber.java
Original file line number Diff line number Diff line change
@@ -1,15 +1,33 @@
package com.team2813.subsystems;

import edu.wpi.first.wpilibj.Timer;
import edu.wpi.first.wpilibj2.command.SubsystemBase;
import static com.team2813.Constants.CLIMBER;

import com.ctre.phoenix.motorcontrol.TalonFXInvertType;
import com.team2813.lib2813.control.motors.TalonFXWrapper;
import com.team2813.lib2813.control.ControlMode;

import static com.team2813.Constants.*;
import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard;
import edu.wpi.first.wpilibj2.command.SubsystemBase;

@SuppressWarnings("unused")
public class Climber extends SubsystemBase {
public Climber() {
private final TalonFXWrapper climberMotor = new TalonFXWrapper(CLIMBER, TalonFXInvertType.Clockwise);

public Climber() {}

public void extend() {
climberMotor.set(ControlMode.DUTY_CYCLE, 0.7); //TODO: Find out proper demand value for extending
}

public void retract() {
climberMotor.set(ControlMode.DUTY_CYCLE, -0.3); //TODO: Find out proper demand value for retracting
}

// @Override
public void outputTelemetry() {
SmartDashboard.putNumber("Climber Encoder", climberMotor.position());
// SmartDashboard.putNumber("Climber Velocity", climberMotor.getVelocity());
// TODO: Find out where to get motor velocity for TalonFX motors
}
}

0 comments on commit ec05d35

Please sign in to comment.