SCRIPT namespace replacements

This commit is contained in:
PJ Reiniger
2025-11-07 20:00:05 -05:00
committed by Peter Johnson
parent ae6c043632
commit 9aca8e0fd6
2622 changed files with 22275 additions and 22275 deletions

View File

@@ -13,14 +13,14 @@
#include <wpi/xrp/XRPGyro.hpp>
#include <wpi/xrp/XRPMotor.hpp>
class Drivetrain : public frc2::SubsystemBase {
class Drivetrain : public wpi::cmd::SubsystemBase {
public:
static constexpr double kGearRatio =
(30.0 / 14.0) * (28.0 / 16.0) * (36.0 / 9.0) * (26.0 / 8.0); // 48.75:1
static constexpr double kCountsPerMotorShaftRev = 12.0;
static constexpr double kCountsPerRevolution =
kCountsPerMotorShaftRev * kGearRatio; // 585.0
static constexpr units::meter_t kWheelDiameter = 60_mm;
static constexpr wpi::units::meter_t kWheelDiameter = 60_mm;
Drivetrain();
@@ -61,42 +61,42 @@ class Drivetrain : public frc2::SubsystemBase {
*
* @return the left-side distance driven
*/
units::meter_t GetLeftDistance();
wpi::units::meter_t GetLeftDistance();
/**
* Gets the right distance driven.
*
* @return the right-side distance driven
*/
units::meter_t GetRightDistance();
wpi::units::meter_t GetRightDistance();
/**
* Returns the average distance traveled by the left and right encoders.
*
* @return The average distance traveled by the left and right encoders.
*/
units::meter_t GetAverageDistance();
wpi::units::meter_t GetAverageDistance();
/**
* Current angle of the XRP around the X-axis.
*
* @return The current angle of the XRP.
*/
units::radian_t GetGyroAngleX();
wpi::units::radian_t GetGyroAngleX();
/**
* Current angle of the XRP around the Y-axis.
*
* @return The current angle of the XRP.
*/
units::radian_t GetGyroAngleY();
wpi::units::radian_t GetGyroAngleY();
/**
* Current angle of the XRP around the Z-axis.
*
* @return The current angle of the XRP.
*/
units::radian_t GetGyroAngleZ();
wpi::units::radian_t GetGyroAngleZ();
/**
* Reset the gyro.
@@ -104,15 +104,15 @@ class Drivetrain : public frc2::SubsystemBase {
void ResetGyro();
private:
frc::XRPMotor m_leftMotor{0};
frc::XRPMotor m_rightMotor{1};
wpi::xrp::XRPMotor m_leftMotor{0};
wpi::xrp::XRPMotor m_rightMotor{1};
frc::Encoder m_leftEncoder{4, 5};
frc::Encoder m_rightEncoder{6, 7};
wpi::Encoder m_leftEncoder{4, 5};
wpi::Encoder m_rightEncoder{6, 7};
frc::DifferentialDrive m_drive{
wpi::DifferentialDrive m_drive{
[&](double output) { m_leftMotor.Set(output); },
[&](double output) { m_rightMotor.Set(output); }};
frc::XRPGyro m_gyro;
wpi::xrp::XRPGyro m_gyro;
};