-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGyroIO.java
More file actions
28 lines (23 loc) · 909 Bytes
/
GyroIO.java
File metadata and controls
28 lines (23 loc) · 909 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
// Copyright (c) 2021-2026 Littleton Robotics
// http://github.com/Mechanical-Advantage
//
// Use of this source code is governed by a BSD
// license that can be found in the LICENSE file
// at the root directory of this project.
package frc.robot.subsystems.drive;
import edu.wpi.first.math.geometry.Rotation2d;
import org.littletonrobotics.junction.AutoLog;
public interface GyroIO {
@AutoLog
public static class GyroIOInputs {
public boolean connected = false;
public Rotation2d yawPosition = Rotation2d.kZero;
public double yawVelocityRadPerSec = 0.0;
public double[] odometryYawTimestamps = new double[] {};
public Rotation2d[] odometryYawPositions = new Rotation2d[] {};
public double pitchRadians = 0.0;
public double rollRadians = 0.0;
public double zAccelerationMetersPerSecondPerSecond = 0.0;
}
public default void updateInputs(GyroIOInputs inputs) {}
}