-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
A few things that are still not final Co-Authored-By: Brian Mai <[email protected]>
- Loading branch information
1 parent
7437efe
commit ec05d35
Showing
1 changed file
with
22 additions
and
4 deletions.
There are no files selected for viewing
26 changes: 22 additions & 4 deletions
26
Robot2024/src/main/java/com/team2813/subsystems/Climber.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} | ||
} | ||
|