FRC Paradigm Shift #1259
Documentation for the 2021 Robot
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
Gyro.h
Go to the documentation of this file.
1
#pragma once
2
3
#include <units/angle.h>
4
#include <frc/geometry/Rotation2d.h>
5
#include "ctre/phoenix/sensors/PigeonIMU.h"
6
7
#include "
Constants.h
"
8
9
using namespace
DriveConstants
;
10
using namespace
units
;
11
using namespace
ctre::phoenix::sensors
;
12
13
14
class
Gyro
15
{
16
public
:
17
Gyro
();
18
21
double
GetHeading();
22
frc::Rotation2d
GetHeadingAsRot2d
() {
return
frc::Rotation2d(degree_t(GetHeading())); }
23
25
void
ZeroHeading();
26
29
double
GetTurnRate();
30
31
PigeonIMU
m_gyro
;
32
};
Gyro::GetHeadingAsRot2d
frc::Rotation2d GetHeadingAsRot2d()
Definition:
Gyro.h:22
Gyro::m_gyro
PigeonIMU m_gyro
Definition:
Gyro.h:31
sensors
Gyro
Definition:
Gyro.h:14
Constants.h
DriveConstants
Definition:
Constants.h:26
units
src
main
include
common
Gyro.h
Generated on Fri Aug 20 2021 01:20:35 for FRC Paradigm Shift #1259 by
1.8.11