Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove generic parameter from DTIMU #17

Merged
merged 1 commit into from
Apr 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
import edu.wpi.first.util.sendable.Sendable;
import edu.wpi.first.util.sendable.SendableBuilder;

public interface DTIMU<IMUTYPE> extends Sendable, AutoCloseable {
IMUTYPE getImuImpl();
public interface DTIMU extends Sendable, AutoCloseable {
Object getImuImpl();

double getYaw();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,10 @@

import org.victorrobotics.frc.dtlib.sensor.imu.DTIMU;

import edu.wpi.first.util.sendable.SendableBuilder;

import com.ctre.phoenix.sensors.Pigeon2;
import com.ctre.phoenix.sensors.Pigeon2_Faults;

import com.kauailabs.navx.frc.AHRS;

public class DTPigeon2 implements DTIMU<Pigeon2> {
public class DTPigeon2 implements DTIMU {
private final Pigeon2 internal;
private final short[] rawAccelerations;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

import com.kauailabs.navx.frc.AHRS;

public class DTNavX implements DTIMU<AHRS> {
public class DTNavX implements DTIMU {
private final AHRS internal;

public DTNavX() {
Expand Down Expand Up @@ -61,8 +61,7 @@ public double getCompassHeading() {

@Override
public double[] getAngularVelocities() {
return new double[] { internal.getRawGyroX(), internal.getRawGyroY(),
internal.getRawGyroZ() };
return new double[] { internal.getRawGyroX(), internal.getRawGyroY(), internal.getRawGyroZ() };
}

@Override
Expand Down