WPILibC++ 2024.3.2
frc2::sysid::Config Class Reference

Hardware-independent configuration for a SysId test routine. More...

#include <frc2/command/sysid/SysIdRoutine.h>

Public Member Functions

 Config (std::optional< ramp_rate_t > rampRate, std::optional< units::volt_t > stepVoltage, std::optional< units::second_t > timeout, std::optional< std::function< void(frc::sysid::State)> > recordState)
 Create a new configuration for a SysId test routine. More...
 

Public Attributes

ramp_rate_t m_rampRate {1_V / 1_s}
 The voltage ramp rate used for quasistatic test routines. More...
 
units::volt_t m_stepVoltage {7_V}
 The step voltage output used for dynamic test routines. More...
 
units::second_t m_timeout {10_s}
 Safety timeout for the test routine commands. More...
 
std::function< void(frc::sysid::State)> m_recordState
 Optional handle for recording test state in a third-party logging solution. More...
 

Detailed Description

Hardware-independent configuration for a SysId test routine.

Constructor & Destructor Documentation

◆ Config()

frc2::sysid::Config::Config ( std::optional< ramp_rate_t rampRate,
std::optional< units::volt_t >  stepVoltage,
std::optional< units::second_t >  timeout,
std::optional< std::function< void(frc::sysid::State)> >  recordState 
)
inline

Create a new configuration for a SysId test routine.

Parameters
rampRateThe voltage ramp rate used for quasistatic test routines. Defaults to 1 volt per second if left null.
stepVoltageThe step voltage output used for dynamic test routines. Defaults to 7 volts if left null.
timeoutSafety timeout for the test routine commands. Defaults to 10 seconds if left null.
recordStateOptional handle for recording test state in a third-party logging solution. If provided, the test routine state will be passed to this callback instead of logged in WPILog.

Member Data Documentation

◆ m_rampRate

ramp_rate_t frc2::sysid::Config::m_rampRate {1_V / 1_s}

The voltage ramp rate used for quasistatic test routines.

◆ m_recordState

std::function<void(frc::sysid::State)> frc2::sysid::Config::m_recordState

Optional handle for recording test state in a third-party logging solution.

◆ m_stepVoltage

units::volt_t frc2::sysid::Config::m_stepVoltage {7_V}

The step voltage output used for dynamic test routines.

◆ m_timeout

units::second_t frc2::sysid::Config::m_timeout {10_s}

Safety timeout for the test routine commands.


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