Skip to content
This repository has been archived by the owner on Dec 19, 2024. It is now read-only.

Commit

Permalink
fixed suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
NikolaJenkins committed Nov 20, 2024
1 parent e05c406 commit af788c7
Showing 1 changed file with 21 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,11 @@ import org.littletonrobotics.junction.LogTable
import org.littletonrobotics.junction.inputs.LoggableInputs
import com.frcteam3636.frc2024.CANSparkFlex
import com.frcteam3636.frc2024.REVMotorControllerId
import com.frcteam3636.frc2024.Robot
import com.frcteam3636.frc2024.utils.LimelightHelpers
import com.revrobotics.CANSparkLowLevel
import edu.wpi.first.math.system.plant.DCMotor
import edu.wpi.first.wpilibj.simulation.FlywheelSim

public enum class BalloonState {
Blue,
Expand Down Expand Up @@ -67,4 +70,22 @@ class IndexerIOReal : IndexerIO{
assert(speed in -1.0..1.0)
indexerMotor.set(speed)
}
}

class IndexerIOSim: IndexerIO {
val flywheelSim = FlywheelSim(
DCMotor.getNeoVortex(1),
1.0,
1.0
)

override fun updateInputs(inputs: IndexerIO.Inputs) {
flywheelSim.update(Robot.period)
inputs.indexerVelocity = flywheelSim.angularVelocityRadPerSec
}

override fun setSpinSpeed(speed: Double) {
TODO("Not yet implemented")
}

}

0 comments on commit af788c7

Please sign in to comment.