Class Pigeon2SimState


public class Pigeon2SimState
extends Object
Class to control the state of a simulated Pigeon2.
  • Constructor Details

  • Method Details

    • setSupplyVoltage

      public StatusCode setSupplyVoltage​(double 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.

      volts - The supply voltage in Volts
      Status code
    • setRawYaw

      public StatusCode setRawYaw​(double deg)
      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.

      deg - The yaw in degrees
      Status code
    • setPitch

      public StatusCode setPitch​(double deg)
      Sets the simulated pitch of the Pigeon2.
      deg - The pitch in degrees
      Status code
    • setRoll

      public StatusCode setRoll​(double deg)
      Sets the simulated roll of the Pigeon2.
      deg - The roll in degrees
      Status code