CTRE Phoenix Pro C++ 23.0.12
ctre::phoenixpro::sim::Pigeon2SimState Class Reference

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

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

Public Member Functions

 Pigeon2SimState (hardware::core::CorePigeon2 const &device)
 Creates an object to control the state of the given hardware::Pigeon2. More...
 
 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. More...
 
ctre::phoenix::StatusCode SetRawYaw (units::angle::degree_t deg)
 Sets the simulated raw yaw of the Pigeon2. More...
 
ctre::phoenix::StatusCode SetPitch (units::angle::degree_t deg)
 Sets the simulated pitch of the Pigeon2. More...
 
ctre::phoenix::StatusCode SetRoll (units::angle::degree_t deg)
 Sets the simulated roll of the Pigeon2. More...
 

Detailed Description

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

Constructor & Destructor Documentation

◆ Pigeon2SimState() [1/3]

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

Creates an object to control the state of the given hardware::Pigeon2.

Parameters
deviceDevice to which this simulation state is attached

◆ Pigeon2SimState() [2/3]

ctre::phoenixpro::sim::Pigeon2SimState::Pigeon2SimState ( Pigeon2SimState const &  )
delete

◆ Pigeon2SimState() [3/3]

ctre::phoenixpro::sim::Pigeon2SimState::Pigeon2SimState ( Pigeon2SimState &&  )
default

Member Function Documentation

◆ operator=() [1/2]

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

◆ operator=() [2/2]

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

◆ SetPitch()

ctre::phoenix::StatusCode ctre::phoenixpro::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::phoenixpro::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::phoenixpro::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::phoenixpro::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: