29#ifndef FRC_REVLIB_SRC_MAIN_NATIVE_INCLUDE_REV_SPARKSIM_H_
30#define FRC_REVLIB_SRC_MAIN_NATIVE_INCLUDE_REV_SPARKSIM_H_
35#include <frc/simulation/SimDeviceSim.h>
36#include <frc/system/plant/DCMotor.h>
58 void iterate(
double velocity,
double vbus,
double dt);
84 bool runLimitLogic(
bool forward);
86 hal::SimDouble m_appliedOutput;
87 hal::SimDouble m_velocity;
88 hal::SimDouble m_position;
89 hal::SimDouble m_busVoltage;
90 hal::SimDouble m_motorCurrent;
91 hal::SimDouble m_setpoint;
92 hal::SimDouble m_arbFF;
93 hal::SimInt m_closedLoopSlot;
94 hal::SimInt m_arbFFUnits;
96 frc::DCMotor* m_dcMotor;
97 hal::SimInt m_controlMode;
99 std::unique_ptr<bool> m_enable;
100 const char* m_deviceName;
Definition: MovingAverageFilterSim.h:38
Definition: SparkAbsoluteEncoderSim.h:43
Definition: SparkAnalogSensorSim.h:43
Definition: SparkBase.h:57
Definition: SparkLimitSwitchSim.h:43
Definition: SparkRelativeEncoderSim.h:43
Definition: SparkSimFaultManager.h:43
Definition: SparkSim.h:48
SparkSim(SparkBase *spark, frc::DCMotor *motor)
Definition: SparkSim.cpp:54
void useDriverStationEnable()
Definition: SparkSim.cpp:367
double GetVelocity() const
Definition: SparkSim.cpp:347
SparkSimFaultManager GetFaultManager()
Definition: SparkSim.cpp:462
void iterate(double velocity, double vbus, double dt)
Definition: SparkSim.cpp:102
double GetMotorCurrent() const
Definition: SparkSim.cpp:359
double GetPosition() const
Definition: SparkSim.cpp:351
void disable()
Definition: SparkSim.cpp:365
void SetPosition(double position)
Definition: SparkSim.cpp:353
ClosedLoopSlot GetClosedLoopSlot() const
Definition: SparkSim.cpp:87
SparkAnalogSensorSim GetAnalogSensorSim()
Definition: SparkSim.cpp:407
double GetSetpoint() const
Definition: SparkSim.cpp:85
SparkAbsoluteEncoderSim GetAbsoluteEncoderSim()
Definition: SparkSim.cpp:388
void SetBusVoltage(double voltage)
Definition: SparkSim.cpp:357
SparkLimitSwitchSim GetForwardLimitSwitchSim()
Definition: SparkSim.cpp:426
void SetVelocity(double velocity)
Definition: SparkSim.cpp:349
SparkRelativeEncoderSim GetRelativeEncoderSim()
Definition: SparkSim.cpp:369
void SetMotorCurrent(double current)
Definition: SparkSim.cpp:361
double GetAppliedOutput() const
Definition: SparkSim.cpp:79
void SetAppliedOutput(double appliedOutput)
Definition: SparkSim.cpp:81
double GetBusVoltage() const
Definition: SparkSim.cpp:355
void enable()
Definition: SparkSim.cpp:363
SparkLimitSwitchSim GetReverseLimitSwitchSim()
Definition: SparkSim.cpp:444
Definition: SparkLowLevel.cpp:40
ClosedLoopSlot
Definition: ClosedLoopSlot.h:33