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

@@ -12,7 +12,7 @@
#include "wpi/units/moment_of_inertia.hpp"
#include "wpi/units/torque.hpp"
namespace frc::sim {
namespace wpi::sim {
/**
* Represents a simulated flywheel mechanism.
*/
@@ -23,13 +23,13 @@ class FlywheelSim : public LinearSystemSim<1, 1, 1> {
*
* @param plant The linear system representing the flywheel. This
* system can be created with
* LinearSystemId::FlywheelSystem() or
* LinearSystemId::IdentifyVelocitySystem().
* wpi::math::LinearSystemId::FlywheelSystem() or
* wpi::math::LinearSystemId::IdentifyVelocitySystem().
* @param gearbox The type of and number of motors in the flywheel
* gearbox.
* @param measurementStdDevs The standard deviation of the measurement noise.
*/
FlywheelSim(const LinearSystem<1, 1, 1>& plant, const DCMotor& gearbox,
FlywheelSim(const wpi::math::LinearSystem<1, 1, 1>& plant, const wpi::math::DCMotor& gearbox,
const std::array<double, 1>& measurementStdDevs = {0.0});
using LinearSystemSim::SetState;
@@ -39,54 +39,54 @@ class FlywheelSim : public LinearSystemSim<1, 1, 1> {
*
* @param velocity The new velocity
*/
void SetVelocity(units::radians_per_second_t velocity);
void SetVelocity(wpi::units::radians_per_second_t velocity);
/**
* Returns the flywheel's velocity.
*
* @return The flywheel's velocity.
*/
units::radians_per_second_t GetAngularVelocity() const;
wpi::units::radians_per_second_t GetAngularVelocity() const;
/**
* Returns the flywheel's acceleration.
*
* @return The flywheel's acceleration
*/
units::radians_per_second_squared_t GetAngularAcceleration() const;
wpi::units::radians_per_second_squared_t GetAngularAcceleration() const;
/**
* Returns the flywheel's torque.
*
* @return The flywheel's torque
*/
units::newton_meter_t GetTorque() const;
wpi::units::newton_meter_t GetTorque() const;
/**
* Returns the flywheel's current draw.
*
* @return The flywheel's current draw.
*/
units::ampere_t GetCurrentDraw() const;
wpi::units::ampere_t GetCurrentDraw() const;
/**
* Gets the input voltage for the flywheel.
*
* @return The flywheel input voltage.
*/
units::volt_t GetInputVoltage() const;
wpi::units::volt_t GetInputVoltage() const;
/**
* Sets the input voltage for the flywheel.
*
* @param voltage The input voltage.
*/
void SetInputVoltage(units::volt_t voltage);
void SetInputVoltage(wpi::units::volt_t voltage);
/**
* Returns the gearbox.
*/
DCMotor Gearbox() const { return m_gearbox; }
wpi::math::DCMotor Gearbox() const { return m_gearbox; }
/**
* Returns the gearing;
@@ -96,11 +96,11 @@ class FlywheelSim : public LinearSystemSim<1, 1, 1> {
/**
* Returns the moment of inertia
*/
units::kilogram_square_meter_t J() const { return m_j; }
wpi::units::kilogram_square_meter_t J() const { return m_j; }
private:
DCMotor m_gearbox;
wpi::math::DCMotor m_gearbox;
double m_gearing;
units::kilogram_square_meter_t m_j;
wpi::units::kilogram_square_meter_t m_j;
};
} // namespace frc::sim
} // namespace wpi::sim