Package frc.spectrumLib.swerve
Class MapleSimSwerveDrivetrain.TalonFXMotorControllerWithRemoteCanCoderSim
java.lang.Object
frc.spectrumLib.swerve.MapleSimSwerveDrivetrain.TalonFXMotorControllerSim
frc.spectrumLib.swerve.MapleSimSwerveDrivetrain.TalonFXMotorControllerWithRemoteCanCoderSim
- All Implemented Interfaces:
SimulatedMotorController
- Enclosing class:
- MapleSimSwerveDrivetrain
public static class MapleSimSwerveDrivetrain.TalonFXMotorControllerWithRemoteCanCoderSim
extends MapleSimSwerveDrivetrain.TalonFXMotorControllerSim
Steer adapter that also drives the remote CANcoder's sim state. Use it when the steer motor
takes feedback from a remote CANcoder rather than its own encoder.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.ironmaple.simulation.motorsims.SimulatedMotorController
SimulatedMotorController.GenericMotorController -
Field Summary
Fields inherited from class frc.spectrumLib.swerve.MapleSimSwerveDrivetrain.TalonFXMotorControllerSim
id -
Constructor Summary
ConstructorsConstructorDescriptionTalonFXMotorControllerWithRemoteCanCoderSim(TalonFX talonFX, CANcoder cancoder) -
Method Summary
Modifier and TypeMethodDescriptionupdateControlSignal(Angle mechanismAngle, AngularVelocity mechanismVelocity, Angle encoderAngle, AngularVelocity encoderVelocity) Writes the mechanism-side state to the CANcoder, since that is the side a remote encoder sits on, then lets the parent handle the rotor side and the return value.
-
Constructor Details
-
TalonFXMotorControllerWithRemoteCanCoderSim
-
-
Method Details
-
updateControlSignal
public Voltage updateControlSignal(Angle mechanismAngle, AngularVelocity mechanismVelocity, Angle encoderAngle, AngularVelocity encoderVelocity) Writes the mechanism-side state to the CANcoder, since that is the side a remote encoder sits on, then lets the parent handle the rotor side and the return value.- Specified by:
updateControlSignalin interfaceSimulatedMotorController- Overrides:
updateControlSignalin classMapleSimSwerveDrivetrain.TalonFXMotorControllerSim
-