7#include <wpi/math/filter/LinearFilter.hpp>
8#include <wpi/simulation/DCMotorSim.hpp>
9#include <wpi/units/angle.hpp>
10#include <wpi/units/angular_acceleration.hpp>
11#include <wpi/units/angular_velocity.hpp>
12#include <wpi/units/current.hpp>
13#include <wpi/units/length.hpp>
14#include <wpi/units/time.hpp>
15#include <wpi/units/velocity.hpp>
16#include <wpi/units/voltage.hpp>
23class SmartMotorController;
76 wpi::sim::DCMotorSim& m_sim;
77 std::function<double()> m_dutyCycleSupplier;
79 wpi::units::second_t m_period;
80 const void* m_batteryKey;
81 wpi::math::LinearFilter<double> m_supplyCurrentFilter;
82 bool m_inputFed{
false};
83 bool m_simUpdated{
false};
84 wpi::units::volt_t m_lastInputVoltage{0};
Definition MechanismGearing.hpp:19
Definition SimSupplier.hpp:22
Definition SmartMotorController.hpp:48
Definition DCMotorSimSupplier.hpp:35
void StarveInput() override
void SetMechanismVelocity(wpi::units::turns_per_second_t velocity) override
void SetMechanismPosition(wpi::units::turn_t angle) override
wpi::units::turns_per_second_t GetMechanismVelocity() override
bool IsInputFed() override
wpi::units::turns_per_second_squared_t GetRotorAcceleration() override
void FeedInput() override
wpi::units::volt_t GetMechanismStatorVoltage() override
void SetMechanismStatorVoltage(wpi::units::volt_t volts) override
void SetMechanismStatorDutyCycle(double dutyCycle) override
wpi::units::ampere_t GetStatorCurrent() override
void FeedUpdateSim() override
wpi::units::volt_t GetMechanismSupplyVoltage() override
wpi::units::turn_t GetMechanismPosition() override
wpi::units::turns_per_second_t GetRotorVelocity() override
void SetRotorVelocity(wpi::units::turns_per_second_t velocity) override
void StarveUpdateSim() override
wpi::units::turn_t GetRotorPosition() override
DCMotorSimSupplier(wpi::sim::DCMotorSim &sim, SmartMotorController &smc)
bool GetUpdatedSim() override
wpi::units::turns_per_second_squared_t GetMechanismAcceleration() override
void UpdateSim() override
void SetRotorPosition(wpi::units::turn_t angle) override
wpi::units::ampere_t GetSupplyCurrent() override
Definition SimSensorConfig.hpp:15
Definition SimSensorConfig.hpp:15