Package yams.motorcontrollers
Interface SimSupplier
- All Known Implementing Classes:
ArmSimSupplier,DCMotorSimSupplier
public interface SimSupplier
Provides sim functions for
-
Method Summary
Modifier and TypeMethodDescriptionvoidFeed inputvoidFeed the update sim watchGet the current draw of from the sim.Get the mechanism position.Get the mechanism stator voltage.Gets the supply voltage for the motor controller.Get the mechanism velocity.Get the rotor position.Get the rotor velocity.booleanGet the updated sim watchdog.booleanCheck if the input was fed.voidsetMechanismPosition(Angle position) Set the Mechanism positionvoidsetMechanismStatorDutyCycle(double dutyCycle) Set the dutycyle of the mechanism stator.voidsetMechanismStatorVoltage(Voltage volts) Set mechanism voltage, mostly used for SysId testing.voidsetMechanismVelocity(AngularVelocity velocity) Set the Mechanism velocity.voidStarve the input.voidStarve the update sim watch.voidUpdate the sim state.
-
Method Details
-
updateSimState
void updateSimState()Update the sim state. -
getUpdatedSim
boolean getUpdatedSim()Get the updated sim watchdog.- Returns:
- Updated sim.
-
feedUpdateSim
void feedUpdateSim()Feed the update sim watch -
starveUpdateSim
void starveUpdateSim()Starve the update sim watch. -
isInputFed
boolean isInputFed()Check if the input was fed.- Returns:
- Input fed.
-
feedInput
void feedInput()Feed input -
starveInput
void starveInput()Starve the input. -
setMechanismStatorDutyCycle
void setMechanismStatorDutyCycle(double dutyCycle) Set the dutycyle of the mechanism stator.- Parameters:
dutyCycle- Dutycycle value.
-
getMechanismSupplyVoltage
Voltage getMechanismSupplyVoltage()Gets the supply voltage for the motor controller.- Returns:
- Supply voltage to the motor controller
-
getMechanismStatorVoltage
Voltage getMechanismStatorVoltage()Get the mechanism stator voltage.- Returns:
- Stator voltage of the mechanism.
-
setMechanismStatorVoltage
Set mechanism voltage, mostly used for SysId testing.- Parameters:
volts- Voltage to set.
-
getMechanismPosition
Angle getMechanismPosition()Get the mechanism position.- Returns:
- mechanism angle.
-
setMechanismPosition
Set the Mechanism position- Parameters:
position- Position of the mechanism.
-
getRotorPosition
Angle getRotorPosition()Get the rotor position.- Returns:
- rotor position.
-
getMechanismVelocity
AngularVelocity getMechanismVelocity()Get the mechanism velocity.- Returns:
- Mechanism velocity.
-
setMechanismVelocity
Set the Mechanism velocity.- Parameters:
velocity- Mechanism velocity.
-
getRotorVelocity
AngularVelocity getRotorVelocity()Get the rotor velocity.- Returns:
- rotor velocity.
-
getCurrentDraw
Current getCurrentDraw()Get the current draw of from the sim.- Returns:
- Current draw.
-