36#include <frc/motorcontrol/MotorController.h>
38#include <wpi/deprecated.h>
69 friend class ::ConfigBase;
89 [[deprecated(
"We recommend migrating to MAXMotion instead.")]] = 4,
96 [[deprecated(
"We recommend migrating to MAXMotion instead.")]] = 6,
328 int pidSlot = 0,
double arbFeedforward = 0,
int arbFFUnits = 0);
Definition: SparkAbsoluteEncoder.h:44
Definition: SparkAbsoluteEncoderSim.h:43
Definition: SparkAnalogSensor.h:51
Definition: SparkAnalogSensorSim.h:43
Definition: SparkBase.h:57
Definition: SparkClosedLoopController.h:51
Definition: SparkExternalEncoderSim.h:42
Definition: SparkFlexExternalEncoder.h:42
Definition: SparkFlex.h:37
Definition: SparkLimitSwitch.h:48
Definition: SparkLimitSwitchSim.h:43
Definition: SparkLowLevel.h:49
static const uint8_t kAPIMinorVersion
Definition: SparkLowLevel.h:73
ParameterStatus
Definition: SparkLowLevel.h:101
@ kNotImplementedDeprecated
MotorType GetMotorType()
Definition: SparkLowLevel.cpp:121
MotorType
Definition: SparkLowLevel.h:77
SparkModel m_expectedSparkModel
Definition: SparkLowLevel.h:333
void SetControlFramePeriodMs(int periodMs)
Definition: SparkLowLevel.cpp:133
float GetSafeFloat(float f)
Definition: SparkLowLevel.cpp:301
MotorType m_motorType
Definition: SparkLowLevel.h:332
PeriodicStatus2 GetPeriodicStatus2()
Definition: SparkLowLevel.cpp:209
virtual ~SparkLowLevel()
Definition: SparkLowLevel.cpp:83
PeriodicStatus4 GetPeriodicStatus4()
Definition: SparkLowLevel.cpp:236
static const uint8_t kAPIMajorVersion
Definition: SparkLowLevel.h:72
PeriodicStatus3 GetPeriodicStatus3()
Definition: SparkLowLevel.cpp:222
PeriodicStatus0 GetPeriodicStatus0()
Definition: SparkLowLevel.cpp:138
void * m_sparkMaxHandle
Definition: SparkLowLevel.h:336
PeriodicStatus5 GetPeriodicStatus5()
Definition: SparkLowLevel.cpp:251
PeriodicStatus1 GetPeriodicStatus1()
Definition: SparkLowLevel.cpp:165
void SetPeriodicFrameTimeout(int timeoutMs)
Definition: SparkLowLevel.cpp:123
std::string GetFirmwareString()
Definition: SparkLowLevel.cpp:102
SparkModel
Definition: SparkLowLevel.h:209
std::vector< uint8_t > GetSerialNumber()
Definition: SparkLowLevel.cpp:117
PeriodicStatus6 GetPeriodicStatus6()
Definition: SparkLowLevel.cpp:264
static const uint32_t kAPIVersion
Definition: SparkLowLevel.h:75
void SetCANMaxRetries(int numRetries)
Definition: SparkLowLevel.cpp:128
void CreateSimFaultManager()
Definition: SparkLowLevel.cpp:306
static const uint8_t kAPIBuildVersion
Definition: SparkLowLevel.h:74
REVLibError SetpointCommand(double value, SparkLowLevel::ControlType ctrl=ControlType::kDutyCycle, int pidSlot=0, double arbFeedforward=0, int arbFFUnits=0)
Definition: SparkLowLevel.cpp:290
uint32_t GetFirmwareVersion()
Definition: SparkLowLevel.cpp:87
PeriodicFrame
Definition: SparkLowLevel.h:110
PeriodicStatus7 GetPeriodicStatus7()
Definition: SparkLowLevel.cpp:278
ControlType
Definition: SparkLowLevel.h:79
@ kMAXMotionPositionControl
@ kMAXMotionVelocityControl
int GetDeviceId() const
Definition: SparkLowLevel.cpp:119
Definition: SparkMaxAlternateEncoder.h:46
Definition: SparkMaxAlternateEncoderSim.h:42
Definition: SparkMax.h:37
Definition: SparkRelativeEncoder.h:46
Definition: SparkRelativeEncoderSim.h:43
Definition: SparkSimFaultManager.h:43
Definition: SparkLowLevel.cpp:40
REVLibError
Definition: REVLibError.h:33
Definition: SparkLowLevel.h:121
bool inverted
Definition: SparkLowLevel.h:130
bool hardForwardLimitReached
Definition: SparkLowLevel.h:126
bool softForwardLimitReached
Definition: SparkLowLevel.h:128
uint64_t timestamp
Definition: SparkLowLevel.h:132
double current
Definition: SparkLowLevel.h:124
double appliedOutput
Definition: SparkLowLevel.h:122
double voltage
Definition: SparkLowLevel.h:123
bool primaryHeartbeatLock
Definition: SparkLowLevel.h:131
bool hardReverseLimitReached
Definition: SparkLowLevel.h:127
bool softReverseLimitReached
Definition: SparkLowLevel.h:129
uint8_t motorTemperature
Definition: SparkLowLevel.h:125
Definition: SparkLowLevel.h:135
bool extEepromWarning
Definition: SparkLowLevel.h:147
bool brownoutStickyWarning
Definition: SparkLowLevel.h:160
bool motorTypeStickyFault
Definition: SparkLowLevel.h:153
bool drvStickyFault
Definition: SparkLowLevel.h:157
bool isFollower
Definition: SparkLowLevel.h:168
bool escEepromStickyWarning
Definition: SparkLowLevel.h:162
bool firmwareFault
Definition: SparkLowLevel.h:143
bool sensorStickyFault
Definition: SparkLowLevel.h:154
bool sensorWarning
Definition: SparkLowLevel.h:148
uint64_t timestamp
Definition: SparkLowLevel.h:169
bool stallStickyWarning
Definition: SparkLowLevel.h:165
bool hasResetStickyWarning
Definition: SparkLowLevel.h:166
bool brownoutWarning
Definition: SparkLowLevel.h:144
bool firmwareStickyFault
Definition: SparkLowLevel.h:159
bool overcurrentWarning
Definition: SparkLowLevel.h:145
bool canFault
Definition: SparkLowLevel.h:139
bool stallWarning
Definition: SparkLowLevel.h:149
bool otherFault
Definition: SparkLowLevel.h:136
bool hasResetWarning
Definition: SparkLowLevel.h:150
bool sensorFault
Definition: SparkLowLevel.h:138
bool overcurrentStickyWarning
Definition: SparkLowLevel.h:161
bool canStickyFault
Definition: SparkLowLevel.h:155
bool drvFault
Definition: SparkLowLevel.h:141
bool otherStickyFault
Definition: SparkLowLevel.h:152
bool escEepromFault
Definition: SparkLowLevel.h:142
bool escEepromStickyFault
Definition: SparkLowLevel.h:158
bool escEepromWarning
Definition: SparkLowLevel.h:146
bool otherStickyWarning
Definition: SparkLowLevel.h:167
bool otherWarning
Definition: SparkLowLevel.h:151
bool extEepromStickyWarning
Definition: SparkLowLevel.h:163
bool sensorStickyWarning
Definition: SparkLowLevel.h:164
bool temperatureStickyFault
Definition: SparkLowLevel.h:156
bool temperatureFault
Definition: SparkLowLevel.h:140
bool motorTypeFault
Definition: SparkLowLevel.h:137
Definition: SparkLowLevel.h:172
double primaryEncoderPosition
Definition: SparkLowLevel.h:174
double primaryEncoderVelocity
Definition: SparkLowLevel.h:173
uint64_t timestamp
Definition: SparkLowLevel.h:175
Definition: SparkLowLevel.h:178
uint64_t timestamp
Definition: SparkLowLevel.h:182
double analogVoltage
Definition: SparkLowLevel.h:179
double analogVelocity
Definition: SparkLowLevel.h:180
double analogPosition
Definition: SparkLowLevel.h:181
Definition: SparkLowLevel.h:185
uint64_t timestamp
Definition: SparkLowLevel.h:188
double externalOrAltEncoderPosition
Definition: SparkLowLevel.h:187
double externalOrAltEncoderVelocity
Definition: SparkLowLevel.h:186
Definition: SparkLowLevel.h:191
double dutyCycleEncoderVelocity
Definition: SparkLowLevel.h:192
uint64_t timestamp
Definition: SparkLowLevel.h:194
double dutyCycleEncoderPosition
Definition: SparkLowLevel.h:193
Definition: SparkLowLevel.h:197
uint64_t timestamp
Definition: SparkLowLevel.h:201
double dutyCyclePeriod
Definition: SparkLowLevel.h:199
double unadjustedDutyCycle
Definition: SparkLowLevel.h:198
uint8_t dutyCycleNoSignal
Definition: SparkLowLevel.h:200
Definition: SparkLowLevel.h:204
double iAccumulation
Definition: SparkLowLevel.h:205
uint64_t timestamp
Definition: SparkLowLevel.h:206