Package com.ctre.phoenixpro.hardware
Class Pigeon2
java.lang.Object
com.ctre.phoenixpro.jni.CtreJniWrapper
com.ctre.phoenixpro.hardware.ParentDevice
com.ctre.phoenixpro.hardware.core.CorePigeon2
com.ctre.phoenixpro.hardware.Pigeon2
- All Implemented Interfaces:
Sendable,Gyro,AutoCloseable
public class Pigeon2 extends CorePigeon2 implements Sendable, Gyro
-
Nested Class Summary
Nested classes/interfaces inherited from class com.ctre.phoenixpro.hardware.ParentDevice
ParentDevice.MapGenerator<T> -
Field Summary
Fields inherited from class com.ctre.phoenixpro.hardware.ParentDevice
deviceIdentifier, kDefaultControlRatePeriodsSec -
Constructor Summary
-
Method Summary
Modifier and Type Method Description voidcalibrate()This function does nothing; it exists to satisfy the WPILib Gyro interface.voidclose()doublegetAngle()doublegetRate()Rotation2dgetRotation2d()voidinitSendable(SendableBuilder builder)voidreset()Methods inherited from class com.ctre.phoenixpro.hardware.core.CorePigeon2
clearStickyFaults, clearStickyFaults, getAccelerationX, getAccelerationY, getAccelerationZ, getAccumGyroX, getAccumGyroY, getAccumGyroZ, getAngularVelocityX, getAngularVelocityY, getAngularVelocityZ, getConfigurator, getFault_BootDuringEnable, getFault_BootIntoMotion, getFault_BootupAccelerometer, getFault_BootupGyroscope, getFault_BootupMagnetometer, getFault_DataAcquiredLate, getFault_Hardware, getFault_LoopTimeSlow, getFault_SaturatedAccelometer, getFault_SaturatedGyrosscope, getFault_SaturatedMagneter, getFault_Undervoltage, getFaultField, getGravityVectorX, getGravityVectorY, getGravityVectorZ, getMagneticFieldX, getMagneticFieldY, getMagneticFieldZ, getNoMotionCount, getNoMotionEnabled, getPitch, getQuatW, getQuatX, getQuatY, getQuatZ, getRawMagneticFieldX, getRawMagneticFieldY, getRawMagneticFieldZ, getRoll, getSimState, getStickyFault_BootDuringEnable, getStickyFault_BootIntoMotion, getStickyFault_BootupAccelerometer, getStickyFault_BootupGyroscope, getStickyFault_BootupMagnetometer, getStickyFault_DataAcquiredLate, getStickyFault_Hardware, getStickyFault_LoopTimeSlow, getStickyFault_SaturatedAccelometer, getStickyFault_SaturatedGyrosscope, getStickyFault_SaturatedMagneter, getStickyFault_Undervoltage, getStickyFaultField, getSupplyVoltage, getTemperature, getTemperatureCompensationDisabled, getUpTime, getVersion, getVersionBugfix, getVersionBuild, getVersionMajor, getVersionMinor, getYaw, hasResetOccurred, reportIfTooOld, setControl, setYaw, setYawMethods inherited from class com.ctre.phoenixpro.hardware.ParentDevice
getAppliedControl, getCANBus, getDeviceID, lookupStatusSignalValue, lookupStatusSignalValue, setControlPrivate
-
Constructor Details
-
Pigeon2
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
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
- Specified by:
closein interfaceAutoCloseable
-
calibrate
This function does nothing; it exists to satisfy the WPILib Gyro interface.Pigeon 2 does not require manual calibration.
-
reset
-
getAngle
-
getRate
-
getRotation2d
- Specified by:
getRotation2din interfaceGyro
-
initSendable
- Specified by:
initSendablein interfaceSendable
-