A little bit more hood stuff, adding a command to trigger the rezero functionality

This commit is contained in:
2026-02-22 13:40:14 -05:00
parent 678ff1a198
commit acf78b8ccd

View File

@@ -68,6 +68,7 @@ public class Hood extends SubsystemBase {
@Override
public void periodic() {
Logger.recordOutput("Hood/OutputCurrent", motor.getOutputCurrent());
Logger.recordOutput("Hood/CurrentTarget", currentTargetDegrees);
Logger.recordOutput("Hood/CurrentAngle", encoder.getPosition());
Logger.recordOutput("Hood/AtSetpoint", controller.isAtSetpoint());
@@ -81,6 +82,14 @@ public class Hood extends SubsystemBase {
});
}
public Command automatedRezero() {
return manualSpeed(() -> -1)
.until(timerTrigger)
.andThen(
stop().until(timerTrigger.negate())
);
}
public Command manualSpeed(DoubleSupplier speed) {
currentTargetDegrees = 0;