2022-Robot
Robot code for 2022 FRC Season by Argos, FRC team #1756
Loading...
Searching...
No Matches
argos_lib::talonsrx_config Namespace Reference

Classes

struct  has_continuousCurrentLimit
 
struct  has_continuousCurrentLimit< T, decltype((void) T::continuousCurrentLimit, void())>
 
struct  has_inverted
 
struct  has_inverted< T, decltype((void) T::inverted, void())>
 
struct  has_neutralMode
 
struct  has_neutralMode< T, decltype((void) T::neutralMode, void())>
 
struct  has_peakCurrentDuration
 
struct  has_peakCurrentDuration< T, decltype((void) T::peakCurrentDuration, void())>
 
struct  has_peakCurrentLimit
 
struct  has_peakCurrentLimit< T, decltype((void) T::peakCurrentLimit, void())>
 
struct  has_peakOutputForward
 
struct  has_peakOutputForward< T, decltype((void) T::peakOutputForward, void())>
 
struct  has_peakOutputReverse
 
struct  has_peakOutputReverse< T, decltype((void) T::peakOutputReverse, void())>
 
struct  has_pid0_allowableError
 
struct  has_pid0_allowableError< T, decltype((void) T::pid0_allowableError, void())>
 
struct  has_pid0_iZone
 
struct  has_pid0_iZone< T, decltype((void) T::pid0_iZone, void())>
 
struct  has_pid0_kD
 
struct  has_pid0_kD< T, decltype((void) T::pid0_kD, void())>
 
struct  has_pid0_kF
 
struct  has_pid0_kF< T, decltype((void) T::pid0_kF, void())>
 
struct  has_pid0_kI
 
struct  has_pid0_kI< T, decltype((void) T::pid0_kI, void())>
 
struct  has_pid0_kP
 
struct  has_pid0_kP< T, decltype((void) T::pid0_kP, void())>
 
struct  has_pid0_selectedSensor
 
struct  has_pid0_selectedSensor< T, decltype((void) T::pid0_selectedSensor, void())>
 
struct  has_remoteFilter0_addr
 
struct  has_remoteFilter0_addr< T, decltype((void) T::remoteFilter0_addr, void())>
 
struct  has_remoteFilter0_type
 
struct  has_remoteFilter0_type< T, decltype((void) T::remoteFilter0_type, void())>
 
struct  has_sensorPhase
 
struct  has_sensorPhase< T, decltype((void) T::sensorPhase, void())>
 
struct  has_statusFrameMotorMode
 
struct  has_statusFrameMotorMode< T, decltype((void) T::statusFrameMotorMode, void())>
 
struct  has_voltCompSat
 
struct  has_voltCompSat< T, decltype((void) T::voltCompSat, void())>
 

Functions

template<typename T >
bool TalonSRXConfig (WPI_TalonSRX &motorController, units::millisecond_t configTimeout)
 Configures a CTRE TalonSRX with only the fields provided. All other fields are given the factory default values. More...
 
template<typename CompetitionConfig , typename PracticeConfig >
bool TalonSRXConfig (WPI_TalonSRX &motorController, units::millisecond_t configTimeout, argos_lib::RobotInstance instance)
 Configures a CTRE TalonSRX with configuration values according to specified robot instance. More...
 

Function Documentation

◆ TalonSRXConfig() [1/2]

template<typename T >
bool argos_lib::talonsrx_config::TalonSRXConfig ( WPI_TalonSRX &  motorController,
units::millisecond_t  configTimeout 
)

Configures a CTRE TalonSRX with only the fields provided. All other fields are given the factory default values.

Template Parameters
TStructure containing any combination of the following members:
  • inverted
  • neutralMode
  • pid0_allowableError
  • pid0_iZone
  • pid0_kD,
  • pid0_kF
  • pid0_kI
  • pid0_kP
  • pid0_selectedSensor
  • remoteFilter0_addr,
  • remoteFilter0_type
  • sensorPhase
  • voltCompSat
  • statusFrameMotorMode
  • peakCurrentLimit
  • peakCurrentDuration
  • continuousCurrentLimit
  • peakOutputForward
  • peakOutputReverse
Parameters
motorControllerTalonSRX object to configure
configTimeoutTime to wait for response from TalonSRX
Returns
true Configuration succeeded
false Configuration failed

◆ TalonSRXConfig() [2/2]

template<typename CompetitionConfig , typename PracticeConfig >
bool argos_lib::talonsrx_config::TalonSRXConfig ( WPI_TalonSRX &  motorController,
units::millisecond_t  configTimeout,
argos_lib::RobotInstance  instance 
)

Configures a CTRE TalonSRX with configuration values according to specified robot instance.

Template Parameters
CompetitionConfigConfigurations to use in competition robot instance
PracticeConfigConfigurations to use in practice robot instance
Parameters
motorControllerTalonSRX object to configure
configTimeoutTime to wait for response from TalonSRX
instanceRobot instance to use
Returns
true Configuration succeeded
false Configuration failed