Class to control the state of a simulated hardware::Pigeon2.
More...
#include <ctre/phoenix6/sim/Pigeon2SimState.hpp>
Class to control the state of a simulated hardware::Pigeon2.
◆ Pigeon2SimState() [1/3]
Creates an object to control the state of the given hardware::Pigeon2.
Note the recommended method of accessing simulation features is to use hardware::Pigeon2::GetSimState.
- Parameters
-
device | Device to which this simulation state is attached |
◆ Pigeon2SimState() [2/3]
ctre::phoenix6::sim::Pigeon2SimState::Pigeon2SimState |
( |
Pigeon2SimState const & |
| ) |
|
|
delete |
◆ Pigeon2SimState() [3/3]
ctre::phoenix6::sim::Pigeon2SimState::Pigeon2SimState |
( |
Pigeon2SimState && |
| ) |
|
|
default |
◆ AddYaw()
ctre::phoenix::StatusCode ctre::phoenix6::sim::Pigeon2SimState::AddYaw |
( |
units::angle::degree_t |
dDeg | ) |
|
Adds to the simulated yaw of the Pigeon2.
- Parameters
-
dDeg | The change in yaw in degrees |
- Returns
- Status code
◆ operator=() [1/2]
◆ operator=() [2/2]
◆ SetPitch()
ctre::phoenix::StatusCode ctre::phoenix6::sim::Pigeon2SimState::SetPitch |
( |
units::angle::degree_t |
deg | ) |
|
Sets the simulated pitch of the Pigeon2.
- Parameters
-
- Returns
- Status code
◆ SetRawYaw()
ctre::phoenix::StatusCode ctre::phoenix6::sim::Pigeon2SimState::SetRawYaw |
( |
units::angle::degree_t |
deg | ) |
|
Sets the simulated raw yaw of the Pigeon2.
Inputs to this function over time should be continuous, as user calls of hardware::Pigeon2::SetYaw will be accounted for in the callee.
The Pigeon2 integrates this to calculate the true reported yaw.
When using the WPI Sim GUI, you will notice a readonly yaw
and settable rawYawInput
. The readonly signal is the emulated yaw which will match self-test in Tuner and the hardware API. Changes to rawYawInput
will be integrated into the emulated yaw. This way a simulator can modify the yaw without overriding hardware API calls for home-ing the sensor.
- Parameters
-
- Returns
- Status code
◆ SetRoll()
ctre::phoenix::StatusCode ctre::phoenix6::sim::Pigeon2SimState::SetRoll |
( |
units::angle::degree_t |
deg | ) |
|
Sets the simulated roll of the Pigeon2.
- Parameters
-
- Returns
- Status code
◆ SetSupplyVoltage()
ctre::phoenix::StatusCode ctre::phoenix6::sim::Pigeon2SimState::SetSupplyVoltage |
( |
units::voltage::volt_t |
volts | ) |
|
Sets the simulated supply voltage of the Pigeon2.
The minimum allowed supply voltage is 4 V - values below this will be promoted to 4 V.
- Parameters
-
volts | The supply voltage in Volts |
- Returns
- Status code
The documentation for this class was generated from the following file: