Skip to content

Commit

Permalink
change sim gear ratio
Browse files Browse the repository at this point in the history
  • Loading branch information
r4stered committed Sep 3, 2024
1 parent ee3109c commit 3cae4b3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/main/cpp/subsystems/IntakeSubsystem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ void IntakeSubsystem::SimulationPeriodic() {
intakeMotorSim.SetSupplyVoltage(frc::RobotController::GetBatteryVoltage());
intakeSim.SetInputVoltage(intakeMotorSim.GetMotorVoltage());
intakeSim.Update(consts::LOOP_PERIOD);
intakeMotorSim.SetRotorVelocity(intakeSim.GetAngularVelocity());
intakeMotorSim.SetRotorVelocity(intakeSim.GetAngularVelocity() * consts::intake::physical::INTAKE_RATIO);
}

bool IntakeSubsystem::ConfigureIntakeMotor(bool invert,
Expand Down
4 changes: 2 additions & 2 deletions src/main/cpp/subsystems/ShooterSubsystem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,8 @@ void ShooterSubsystem::SimulationPeriodic() {
topFlywheelSim.Update(consts::LOOP_PERIOD);
bottomFlywheelSim.Update(consts::LOOP_PERIOD);

topMotorSim.SetRotorVelocity(topFlywheelSim.GetAngularVelocity());
bottomMotorSim.SetRotorVelocity(bottomFlywheelSim.GetAngularVelocity());
topMotorSim.SetRotorVelocity(topFlywheelSim.GetAngularVelocity() * consts::shooter::physical::SHOOTER_RATIO);
bottomMotorSim.SetRotorVelocity(bottomFlywheelSim.GetAngularVelocity() * consts::shooter::physical::SHOOTER_RATIO);
}

void ShooterSubsystem::UpdateNTEntries() {
Expand Down

0 comments on commit 3cae4b3

Please sign in to comment.