REVLib - C++
rev::spark::FeedForwardConfig Class Reference

#include <FeedForwardConfig.h>

Inherits rev::BaseConfig.

Public Member Functions

 FeedForwardConfig ()=default
 
 ~FeedForwardConfig () override=default
 
 FeedForwardConfig (const FeedForwardConfig &)=delete
 
FeedForwardConfigoperator= (const FeedForwardConfig &)=delete
 
 FeedForwardConfig (FeedForwardConfig &&) noexcept=delete
 
FeedForwardConfigoperator= (FeedForwardConfig &&) noexcept=delete
 
FeedForwardConfigApply (FeedForwardConfig &config)
 
FeedForwardConfigkS (double kS, ClosedLoopSlot slot=kSlot0)
 
FeedForwardConfigkV (double kV, ClosedLoopSlot slot=kSlot0)
 
FeedForwardConfigkA (double kA, ClosedLoopSlot slot=kSlot0)
 
FeedForwardConfigkG (double kG, ClosedLoopSlot slot=kSlot0)
 
FeedForwardConfigkCos (double kCos, ClosedLoopSlot slot=kSlot0)
 
FeedForwardConfigkCosRatio (double kCosRatio, ClosedLoopSlot slot=kSlot0)
 
FeedForwardConfigsv (double kS, double kV, ClosedLoopSlot slot=kSlot0)
 
FeedForwardConfigsva (double kS, double kV, double kA, ClosedLoopSlot slot=kSlot0)
 
FeedForwardConfigsvag (double kS, double kV, double kA, double kG, ClosedLoopSlot slot=kSlot0)
 
FeedForwardConfigsvacr (double kS, double kV, double kA, double kCos, double kCosRatio, ClosedLoopSlot slot=kSlot0)
 
FeedForwardConfigsg (double kS, double kG, ClosedLoopSlot slot=kSlot0)
 
FeedForwardConfigscr (double kS, double kCos, double kCosRatio, ClosedLoopSlot slot=kSlot0)
 
- Public Member Functions inherited from rev::BaseConfig
virtual ~BaseConfig ()=default
 
virtual std::string Flatten ()
 

Additional Inherited Members

- Protected Types inherited from rev::BaseConfig
using REVLibConfig_t = std::variant< int32_t, uint32_t, float, bool >
 
- Protected Member Functions inherited from rev::BaseConfig
 BaseConfig ()=default
 
 BaseConfig (const BaseConfig &)=delete
 
BaseConfigoperator= (const BaseConfig &)=delete
 
 BaseConfig (BaseConfig &&) noexcept=delete
 
BaseConfigoperator= (BaseConfig &&) noexcept=delete
 
template<typename ConfigType >
void PutParameter (uint8_t parameterId, ConfigType value)
 
std::optional< REVLibConfig_tGetParameter (uint8_t parameterId)
 
void RemoveParameter (uint8_t parameterId)
 
void Apply (BaseConfig &config)
 
- Static Protected Member Functions inherited from rev::BaseConfig
static std::optional< REVLibConfig_tGetParameter (BaseConfig &fromConfig, uint8_t parameterId)
 
static void RemoveParameter (BaseConfig &fromConfig, uint8_t parameterId)
 

Constructor & Destructor Documentation

◆ FeedForwardConfig() [1/3]

rev::spark::FeedForwardConfig::FeedForwardConfig ( )
default

◆ ~FeedForwardConfig()

rev::spark::FeedForwardConfig::~FeedForwardConfig ( )
overridedefault

◆ FeedForwardConfig() [2/3]

rev::spark::FeedForwardConfig::FeedForwardConfig ( const FeedForwardConfig )
delete

◆ FeedForwardConfig() [3/3]

rev::spark::FeedForwardConfig::FeedForwardConfig ( FeedForwardConfig &&  )
deletenoexcept

Member Function Documentation

◆ operator=() [1/2]

FeedForwardConfig & rev::spark::FeedForwardConfig::operator= ( const FeedForwardConfig )
delete

◆ operator=() [2/2]

FeedForwardConfig & rev::spark::FeedForwardConfig::operator= ( FeedForwardConfig &&  )
deletenoexcept

◆ Apply()

FeedForwardConfig & FeedForwardConfig::Apply ( FeedForwardConfig config)

Applies settings from another FeedForwardConfig to this one.

Settings in the provided config will overwrite existing values in this object. Settings not specified in the provided config remain unchanged.

Parameters
configThe FeedForwardConfig to copy settings from
Returns
The updated FeedForwardConfig for method chaining

◆ kS()

FeedForwardConfig & FeedForwardConfig::kS ( double  kS,
ClosedLoopSlot  slot = kSlot0 
)

Set the kS Static Gain of the controller for a specific closed loop slot.

Parameters
kSThe kS gain in Volts
slotThe closed loop slot to set the values for
Returns
The modified FeedForwardConfig object for method chaining

◆ kV()

FeedForwardConfig & FeedForwardConfig::kV ( double  kV,
ClosedLoopSlot  slot = kSlot0 
)

Set the kV Velocity Gain of the controller for a specific closed loop slot.

This is not applied in Position control mode.

Parameters
kVThe kV gain in Volts
slotThe closed loop slot to set the values for
Returns
The modified FeedForwardConfig object for method chaining

◆ kA()

FeedForwardConfig & FeedForwardConfig::kA ( double  kA,
ClosedLoopSlot  slot = kSlot0 
)

Set the kA Acceleration Gain of the controller for a specific closed loop slot.

This is only applied in MAXMotion control modes

Parameters
kAThe kA gain in Volts
slotThe closed loop slot to set the values for
Returns
The modified FeedForwardConfig object for method chaining

◆ kG()

FeedForwardConfig & FeedForwardConfig::kG ( double  kG,
ClosedLoopSlot  slot = kSlot0 
)

Set the kG Static Gravity Gain of the controller for a specific closed loop slot.

This is statically applied, for an elevator or linear mechanism. Set it to 0 if kCos is being used.

This is only applied in Position and MAXMotion Position control modes

Parameters
kGThe kG gain in Volts
slotThe closed loop slot to set the values for
Returns
The modified FeedForwardConfig object for method chaining

◆ kCos()

FeedForwardConfig & FeedForwardConfig::kCos ( double  kCos,
ClosedLoopSlot  slot = kSlot0 
)

Set the kCos Cosine Gravity Gain of the controller for a specific closed loop slot.

This is multiplied by the cosine of the absolute position of the mechanism (See kCosRatio, ClosedLoopSlot slot) for info on configuring this) for an arm mechanism. Set it to 0 if kG is being used.

This is only applied in Position and MAXMotion Position control modes

Parameters
kCosThe kCos gain in Volts
slotThe closed loop slot to set the values for
Returns
The modified FeedForwardConfig object for method chaining

◆ kCosRatio()

FeedForwardConfig & FeedForwardConfig::kCosRatio ( double  kCosRatio,
ClosedLoopSlot  slot = kSlot0 
)

Set the kCosRatio of the controller for a specific closed loop slot.

This sets the ratio that is used to calculate the absolute position of your arm mechanism for use with kCos. This is applied after the conversion factor and should convert from those units to absolute rotations of your mechanism. Ensure your selected encoder is zeroed such that 0 = horizontal.

Parameters
kCosRatioThe kCosRatio in Volts
slotThe closed loop slot to set the values for
Returns
The modified FeedForwardConfig object for method chaining

◆ sv()

FeedForwardConfig & FeedForwardConfig::sv ( double  kS,
double  kV,
ClosedLoopSlot  slot = kSlot0 
)

Set the kS and kV gains for the provided slot in one call.

For more information on the kS and kV gains, see FeedForwardConfig#kS(double) and FeedForwardConfig#kV(double).

Parameters
kSThe kS gain in Volts
kVThe kV gain in Volts per velocity
Returns
The modified FeedForwardConfig object for method chaining

◆ sva()

FeedForwardConfig & FeedForwardConfig::sva ( double  kS,
double  kV,
double  kA,
ClosedLoopSlot  slot = kSlot0 
)

Set the kS, kV, and kA gains for the provided slot in one call.

For more information on the kS, kV, and kA gains, see FeedForwardConfig#kS(double), FeedForwardConfig#kV(double), and FeedForwardConfig#kA(double).

Parameters
kSThe kS gain in Volts
kVThe kV gain in Volts per velocity
kAThe kA gain in Volts per velocity per second
Returns
The modified FeedForwardConfig object for method chaining

◆ svag()

FeedForwardConfig & FeedForwardConfig::svag ( double  kS,
double  kV,
double  kA,
double  kG,
ClosedLoopSlot  slot = kSlot0 
)

Set the kS, kV, kA, and kG gains for the provided slot in one call.

For more information on the kS, kV, kA, and kG gains, see FeedForwardConfig#kS(double), FeedForwardConfig#kV(double), FeedForwardConfig#kA(double), and FeedForwardConfig#kG(double).

Parameters
kSThe kS gain in Volts
kVThe kV gain in Volts per velocity
kAThe kA gain in Volts per velocity per second
kGThe kG gain in Volts
Returns
The modified FeedForwardConfig object for method chaining

◆ svacr()

FeedForwardConfig & FeedForwardConfig::svacr ( double  kS,
double  kV,
double  kA,
double  kCos,
double  kCosRatio,
ClosedLoopSlot  slot = kSlot0 
)

Set the kS, kV, kA, kCos, and kCosRatio gains for the provided slot in one call.

For more information on the kS, kV, kA, kCos, and kCosRatio gains, see FeedForwardConfig#kS(double), FeedForwardConfig#kV(double), FeedForwardConfig#kA(double), FeedForwardConfig#kCos(double), and FeedForwardConfig#kCosRatio(double).

Parameters
kSThe kS gain in Volts
kVThe kV gain in Volts per velocity
kAThe kA gain in Volts per velocity per second
kCosThe kCos gain in Volts
kCosRatioThe ratio used to calculate the absolute position of your arm mechanism for use with kCos
Returns
The modified FeedForwardConfig object for method chaining

◆ sg()

FeedForwardConfig & FeedForwardConfig::sg ( double  kS,
double  kG,
ClosedLoopSlot  slot = kSlot0 
)

Set the kS and kG gains for the provided slot in one call.

For more information on the kS and kG gains, see FeedForwardConfig#kS(double) and FeedForwardConfig#kG(double).

Parameters
kSThe kS gain in Volts
kGThe kG gain in Volts
Returns
The modified FeedForwardConfig object for method chaining

◆ scr()

FeedForwardConfig & FeedForwardConfig::scr ( double  kS,
double  kCos,
double  kCosRatio,
ClosedLoopSlot  slot = kSlot0 
)

Set the kS, kCos, and kCosRatio gains for the provided slot in one call.

For more information on the kS, kCos, and kCosRatio gains, see FeedForwardConfig#kS(double), FeedForwardConfig#kCos(double), and FeedForwardConfig#kCosRatio(double).

Parameters
kSThe kS gain in Volts
kCosThe kCos gain in Volts
kCosRatioThe ratio used to calculate the absolute position of your arm mechanism for use with kCos
Returns
The modified FeedForwardConfig object for method chaining

The documentation for this class was generated from the following files: