diff --git a/wpilibc/src/main/native/cpp/simulation/DCMotorSim.cpp b/wpilibc/src/main/native/cpp/simulation/DCMotorSim.cpp index 9e10e16fe8..ff8fb1fa76 100644 --- a/wpilibc/src/main/native/cpp/simulation/DCMotorSim.cpp +++ b/wpilibc/src/main/native/cpp/simulation/DCMotorSim.cpp @@ -85,3 +85,15 @@ void DCMotorSim::SetInputVoltage(units::volt_t voltage) { SetInput(Vectord<1>{voltage.value()}); ClampInput(frc::RobotController::GetBatteryVoltage().value()); } + +const DCMotor& DCMotorSim::GetGearbox() const { + return m_gearbox; +} + +double DCMotorSim::GetGearing() const { + return m_gearing; +} + +units::kilogram_square_meter_t DCMotorSim::GetJ() const { + return m_j; +} diff --git a/wpilibc/src/main/native/include/frc/simulation/DCMotorSim.h b/wpilibc/src/main/native/include/frc/simulation/DCMotorSim.h index 8f14d680bc..3473938f62 100644 --- a/wpilibc/src/main/native/include/frc/simulation/DCMotorSim.h +++ b/wpilibc/src/main/native/include/frc/simulation/DCMotorSim.h @@ -111,17 +111,17 @@ class DCMotorSim : public LinearSystemSim<2, 1, 2> { /** * Returns the gearbox. */ - const DCMotor& Gearbox() const { return m_gearbox; } + const DCMotor& GetGearbox() const; /** * Returns the gearing; */ - double Gearing() const { return m_gearing; } + double GetGearing() const; /** * Returns the moment of inertia */ - units::kilogram_square_meter_t J() const { return m_j; } + units::kilogram_square_meter_t GetJ() const; private: DCMotor m_gearbox;