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 std::string m_deviceName;
101 std::string m_unknownDeviceTypeMessage;
Definition: MovingAverageFilterSim.h:38
Definition: SparkAbsoluteEncoderSim.h:43
Definition: SparkAnalogSensorSim.h:43
Definition: SparkBase.h:59
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:55
void useDriverStationEnable()
Definition: SparkSim.cpp:400
double GetVelocity() const
Definition: SparkSim.cpp:380
SparkSimFaultManager GetFaultManager()
Definition: SparkSim.cpp:480
void iterate(double velocity, double vbus, double dt)
Definition: SparkSim.cpp:120
double GetMotorCurrent() const
Definition: SparkSim.cpp:392
double GetPosition() const
Definition: SparkSim.cpp:384
void disable()
Definition: SparkSim.cpp:398
void SetPosition(double position)
Definition: SparkSim.cpp:386
ClosedLoopSlot GetClosedLoopSlot() const
Definition: SparkSim.cpp:89
SparkAnalogSensorSim GetAnalogSensorSim()
Definition: SparkSim.cpp:434
double GetSetpoint() const
Definition: SparkSim.cpp:87
SparkAbsoluteEncoderSim GetAbsoluteEncoderSim()
Definition: SparkSim.cpp:418
void SetBusVoltage(double voltage)
Definition: SparkSim.cpp:390
SparkLimitSwitchSim GetForwardLimitSwitchSim()
Definition: SparkSim.cpp:450
void SetVelocity(double velocity)
Definition: SparkSim.cpp:382
SparkRelativeEncoderSim GetRelativeEncoderSim()
Definition: SparkSim.cpp:402
void SetMotorCurrent(double current)
Definition: SparkSim.cpp:394
double GetAppliedOutput() const
Definition: SparkSim.cpp:81
void SetAppliedOutput(double appliedOutput)
Definition: SparkSim.cpp:83
double GetBusVoltage() const
Definition: SparkSim.cpp:388
void enable()
Definition: SparkSim.cpp:396
SparkLimitSwitchSim GetReverseLimitSwitchSim()
Definition: SparkSim.cpp:465
Definition: SparkLowLevel.cpp:40
ClosedLoopSlot
Definition: ClosedLoopSlot.h:33