50 void SetP(uint8_t slot,
float p);
58 void SetI(uint8_t slot,
float i);
66 void SetD(uint8_t slot,
float d);
74 void SetF(uint8_t slot,
float f);
82 void SetIZone(uint8_t slot,
float iZone);
216 float GetP(uint8_t slot);
224 float GetI(uint8_t slot);
232 float GetD(uint8_t slot);
240 float GetF(uint8_t slot);
Header file for the base class for controlling REV Robotics SPARK motor controllers.
CtrlType
Control type parameter.
Definition: SparkBase.hpp:242
A class for configuring and controlling PID for SPARK motor controllers.
Definition: PIDController.hpp:18
float GetIMaxAccum(uint8_t slot)
Get the maximum accumulated integral for the PID controller.
Definition: PIDController.cpp:215
void SetPositionPIDMinInput(float minInput)
Set the minimum input for position PID control.
Definition: PIDController.cpp:134
float GetSlot3Placeholder1(uint8_t slot)
Get the value of slot 3 placeholder 1.
Definition: PIDController.cpp:220
float GetSmartMotionMaxVelocity(uint8_t slot)
Get the Smart Motion maximum velocity.
Definition: PIDController.cpp:190
void SetFeedbackDevice(uint16_t sensor)
Set the feedback device for the PID controller.
Definition: PIDController.cpp:39
void SetOutputMax(uint8_t slot, float max)
Set the output maximum for the PID controller.
Definition: PIDController.cpp:79
void SetSmartMotionAllowedClosedLoopError(uint8_t slot, float error)
Set the allowed closed-loop error for Smart Motion.
Definition: PIDController.cpp:99
float GetOutputMax(uint8_t slot)
Get the maximum output range.
Definition: PIDController.cpp:185
void SetP(uint8_t slot, float p)
Set the Proportional (P) gain.
Definition: PIDController.cpp:44
void SetSmartMotionMaxAccel(uint8_t slot, float maxAccel)
Set the Smart Motion maximum acceleration.
Definition: PIDController.cpp:89
float GetIZone(uint8_t slot)
Get the Integral Zone (I-Zone).
Definition: PIDController.cpp:170
float GetF(uint8_t slot)
Get the Feedforward (F) gain.
Definition: PIDController.cpp:165
float GetSlot3Placeholder2(uint8_t slot)
Get the value of slot 3 placeholder 2.
Definition: PIDController.cpp:225
float GetSmartMotionMinVelOutput(uint8_t slot)
Get the Smart Motion minimum velocity output.
Definition: PIDController.cpp:200
float GetSmartMotionAccelStrategy(uint8_t slot)
Get the Smart Motion acceleration strategy.
Definition: PIDController.cpp:210
void SetI(uint8_t slot, float i)
Set the Integral (I) gain.
Definition: PIDController.cpp:49
void SetReference(float setpoint, CtrlType controlType)
Set the controller reference value based on the selected control mode.
Definition: PIDController.cpp:17
float GetSmartMotionMaxAccel(uint8_t slot)
Get the Smart Motion maximum acceleration.
Definition: PIDController.cpp:195
float GetOutputMin(uint8_t slot)
Get the minimum output range.
Definition: PIDController.cpp:180
float GetSmartMotionAllowedClosedLoopError(uint8_t slot)
Get the allowed closed-loop error for Smart Motion.
Definition: PIDController.cpp:205
void SetPositionPIDWrapEnable(bool enable)
Enable or disable position PID wrap.
Definition: PIDController.cpp:129
void SetD(uint8_t slot, float d)
Set the Derivative (D) gain.
Definition: PIDController.cpp:54
float GetPositionPIDMinInput()
Get the minimum input for position PID control.
Definition: PIDController.cpp:240
void SetIZone(uint8_t slot, float iZone)
Set the Integral Zone (I-Zone) for the PID controller.
Definition: PIDController.cpp:64
float GetDFilter(uint8_t slot)
Get the Derivative Filter value.
Definition: PIDController.cpp:175
float GetPositionPIDMaxInput()
Get the maximum input for position PID control.
Definition: PIDController.cpp:245
void SetPositionPIDMaxInput(float maxInput)
Set the maximum input for position PID control.
Definition: PIDController.cpp:139
void SetSmartMotionAccelStrategy(uint8_t slot, float strategy)
Set the acceleration strategy for Smart Motion.
Definition: PIDController.cpp:104
float GetI(uint8_t slot)
Get the Integral (I) gain.
Definition: PIDController.cpp:155
void SetDFilter(uint8_t slot, float dFilter)
Set the Derivative Filter for the PID controller.
Definition: PIDController.cpp:69
void SetIMaxAccum(uint8_t slot, float maxAccum)
Set the maximum accumulated integral for the PID controller.
Definition: PIDController.cpp:109
void SetSlot3Placeholder2(uint8_t slot, float value)
Set the placeholder parameter in slot 3, position 2.
Definition: PIDController.cpp:119
void SetSmartMotionMaxVelocity(uint8_t slot, float maxVel)
Set the Smart Motion maximum velocity.
Definition: PIDController.cpp:84
uint16_t GetFeedbackDevice()
Get the feedback device ID.
Definition: PIDController.cpp:145
float GetSlot3Placeholder3(uint8_t slot)
Get the value of slot 3 placeholder 3.
Definition: PIDController.cpp:230
void SetF(uint8_t slot, float f)
Set the Feedforward (F) gain.
Definition: PIDController.cpp:59
float GetP(uint8_t slot)
Get the Proportional (P) gain.
Definition: PIDController.cpp:150
bool GetPositionPIDWrapEnable()
Get whether position PID wrap is enabled.
Definition: PIDController.cpp:235
void SetSmartMotionMinVelOutput(uint8_t slot, float minVel)
Set the Smart Motion minimum velocity output.
Definition: PIDController.cpp:94
void SetSlot3Placeholder1(uint8_t slot, float value)
Set the placeholder parameter in slot 3, position 1.
Definition: PIDController.cpp:114
void SetSlot3Placeholder3(uint8_t slot, float value)
Set the placeholder parameter in slot 3, position 3.
Definition: PIDController.cpp:124
float GetD(uint8_t slot)
Get the Derivative (D) gain.
Definition: PIDController.cpp:160
PIDController(SparkBase &base)
Construct a PIDController from a SparkBase object.
Definition: PIDController.cpp:14
void SetOutputMin(uint8_t slot, float min)
Set the output minimum for the PID controller.
Definition: PIDController.cpp:74
A base class for controlling REV Robotics SPARK motor controllers via CAN bus.
Definition: SparkBase.hpp:266