WPILibC++ 2027.0.0-alpha-4
Loading...
Searching...
No Matches
wpi::cmd::sysid::Config Class Reference

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

#include <wpi/commands2/sysid/SysIdRoutine.hpp>

Public Member Functions

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

Public Attributes

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

Detailed Description

Hardware-independent configuration for a SysId test routine.

Constructor & Destructor Documentation

◆ Config()

wpi::cmd::sysid::Config::Config ( std::optional< ramp_rate_t > rampRate,
std::optional< wpi::units::volt_t > stepVoltage,
std::optional< wpi::units::second_t > timeout,
std::function< void(wpi::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 wpi::cmd::sysid::Config::m_rampRate {1_V / 1_s}

The voltage ramp rate used for quasistatic test routines.

◆ m_recordState

std::function<void(wpi::sysid::State)> wpi::cmd::sysid::Config::m_recordState

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

◆ m_stepVoltage

wpi::units::volt_t wpi::cmd::sysid::Config::m_stepVoltage {7_V}

The step voltage output used for dynamic test routines.

◆ m_timeout

wpi::units::second_t wpi::cmd::sysid::Config::m_timeout {10_s}

Safety timeout for the test routine commands.


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