33#pragma warning(disable : 4996)
37#pragma GCC diagnostic push
38#pragma GCC diagnostic ignored "-Wdeprecated"
39#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
42#include <wpi/deprecated.h>
69 friend class ::ConfigBase;
95 other = (faults & 0x1) != 0;
97 sensor = (faults & 0x4) != 0;
98 can = (faults & 0x8) != 0;
125 sensor = (warnings & 0x10) != 0;
126 stall = (warnings & 0x20) != 0;
128 other = (warnings & 0x80) != 0;
143 void Set(
double speed)
override;
155 void SetVoltage(units::volt_t output)
override;
162 double Get()
const override;
173 [[deprecated(
"Use SparkBaseConfig.Inverted() with Configure() instead")]]
186 "Use SparkBaseConfigAccessor.GetInverted() via SparkMax.configAccessor "
187 "or SparkFlex.configAccessor instead")]]
536#pragma GCC diagnostic pop
Definition: SparkAbsoluteEncoder.h:44
Definition: SparkAnalogSensor.h:51
Definition: SparkBaseConfig.h:46
Definition: SparkBase.h:59
bool HasStickyWarning()
Definition: SparkBase.cpp:227
SparkRelativeEncoder & GetEncoder()
Definition: SparkBase.cpp:131
uint8_t GetMotorInterface()
Definition: SparkBase.cpp:161
Warnings GetStickyWarnings()
Definition: SparkBase.cpp:257
std::atomic< bool > m_absoluteEncoderCreated
Definition: SparkBase.h:521
IdleMode
Definition: SparkBase.h:72
bool IsFollower()
Definition: SparkBase.cpp:200
rev::REVLibError PauseFollowerModeAsync()
Definition: SparkBase.cpp:194
REVLibError SetCANTimeout(int milliseconds)
Definition: SparkBase.cpp:298
SoftLimitDirection
Definition: SparkBase.h:74
virtual SparkAbsoluteEncoder & GetAbsoluteEncoder()
Definition: SparkBase.cpp:141
Faults GetStickyFaults()
Definition: SparkBase.cpp:241
std::atomic< bool > m_relativeEncoderCreated
Definition: SparkBase.h:515
std::atomic< bool > m_forwardLimitSwitchCreated
Definition: SparkBase.h:527
~SparkBase() override=default
double GetAppliedOutput()
Definition: SparkBase.cpp:271
SparkClosedLoopController & GetClosedLoopController()
Definition: SparkBase.cpp:146
std::atomic< bool > m_reverseLimitSwitchCreated
Definition: SparkBase.h:530
bool HasActiveFault()
Definition: SparkBase.cpp:207
SparkLimitSwitch m_ReverseLimitSwitch
Definition: SparkBase.h:529
Warnings GetWarnings()
Definition: SparkBase.cpp:249
Faults GetFaults()
Definition: SparkBase.cpp:234
std::atomic< bool > m_analogSensorCreated
Definition: SparkBase.h:518
bool HasStickyFault()
Definition: SparkBase.cpp:213
std::atomic< bool > m_closedLoopControllerCreated
Definition: SparkBase.h:524
SparkClosedLoopController m_ClosedLoopController
Definition: SparkBase.h:523
void Disable() override
Definition: SparkBase.cpp:92
double Get() const override
Definition: SparkBase.cpp:72
REVLibError ClearFaults()
Definition: SparkBase.cpp:292
SparkRelativeEncoder GetEncoderEvenIfAlreadyCreated()
Definition: SparkBase.cpp:310
double m_setpoint
Definition: SparkBase.h:483
ResetMode
Definition: SparkBase.h:76
double GetOutputCurrent()
Definition: SparkBase.cpp:278
rev::REVLibError PauseFollowerMode()
Definition: SparkBase.cpp:188
void SetInverted(bool isInverted) override
Definition: SparkBase.cpp:74
virtual REVLibError Configure(SparkBaseConfig &config, ResetMode resetMode, PersistMode persistMode)
Definition: SparkBase.cpp:96
SparkAnalogSensor m_AnalogSensor
Definition: SparkBase.h:517
REVLibError GetLastError()
Definition: SparkBase.cpp:304
bool GetInverted() const override
Definition: SparkBase.cpp:82
void Set(double speed) override
Definition: SparkBase.cpp:57
virtual SparkLimitSwitch & GetReverseLimitSwitch()
Definition: SparkBase.cpp:156
SparkBase::SparkModel GetSparkModel()
Definition: SparkBase.cpp:169
virtual REVLibError ConfigureAsync(SparkBaseConfig &config, ResetMode resetMode, PersistMode persistMode)
Definition: SparkBase.cpp:118
SparkAnalogSensor & GetAnalog()
Definition: SparkBase.cpp:136
rev::REVLibError ResumeFollowerMode()
Definition: SparkBase.cpp:176
SparkAbsoluteEncoder m_AbsoluteEncoder
Definition: SparkBase.h:520
bool HasActiveWarning()
Definition: SparkBase.cpp:220
void SetVoltage(units::volt_t output) override
Definition: SparkBase.cpp:63
SparkRelativeEncoder m_RelativeEncoder
Definition: SparkBase.h:514
double GetBusVoltage()
Definition: SparkBase.cpp:265
rev::REVLibError ResumeFollowerModeAsync()
Definition: SparkBase.cpp:182
PersistMode
Definition: SparkBase.h:78
double GetMotorTemperature()
Definition: SparkBase.cpp:285
SparkLimitSwitch m_ForwardLimitSwitch
Definition: SparkBase.h:526
virtual SparkLimitSwitch & GetForwardLimitSwitch()
Definition: SparkBase.cpp:151
void StopMotor() override
Definition: SparkBase.cpp:94
Definition: SparkClosedLoopController.h:52
Definition: SparkFlex.h:37
Definition: SparkLimitSwitch.h:48
Definition: SparkLowLevel.h:49
MotorType
Definition: SparkLowLevel.h:77
friend class SparkBase
Definition: SparkLowLevel.h:50
SparkModel
Definition: SparkLowLevel.h:209
Definition: SparkMaxAlternateEncoder.h:46
Definition: SparkMax.h:37
Definition: SparkRelativeEncoder.h:46
Definition: SparkSim.h:48
Definition: SparkLowLevel.cpp:40
REVLibError
Definition: REVLibError.h:33
Definition: SparkBase.h:80
int rawBits
Definition: SparkBase.h:89
Faults()
Definition: SparkBase.h:91
bool motorType
Definition: SparkBase.h:82
bool other
Definition: SparkBase.h:81
Faults(uint16_t faults)
Definition: SparkBase.h:93
bool temperature
Definition: SparkBase.h:85
bool can
Definition: SparkBase.h:84
bool gateDriver
Definition: SparkBase.h:86
bool escEeprom
Definition: SparkBase.h:87
bool sensor
Definition: SparkBase.h:83
bool firmware
Definition: SparkBase.h:88
Definition: SparkBase.h:106
bool extEeprom
Definition: SparkBase.h:110
bool escEeprom
Definition: SparkBase.h:109
bool overcurrent
Definition: SparkBase.h:108
bool hasReset
Definition: SparkBase.h:113
bool sensor
Definition: SparkBase.h:111
Warnings()
Definition: SparkBase.h:117
int rawBits
Definition: SparkBase.h:115
bool other
Definition: SparkBase.h:114
Warnings(uint16_t warnings)
Definition: SparkBase.h:119
bool stall
Definition: SparkBase.h:112
bool brownout
Definition: SparkBase.h:107