22#pragma GCC diagnostic push
23#pragma GCC diagnostic ignored "-Wconversion"
26#pragma warning(disable : 4522 4458 4522)
29#include "frc/geometry/Rotation2d.h"
30#include "wpi/sendable/Sendable.h"
31#include "wpi/sendable/SendableHelper.h"
32#include "wpi/raw_ostream.h"
33#include <hal/SimDevice.h>
37#pragma GCC diagnostic pop
61class [[deprecated("This device's Phoenix 5 API is deprecated for removal in the 2025 season."
62 "Users should update to Phoenix 6 firmware and migrate to the Phoenix 6 API."
63 "A migration guide is available at https:
66 public wpi::SendableHelper<WPI_Pigeon2>
76 WPI_Pigeon2(
int deviceNumber, std::string
const &canbus =
"");
134 DeviceType m_simType;
136 hal::SimDevice m_simPigeon;
137 hal::SimDouble m_simYaw;
138 hal::SimDouble m_simRawYaw;
140 static void OnValueChanged(
const char* name,
void* param, HAL_SimValueHandle handle,
141 HAL_Bool readonly,
const struct HAL_Value* value);
142 static void OnPeriodic(
void* param);
Pigeon 2 Class.
Definition: Pigeon2.h:228
Pigeon 2 Class.
Definition: WPI_Pigeon2.h:67
double GetAngle() const
Returns the heading of the robot in degrees.
void Reset()
Resets the Pigeon 2 to a heading of zero.
frc::Rotation2d GetRotation2d() const
Returns the heading of the robot as a frc::Rotation2d.
WPI_Pigeon2 & operator=(WPI_Pigeon2 const &)=delete
double GetRate() const
Returns the rate of rotation of the Pigeon 2.
void InitSendable(wpi::SendableBuilder &builder) override
WPI_Pigeon2(WPI_Pigeon2 const &)=delete
WPI_Pigeon2(int deviceNumber, std::string const &canbus="")
Construtor for WPI_Pigeon2.
namespace ctre
Definition: paramEnum.h:5