Skip to content

Commit

Permalink
Added elevator IO methods
Browse files Browse the repository at this point in the history
  • Loading branch information
dabeycorn committed Feb 10, 2025
1 parent 7f157a1 commit 49561e8
Showing 1 changed file with 26 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import org.littletonrobotics.junction.AutoLog;

public interface ElevatorIO {

@AutoLog
public class ElevatorIOInputs {
public boolean LMotorEnabled = false;
Expand All @@ -26,4 +25,30 @@ public class ElevatorIOInputs {
public double RMotorTorqueCurrentAmps = 0.0;
public double RMotorTempCelsius = 0.0;
}

/** Update logged inputs */
public void updateInputs(ElevatorIOInputs inputs);

/** Run voltage to left elevator motor */
public void runLeftMotorVolts(double voltage);

/** Run voltage to right elevator motor */
public void runRightMotorVolts(double voltage);

/** Stops elevator */
public default void stop() {
runLeftMotorVolts(0.0);
runRightMotorVolts(0.0);
}

/** Run target pose in meters */
public void runTargetPose(double poseMeters);

/**
* Set Elevator target pose with feedforward
*
* @param poseMeters desired elevator pose in meters
* @param ff feedforward
*/
public void runTargetPose(double poseMeters, double ff);
}

0 comments on commit 49561e8

Please sign in to comment.