Skip to content

Commit

Permalink
Fix Formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
m10653 committed Jan 27, 2024
1 parent bd40da2 commit 150a52b
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public class ShooterSubsystem extends SubsystemBase {
public ShooterSubsystem() {
// Initializes motor(s)
initializeMotors();
if(RobotBase.isSimulation()){
if (RobotBase.isSimulation()) {
initSim();
}
}
Expand All @@ -49,14 +49,14 @@ public void setSpeed(double speed) {

FlywheelSim flywheelSim;
RevEncoderSimWrapper encSim;
public void initSim(){
public void initSim() {
flywheelSim = new FlywheelSim(DCMotor.getNEO(1), 1, 1);
encSim = RevEncoderSimWrapper.create(motor1);
}

@Override
public void simulationPeriodic() {
double motorVolts = motor1.get()*12;
double motorVolts = motor1.get() * 12;
flywheelSim.setInputVoltage(motorVolts);
flywheelSim.update(0.2);
encSim.setVelocity(flywheelSim.getAngularVelocityRPM());
Expand Down

0 comments on commit 150a52b

Please sign in to comment.