Skip to content

Commit 09ffbb5

Browse files
committed
Actually the Flywheel is supposed to use FXS
1 parent 6da6524 commit 09ffbb5

3 files changed

Lines changed: 8 additions & 5 deletions

File tree

src/main/java/frc/robot/RobotContainer.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313

1414
package frc.robot;
1515

16+
import edu.wpi.first.math.util.Units;
1617
import edu.wpi.first.wpilibj.GenericHID;
1718
import edu.wpi.first.wpilibj.XboxController;
1819
import frc.robot.bobot_state.BobotState;
@@ -119,8 +120,8 @@ private void configureButtonBindings() {
119120
.onTrue(superStructure.setModeCommand(SuperStructureModes.MANUAL));
120121
// controller.start().and(superStructure.isTurretAligned()).onTrue(superStructure.shootCommand());
121122

122-
controller.povUp().onTrue(superStructure.setFlywheelVelocity(10));
123-
controller.povDown().onTrue(superStructure.setFlywheelVelocity(-10));
123+
controller.povUp().onTrue(superStructure.setFlywheelVelocity(Units.feetToMeters(1)));
124+
controller.povDown().onTrue(superStructure.setFlywheelVelocity(Units.feetToMeters(-1)));
124125
controller.povLeft().onTrue(superStructure.setFlywheelVoltage(-6));
125126
controller.povRight().onTrue(superStructure.setFlywheelVoltage(6));
126127
}

src/main/java/frc/robot/subsystems/rollers/single/SingleRollerIOTalonFXSim.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ public class SingleRollerIOTalonFXSim extends SingleRollerIOTalonFX {
1616
/** Motion Magic does _not_ work in Sim, so we use Position Voltage in the meantime */
1717
private final PositionVoltage positionVoltage;
1818

19+
/** Motion Magic does _not_ work in Sim, so we use Velocity Voltage in the meantime */
1920
private final VelocityVoltage velocityVoltage;
2021

2122
public SingleRollerIOTalonFXSim(

src/main/java/frc/robot/subsystems/superstructure/SuperStructure.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@
1515
import frc.robot.subsystems.rollers.single.SingleRollerIO;
1616
import frc.robot.subsystems.rollers.single.SingleRollerIOSim;
1717
import frc.robot.subsystems.rollers.single.SingleRollerIOTalonFX;
18-
import frc.robot.subsystems.rollers.single.SingleRollerIOTalonFXSim;
18+
import frc.robot.subsystems.rollers.single.SingleRollerIOTalonFXS;
19+
import frc.robot.subsystems.rollers.single.SingleRollerIOTalonFXSSim;
1920
import frc.robot.subsystems.superstructure.turret.Turret;
2021
import frc.robot.subsystems.superstructure.turret.TurretConstants;
2122
import java.util.function.DoubleSupplier;
@@ -49,7 +50,7 @@ public SuperStructure() {
4950
TurretConstants.gains,
5051
TurretConstants.mmConfig);
5152
flywheelIO =
52-
new SingleRollerIOTalonFX(
53+
new SingleRollerIOTalonFXS(
5354
FlywheelConstants.canId,
5455
FlywheelConstants.reduction,
5556
FlywheelConstants.currentLimitAmps,
@@ -70,7 +71,7 @@ public SuperStructure() {
7071
TurretConstants.mmConfig,
7172
new EmptyFeedforwardController());
7273
flywheelIO =
73-
new SingleRollerIOTalonFXSim(
74+
new SingleRollerIOTalonFXSSim(
7475
FlywheelConstants.canId,
7576
FlywheelConstants.reduction,
7677
FlywheelConstants.currentLimitAmps,

0 commit comments

Comments
 (0)