-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
42 additions
and
0 deletions.
There are no files selected for viewing
28 changes: 28 additions & 0 deletions
28
src/main/java/org/littletonrobotics/frc2024/subsystems/rollers/backpack/Backpack.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 |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package org.littletonrobotics.frc2024.subsystems.rollers.backpack; | ||
|
||
import lombok.Getter; | ||
import lombok.RequiredArgsConstructor; | ||
import lombok.Setter; | ||
import org.littletonrobotics.frc2024.util.LoggedTunableNumber; | ||
import org.littletonrobotics.frc2024.util.drivers.rollers.GenericRollerSystem; | ||
|
||
import java.util.function.DoubleSupplier; | ||
|
||
@Setter | ||
@Getter | ||
public class Backpack extends GenericRollerSystem<Backpack.Goal> { | ||
@RequiredArgsConstructor | ||
@Getter | ||
public enum Goal implements VoltageGoal { | ||
IDLING(() -> 0), | ||
AMP_SCORING(new LoggedTunableNumber("Backpack/AmpScoringVoltage")); | ||
|
||
private final DoubleSupplier voltageSupplier; | ||
} | ||
|
||
private Goal goal = Goal.IDLING; | ||
|
||
public Backpack(BackpackIO io) { | ||
super("Backpack", io); | ||
} | ||
} |
14 changes: 14 additions & 0 deletions
14
src/main/java/org/littletonrobotics/frc2024/subsystems/rollers/backpack/BackpackIOSim.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 |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package org.littletonrobotics.frc2024.subsystems.rollers.backpack; | ||
|
||
import edu.wpi.first.math.system.plant.DCMotor; | ||
import org.littletonrobotics.frc2024.util.drivers.rollers.GenericRollerSystemIOSim; | ||
|
||
public class BackpackIOSim extends GenericRollerSystemIOSim implements BackpackIO { | ||
private static final DCMotor motorModel = DCMotor.getNeoVortex(1); | ||
private static final double reduction = (1.0 / 1.0); | ||
private static final double moi = 0.001; | ||
|
||
public BackpackIOSim() { | ||
super(motorModel, reduction, moi); | ||
} | ||
} |