|
CTRE_Phoenix
5.19.4
|
Public Member Functions | |
| TalonSRXSimCollection (BaseTalon motorController) | |
| ErrorCode | setBusVoltage (double vbat) |
| ErrorCode | setSupplyCurrent (double currA) |
| ErrorCode | setStatorCurrent (double currA) |
| ErrorCode | setLimitFwd (boolean isClosed) |
| ErrorCode | setLimitRev (boolean isClosed) |
| ErrorCode | setAnalogPosition (int newPos) |
| ErrorCode | addAnalogPosition (int dPos) |
| ErrorCode | setAnalogVelocity (int newVel) |
| ErrorCode | setPulseWidthConnected (boolean isConnected) |
| ErrorCode | setPulseWidthRiseToRiseUs (double periodUs) |
| ErrorCode | setPulseWidthPosition (int newPos) |
| ErrorCode | addPulseWidthPosition (int dPos) |
| ErrorCode | setPulseWidthVelocity (int newVel) |
| ErrorCode | setQuadratureRawPosition (int newPos) |
| ErrorCode | addQuadraturePosition (int dPos) |
| ErrorCode | setQuadratureVelocity (int newVel) |
Collection of simulation commands available to a TalonSRX motor controller.
Use the getSimCollection() routine inside your motor controller to create a sim collection.
|
inline |
Constructor for TalonSRXSimCollection
| motorController | Motor Controller to connect Collection to |
|
inline |
Adds to the simulated analog position of the TalonSRX.
| dPos | the change in position in native units |
|
inline |
Adds to the simulated pulse width position of the TalonSRX.
| dPos | the change in position in native units |
|
inline |
Adds to the simulated quadrature position of the TalonSRX.
| dPos | the change in position in native units |
|
inline |
Sets the simulated analog position of the TalonSRX.
| newPos | the new position in native units |
|
inline |
Sets the simulated analog velocity of the TalonSRX.
| newVel | the new velocity in native units per 100ms |
|
inline |
Sets the simulated bus voltage of the TalonSRX.
| vbat | the bus voltage |
|
inline |
Sets the simulated forward limit switch of the TalonSRX.
| isClosed | true if the limit switch is closed |
|
inline |
Sets the simulated reverse limit switch of the TalonSRX.
| isClosed | true if the limit switch is closed |
|
inline |
Sets if the simulated pulse width sensor is connected to the TalonSRX.
| isConnected | true if the pulse width sensor is connected |
|
inline |
Sets the simulated pulse width position of the TalonSRX.
| newPos | the new position in native units |
|
inline |
Sets the simulated pulse width rise to rise time of the TalonSRX.
| periodUs | the pulse width rise to rise time in microseconds |
|
inline |
Sets the simulated pulse width velocity of the TalonSRX.
| newVel | the new velocity in native units per 100ms |
|
inline |
Sets the simulated raw quadrature position of the TalonSRX.
The TalonSRX integrates this to calculate the true reported quadrature position.
When using the WPI Sim GUI, you will notice a readonly 'position' and settable 'rawPositionInput'. The readonly signal is the emulated position which will match self-test in Tuner and the hardware API. Changes to 'rawPositionInput' will be integrated into the emulated position. This way a simulator can modify the position without overriding your hardware API calls for home-ing your sensor.
Inputs to this function over time should be continuous, as user calls of setSelectedSensorPosition() and setQuadraturePosition() will be accounted for in the calculation.
| newPos | the new raw position in native units |
|
inline |
Sets the simulated quadrature velocity of the TalonSRX.
| newVel | the new velocity in native units per 100ms |
|
inline |
Sets the simulated stator current of the TalonSRX.
| currA | the stator current in amps |
|
inline |
Sets the simulated supply current of the TalonSRX.
| currA | the supply current in amps |