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

#include <SoftLimitConfig.h>

Inherits rev::spark::BaseConfig.

Public Member Functions

 SoftLimitConfig ()=default
 
 ~SoftLimitConfig () override=default
 
 SoftLimitConfig (const SoftLimitConfig &)=delete
 
SoftLimitConfigoperator= (const SoftLimitConfig &)=delete
 
 SoftLimitConfig (SoftLimitConfig &&) noexcept=delete
 
SoftLimitConfigoperator= (SoftLimitConfig &&) noexcept=delete
 
SoftLimitConfigApply (SoftLimitConfig &config)
 
SoftLimitConfigForwardSoftLimit (double limit)
 
SoftLimitConfigForwardSoftLimitEnabled (bool enabled)
 
SoftLimitConfigReverseSoftLimit (double limit)
 
SoftLimitConfigReverseSoftLimitEnabled (bool enabled)
 
- Public Member Functions inherited from rev::spark::BaseConfig
virtual ~BaseConfig ()=default
 
virtual std::string Flatten ()
 

Additional Inherited Members

- Protected Types inherited from rev::spark::BaseConfig
using SparkConfig_t = std::variant< int32_t, uint32_t, float, bool >
 
- Protected Member Functions inherited from rev::spark::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< SparkConfig_tGetParameter (uint8_t parameterId)
 
std::optional< SparkConfig_tGetParameter (BaseConfig &fromConfig, uint8_t parameterId)
 
void RemoveParameter (uint8_t parameterId)
 
void RemoveParameter (BaseConfig &fromConfig, uint8_t parameterId)
 
void Apply (BaseConfig &config)
 

Constructor & Destructor Documentation

◆ SoftLimitConfig() [1/3]

rev::spark::SoftLimitConfig::SoftLimitConfig ( )
default

◆ ~SoftLimitConfig()

rev::spark::SoftLimitConfig::~SoftLimitConfig ( )
overridedefault

◆ SoftLimitConfig() [2/3]

rev::spark::SoftLimitConfig::SoftLimitConfig ( const SoftLimitConfig )
delete

◆ SoftLimitConfig() [3/3]

rev::spark::SoftLimitConfig::SoftLimitConfig ( SoftLimitConfig &&  )
deletenoexcept

Member Function Documentation

◆ operator=() [1/2]

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

◆ operator=() [2/2]

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

◆ Apply()

SoftLimitConfig & SoftLimitConfig::Apply ( SoftLimitConfig config)

Applies settings from another SoftLimitConfig 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 SoftLimitConfig to copy settings from
Returns
The updated SoftLimitConfig for method chaining

◆ ForwardSoftLimit()

SoftLimitConfig & SoftLimitConfig::ForwardSoftLimit ( double  limit)

Set the forward soft limit based on the position of the selected feedback sensor. This will disable motor actuation in the forward direction past this position. This value should have the position conversion factor applied to it.

Parameters
limitThe forward soft limit position with the conversion factor applied
Returns
The modified SoftLimitConfig object for method chaining

◆ ForwardSoftLimitEnabled()

SoftLimitConfig & SoftLimitConfig::ForwardSoftLimitEnabled ( bool  enabled)

Set whether to enable or disable the forward soft limit.

Parameters
enabledTrue to enable the forward soft limit
Returns
The modified SoftLimitConfig object for method chaining

◆ ReverseSoftLimit()

SoftLimitConfig & SoftLimitConfig::ReverseSoftLimit ( double  limit)

Set the reverse soft limit based on the position of the selected feedback sensor. This will disable motor actuation in the reverse direction past this position. This value should have the position conversion factor applied to it.

Parameters
limitThe reverse soft limit position with the conversion factor applied
Returns
The modified SoftLimitConfig object for method chaining

◆ ReverseSoftLimitEnabled()

SoftLimitConfig & SoftLimitConfig::ReverseSoftLimitEnabled ( bool  enabled)

Set whether to enable or disable the reverse soft limit.

Parameters
enabledTrue to enable the reverse soft limit
Returns
The modified SoftLimitConfig object for method chaining

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