CTRE Phoenix 6 C++ 25.0.0-beta-4
Loading...
Searching...
No Matches
ctre::phoenix6::sim::Pigeon2SimState Class Reference

Class to control the state of a simulated hardware::Pigeon2. More...

#include <ctre/phoenix6/sim/Pigeon2SimState.hpp>

Public Member Functions

 Pigeon2SimState (hardware::core::CorePigeon2 const &device)
 Creates an object to control the state of the given hardware::Pigeon2.
 
 Pigeon2SimState (Pigeon2SimState const &)=delete
 
 Pigeon2SimState (Pigeon2SimState &&)=default
 
Pigeon2SimStateoperator= (Pigeon2SimState const &)=delete
 
Pigeon2SimStateoperator= (Pigeon2SimState &&)=default
 
ctre::phoenix::StatusCode SetSupplyVoltage (units::voltage::volt_t volts)
 Sets the simulated supply voltage of the Pigeon2.
 
ctre::phoenix::StatusCode SetRawYaw (units::angle::degree_t deg)
 Sets the simulated raw yaw of the Pigeon2.
 
ctre::phoenix::StatusCode AddYaw (units::angle::degree_t dDeg)
 Adds to the simulated yaw of the Pigeon2.
 
ctre::phoenix::StatusCode SetPitch (units::angle::degree_t deg)
 Sets the simulated pitch of the Pigeon2.
 
ctre::phoenix::StatusCode SetRoll (units::angle::degree_t deg)
 Sets the simulated roll of the Pigeon2.
 
ctre::phoenix::StatusCode SetAngularVelocityX (units::angular_velocity::degrees_per_second_t dps)
 Sets the simulated angular velocity X component of the Pigeon2.
 
ctre::phoenix::StatusCode SetAngularVelocityY (units::angular_velocity::degrees_per_second_t dps)
 Sets the simulated angular velocity Y component of the Pigeon2.
 
ctre::phoenix::StatusCode SetAngularVelocityZ (units::angular_velocity::degrees_per_second_t dps)
 Sets the simulated angular velocity Z component of the Pigeon2.
 

Detailed Description

Class to control the state of a simulated hardware::Pigeon2.

Constructor & Destructor Documentation

◆ Pigeon2SimState() [1/3]

ctre::phoenix6::sim::Pigeon2SimState::Pigeon2SimState ( hardware::core::CorePigeon2 const & device)

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
deviceDevice 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

Member Function Documentation

◆ AddYaw()

ctre::phoenix::StatusCode ctre::phoenix6::sim::Pigeon2SimState::AddYaw ( units::angle::degree_t dDeg)

Adds to the simulated yaw of the Pigeon2.

Parameters
dDegThe change in yaw in degrees
Returns
Status code

◆ operator=() [1/2]

Pigeon2SimState & ctre::phoenix6::sim::Pigeon2SimState::operator= ( Pigeon2SimState && )
default

◆ operator=() [2/2]

Pigeon2SimState & ctre::phoenix6::sim::Pigeon2SimState::operator= ( Pigeon2SimState const & )
delete

◆ SetAngularVelocityX()

ctre::phoenix::StatusCode ctre::phoenix6::sim::Pigeon2SimState::SetAngularVelocityX ( units::angular_velocity::degrees_per_second_t dps)

Sets the simulated angular velocity X component of the Pigeon2.

Parameters
dpsThe X component of the angular velocity in degrees per second
Returns
Status code

◆ SetAngularVelocityY()

ctre::phoenix::StatusCode ctre::phoenix6::sim::Pigeon2SimState::SetAngularVelocityY ( units::angular_velocity::degrees_per_second_t dps)

Sets the simulated angular velocity Y component of the Pigeon2.

Parameters
dpsThe Y component of the angular velocity in degrees per second
Returns
Status code

◆ SetAngularVelocityZ()

ctre::phoenix::StatusCode ctre::phoenix6::sim::Pigeon2SimState::SetAngularVelocityZ ( units::angular_velocity::degrees_per_second_t dps)

Sets the simulated angular velocity Z component of the Pigeon2.

Parameters
dpsThe Z component of the angular velocity in degrees per second
Returns
Status code

◆ SetPitch()

ctre::phoenix::StatusCode ctre::phoenix6::sim::Pigeon2SimState::SetPitch ( units::angle::degree_t deg)

Sets the simulated pitch of the Pigeon2.

Parameters
degThe pitch in degrees
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
degThe yaw in degrees
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
degThe roll in degrees
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
voltsThe supply voltage in Volts
Returns
Status code

The documentation for this class was generated from the following file: