Class Pigeon2

All Implemented Interfaces:
Sendable, Gyro, AutoCloseable

@Deprecated(forRemoval=true)
public class Pigeon2
extends CorePigeon2
implements Sendable, Gyro
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.
  • Constructor Details

    • Pigeon2

      @Deprecated(forRemoval=true) public Pigeon2​(int deviceId)
      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.
      Constructs a new Pigeon 2 sensor object.

      Constructs the device using the default CAN bus for the system:

      • "rio" on roboRIO
      • "can0" on Linux
      • "*" on Windows
      Parameters:
      deviceId - ID of the device, as configured in Phoenix Tuner.
    • Pigeon2

      @Deprecated(forRemoval=true) public Pigeon2​(int deviceId, String canbus)
      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.
      Constructs a new Pigeon 2 sensor object.
      Parameters:
      deviceId - ID of the device, as configured in Phoenix Tuner.
      canbus - Name of the CAN bus this device is on. Possible CAN bus strings are:
      • "rio" for the native roboRIO CAN bus
      • CANivore name or serial number
      • SocketCAN interface (non-FRC Linux only)
      • "*" for any CANivore seen by the program
      • empty string (default) to select the default for the system:
        • "rio" on roboRIO
        • "can0" on Linux
        • "*" on Windows
  • Method Details

    • close

      public void close()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Specified by:
      close in interface AutoCloseable
    • calibrate

      public void calibrate()
      Deprecated, for removal: This API element is subject to removal in a future version.
      This function does nothing; it exists to satisfy the WPILib Gyro interface.

      Pigeon 2 does not require manual calibration.

      Specified by:
      calibrate in interface Gyro
    • reset

      public void reset()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Specified by:
      reset in interface Gyro
    • getAngle

      public double getAngle()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Specified by:
      getAngle in interface Gyro
    • getRate

      public double getRate()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Specified by:
      getRate in interface Gyro
    • getRotation2d

      Deprecated, for removal: This API element is subject to removal in a future version.
      Specified by:
      getRotation2d in interface Gyro
    • initSendable

      public void initSendable​(SendableBuilder builder)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Specified by:
      initSendable in interface Sendable