Skip to content

Commit

Permalink
Add backpack, not finished
Browse files Browse the repository at this point in the history
  • Loading branch information
suryatho committed Feb 17, 2024
1 parent f0a1596 commit 98bf596
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 0 deletions.
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);
}
}
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);
}
}

0 comments on commit 98bf596

Please sign in to comment.