Class Pigeon2SimState

java.lang.Object
com.ctre.phoenixpro.sim.Pigeon2SimState

@Deprecated(forRemoval=true)
public class Pigeon2SimState
extends Object
Deprecated, for removal: This API element is subject to removal in a future version.
Classes in the phoenixpro package will be removed in 2024. Users should instead use classes from the phoenix6 package.
Class to control the state of a simulated Pigeon2.
  • Constructor Summary

    Constructors 
    Constructor Description
    Pigeon2SimState​(CorePigeon2 device)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Classes in the phoenixpro package will be removed in 2024.
  • Method Summary

    Modifier and Type Method Description
    StatusCode addYaw​(double dDeg)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Adds to the simulated yaw of the Pigeon2.
    StatusCode setPitch​(double deg)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Sets the simulated pitch of the Pigeon2.
    StatusCode setRawYaw​(double deg)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Sets the simulated raw yaw of the Pigeon2.
    StatusCode setRoll​(double deg)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Sets the simulated roll of the Pigeon2.
    StatusCode setSupplyVoltage​(double volts)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Sets the simulated supply voltage of the Pigeon2.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Pigeon2SimState

      Deprecated, for removal: This API element is subject to removal in a future version.
      Classes in the phoenixpro package will be removed in 2024. Users should instead use classes from the phoenix6 package.
      Creates an object to control the state of the given Pigeon2.
      Parameters:
      device - Device to which this simulation state is attached
  • Method Details

    • setSupplyVoltage

      public StatusCode setSupplyVoltage​(double volts)
      Deprecated, for removal: This API element is subject to removal in a future version.
      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
    • setRawYaw

      public StatusCode setRawYaw​(double deg)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Sets the simulated raw yaw of the Pigeon2.

      Inputs to this function over time should be continuous, as user calls of CorePigeon2.setYaw(double, double) 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:
      deg - The yaw in degrees
      Returns:
      Status code
    • addYaw

      public StatusCode addYaw​(double dDeg)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Adds to the simulated yaw of the Pigeon2.
      Parameters:
      dDeg - The change in yaw in degrees
      Returns:
      Status code
    • setPitch

      public StatusCode setPitch​(double deg)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Sets the simulated pitch of the Pigeon2.
      Parameters:
      deg - The pitch in degrees
      Returns:
      Status code
    • setRoll

      public StatusCode setRoll​(double deg)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Sets the simulated roll of the Pigeon2.
      Parameters:
      deg - The roll in degrees
      Returns:
      Status code