Skip to content

Commit

Permalink
add backpack
Browse files Browse the repository at this point in the history
  • Loading branch information
suryatho committed Feb 17, 2024
1 parent 557f9f6 commit f0a1596
Show file tree
Hide file tree
Showing 19 changed files with 38 additions and 20 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package org.littletonrobotics.frc2024.subsystems.rollers.backpack;

import org.littletonrobotics.frc2024.util.drivers.rollers.GenericRollerSystemIO;

public interface BackpackIO extends GenericRollerSystemIO {}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package org.littletonrobotics.frc2024.subsystems.rollers.backpack;

import org.littletonrobotics.frc2024.util.drivers.rollers.GenericRollerSystemIOSparkFlex;

public class BackpackIOSparkFlex extends GenericRollerSystemIOSparkFlex implements BackpackIO {
private static final int id = 0;
private static final int currentLimitAmps = 40;
private static final boolean invert = false;
private static final boolean brake = true;
private static final double reduction = (1.0 / 1.0);

public BackpackIOSparkFlex() {
super(id, currentLimitAmps, invert, brake, reduction);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@
import lombok.Getter;
import lombok.RequiredArgsConstructor;
import lombok.Setter;
import org.littletonrobotics.frc2024.subsystems.rollers.GenericRollerSystem;
import org.littletonrobotics.frc2024.subsystems.rollers.GenericRollerSystem.VoltageGoal;
import org.littletonrobotics.frc2024.util.drivers.rollers.GenericRollerSystem;
import org.littletonrobotics.frc2024.util.LoggedTunableNumber;

@Setter
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@

package org.littletonrobotics.frc2024.subsystems.rollers.feeder;

import org.littletonrobotics.frc2024.subsystems.rollers.GenericRollerSystemIO;
import org.littletonrobotics.frc2024.util.drivers.rollers.GenericRollerSystemIO;

public interface FeederIO extends GenericRollerSystemIO {}
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

package org.littletonrobotics.frc2024.subsystems.rollers.feeder;

import org.littletonrobotics.frc2024.subsystems.rollers.GenericRollerSystemIOKrakenFOC;
import org.littletonrobotics.frc2024.util.drivers.rollers.GenericRollerSystemIOKrakenFOC;

public class FeederIOKrakenFOC extends GenericRollerSystemIOKrakenFOC implements FeederIO {
private static final int id = 3;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
package org.littletonrobotics.frc2024.subsystems.rollers.feeder;

import edu.wpi.first.math.system.plant.DCMotor;
import org.littletonrobotics.frc2024.subsystems.rollers.GenericRollerSystemIOSim;
import org.littletonrobotics.frc2024.util.drivers.rollers.GenericRollerSystemIOSim;

public class FeederIOSim extends GenericRollerSystemIOSim implements FeederIO {
private static final DCMotor motorModel = DCMotor.getKrakenX60Foc(1);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@
import lombok.Getter;
import lombok.RequiredArgsConstructor;
import lombok.Setter;
import org.littletonrobotics.frc2024.subsystems.rollers.GenericRollerSystem;
import org.littletonrobotics.frc2024.subsystems.rollers.GenericRollerSystem.VoltageGoal;
import org.littletonrobotics.frc2024.util.drivers.rollers.GenericRollerSystem;
import org.littletonrobotics.frc2024.util.LoggedTunableNumber;

@Setter
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@

package org.littletonrobotics.frc2024.subsystems.rollers.indexer;

import org.littletonrobotics.frc2024.subsystems.rollers.GenericRollerSystemIO;
import org.littletonrobotics.frc2024.util.drivers.rollers.GenericRollerSystemIO;

public interface IndexerIO extends GenericRollerSystemIO {}
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
package org.littletonrobotics.frc2024.subsystems.rollers.indexer;

import edu.wpi.first.math.system.plant.DCMotor;
import org.littletonrobotics.frc2024.subsystems.rollers.GenericRollerSystemIOSim;
import org.littletonrobotics.frc2024.util.drivers.rollers.GenericRollerSystemIOSim;

public class IndexerIOSim extends GenericRollerSystemIOSim implements IndexerIO {
private static final DCMotor motorModel = DCMotor.getKrakenX60Foc(1);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

package org.littletonrobotics.frc2024.subsystems.rollers.indexer;

import org.littletonrobotics.frc2024.subsystems.rollers.GenericRollerSystemIOSparkFlex;
import org.littletonrobotics.frc2024.util.drivers.rollers.GenericRollerSystemIOSparkFlex;

public class IndexerIOSparkFlex extends GenericRollerSystemIOSparkFlex implements IndexerIO {
private static final double reduction = (18.0 / 12.0);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@
import lombok.Getter;
import lombok.RequiredArgsConstructor;
import lombok.Setter;
import org.littletonrobotics.frc2024.subsystems.rollers.GenericRollerSystem;
import org.littletonrobotics.frc2024.subsystems.rollers.GenericRollerSystem.VoltageGoal;
import org.littletonrobotics.frc2024.util.drivers.rollers.GenericRollerSystem;
import org.littletonrobotics.frc2024.util.LoggedTunableNumber;

@Setter
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@

package org.littletonrobotics.frc2024.subsystems.rollers.intake;

import org.littletonrobotics.frc2024.subsystems.rollers.GenericRollerSystemIO;
import org.littletonrobotics.frc2024.util.drivers.rollers.GenericRollerSystemIO;

public interface IntakeIO extends GenericRollerSystemIO {}
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

package org.littletonrobotics.frc2024.subsystems.rollers.intake;

import org.littletonrobotics.frc2024.subsystems.rollers.GenericRollerSystemIOKrakenFOC;
import org.littletonrobotics.frc2024.util.drivers.rollers.GenericRollerSystemIOKrakenFOC;

public class IntakeIOKrakenFOC extends GenericRollerSystemIOKrakenFOC implements IntakeIO {
private static final int id = 2;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
package org.littletonrobotics.frc2024.subsystems.rollers.intake;

import edu.wpi.first.math.system.plant.DCMotor;
import org.littletonrobotics.frc2024.subsystems.rollers.GenericRollerSystemIOSim;
import org.littletonrobotics.frc2024.util.drivers.rollers.GenericRollerSystemIOSim;

public class IntakeIOSim extends GenericRollerSystemIOSim implements IntakeIO {
private static final DCMotor motorModel = DCMotor.getKrakenX60Foc(1);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@
// license that can be found in the LICENSE file at
// the root directory of this project.

package org.littletonrobotics.frc2024.subsystems.rollers;
package org.littletonrobotics.frc2024.util.drivers.rollers;

import java.util.function.DoubleSupplier;
import lombok.RequiredArgsConstructor;
import org.littletonrobotics.frc2024.subsystems.rollers.GenericRollerSystemIOInputsAutoLogged;
import org.littletonrobotics.junction.Logger;

@RequiredArgsConstructor
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// license that can be found in the LICENSE file at
// the root directory of this project.

package org.littletonrobotics.frc2024.subsystems.rollers;
package org.littletonrobotics.frc2024.util.drivers.rollers;

import org.littletonrobotics.junction.AutoLog;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// license that can be found in the LICENSE file at
// the root directory of this project.

package org.littletonrobotics.frc2024.subsystems.rollers;
package org.littletonrobotics.frc2024.util.drivers.rollers;

import com.ctre.phoenix6.BaseStatusSignal;
import com.ctre.phoenix6.StatusSignal;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// license that can be found in the LICENSE file at
// the root directory of this project.

package org.littletonrobotics.frc2024.subsystems.rollers;
package org.littletonrobotics.frc2024.util.drivers.rollers;

import edu.wpi.first.math.MathUtil;
import edu.wpi.first.math.system.plant.DCMotor;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// license that can be found in the LICENSE file at
// the root directory of this project.

package org.littletonrobotics.frc2024.subsystems.rollers;
package org.littletonrobotics.frc2024.util.drivers.rollers;

import com.revrobotics.CANSparkBase;
import com.revrobotics.CANSparkFlex;
Expand Down

0 comments on commit f0a1596

Please sign in to comment.