[hal, wpilib] Remove built in accelerometer (#7702)

This commit is contained in:
Thad House
2025-01-17 14:06:09 -08:00
committed by GitHub
parent 1600e773f4
commit 5a6c895b87
48 changed files with 0 additions and 2304 deletions

View File

@@ -5,7 +5,6 @@
package edu.wpi.first.wpilibj.examples.romireference.subsystems;
import edu.wpi.first.util.sendable.SendableRegistry;
import edu.wpi.first.wpilibj.BuiltInAccelerometer;
import edu.wpi.first.wpilibj.Encoder;
import edu.wpi.first.wpilibj.drive.DifferentialDrive;
import edu.wpi.first.wpilibj.motorcontrol.Spark;
@@ -33,9 +32,6 @@ public class Drivetrain extends SubsystemBase {
// Set up the RomiGyro
private final RomiGyro m_gyro = new RomiGyro();
// Set up the BuiltInAccelerometer
private final BuiltInAccelerometer m_accelerometer = new BuiltInAccelerometer();
/** Creates a new Drivetrain. */
public Drivetrain() {
SendableRegistry.addChild(m_diffDrive, m_leftMotor);
@@ -81,33 +77,6 @@ public class Drivetrain extends SubsystemBase {
return (getLeftDistanceInch() + getRightDistanceInch()) / 2.0;
}
/**
* The acceleration in the X-axis.
*
* @return The acceleration of the Romi along the X-axis in Gs
*/
public double getAccelX() {
return m_accelerometer.getX();
}
/**
* The acceleration in the Y-axis.
*
* @return The acceleration of the Romi along the Y-axis in Gs
*/
public double getAccelY() {
return m_accelerometer.getY();
}
/**
* The acceleration in the Z-axis.
*
* @return The acceleration of the Romi along the Z-axis in Gs
*/
public double getAccelZ() {
return m_accelerometer.getZ();
}
/**
* Current angle of the Romi around the X-axis.
*

View File

@@ -5,7 +5,6 @@
package edu.wpi.first.wpilibj.examples.xrpreference.subsystems;
import edu.wpi.first.util.sendable.SendableRegistry;
import edu.wpi.first.wpilibj.BuiltInAccelerometer;
import edu.wpi.first.wpilibj.Encoder;
import edu.wpi.first.wpilibj.drive.DifferentialDrive;
import edu.wpi.first.wpilibj.xrp.XRPGyro;
@@ -36,9 +35,6 @@ public class Drivetrain extends SubsystemBase {
// Set up the XRPGyro
private final XRPGyro m_gyro = new XRPGyro();
// Set up the BuiltInAccelerometer
private final BuiltInAccelerometer m_accelerometer = new BuiltInAccelerometer();
/** Creates a new Drivetrain. */
public Drivetrain() {
SendableRegistry.addChild(m_diffDrive, m_leftMotor);
@@ -84,33 +80,6 @@ public class Drivetrain extends SubsystemBase {
return (getLeftDistanceInch() + getRightDistanceInch()) / 2.0;
}
/**
* The acceleration in the X-axis.
*
* @return The acceleration of the XRP along the X-axis in Gs
*/
public double getAccelX() {
return m_accelerometer.getX();
}
/**
* The acceleration in the Y-axis.
*
* @return The acceleration of the XRP along the Y-axis in Gs
*/
public double getAccelY() {
return m_accelerometer.getY();
}
/**
* The acceleration in the Z-axis.
*
* @return The acceleration of the XRP along the Z-axis in Gs
*/
public double getAccelZ() {
return m_accelerometer.getZ();
}
/**
* Current angle of the XRP around the X-axis.
*