|
| void | SetGetter (std::function< double()> getter) |
| | Sets the function used to retrieve the raw input value.
|
| void | Reset () override |
| | Resets the internal filter state.
|
| bool | Active () const |
| | Checks whether the analog input is currently active.
|
| AnalogValue & | SetDeadband (double deadband) |
| | Sets the deadband applied to the input.
|
| AnalogValue & | SetRange (double min, double max=1) |
| | Sets the output range of the processed analog input.
|
| double | GetDeadband () const |
| | Gets the configured deadband threshold.
|
| double | GetMaxValue () const |
| | Gets the configured maximum output value.
|
| double | GetMinValue () const |
| | Gets the configured minimum output value.
|
| AnalogValue & | SetPolynomial (int poly) |
| | Sets the polynomial response curve exponent.
|
| int | GetPolynomial () const |
| | Gets the configured polynomial exponent.
|
| void | Calculate () override |
| | Updates the internal filter with the current processed value.
|
| double | GetFiltered () const |
| | Gets the filtered analog value.
|
| AnalogValue & | SetFilterSize (int size) |
| | Sets the moving-average filter window size.
|
| AnalogValue & | SetFilterTime (units::second_t time) |
| | Sets the moving-average filter duration.
|
| void | SetGetter (std::function< double()> _lambda) |
| | Set the lambda function to fetch sensor data.
|
| void | ApplyPostProcessing (std::function< double(double)> func) |
| | Set a post-processing function for sensor data.
|
| double | Get () const |
| | Get the current sensor state.
|
| void | Refresh () override |
| | Refresh the sensor state.
|
| | Loggable (std::string_view name) |
| | Construct a Loggable that registers a top-level table name.
|
| | Loggable (std::shared_ptr< nt::NetworkTable > table) |
| | Construct a Loggable that uses an existing NetworkTable.
|
| | Loggable () |
| | Default construct an uninitialized Loggable.
|
| void | LogChild (std::string_view name, Loggable *child) |
| | Register a child Loggable under a named subtree.
|
| void | LogChild (std::string_view name, wpi::Sendable *child) |
| | Register a child Sendable under a named subtree.
|
| void | SetPeriodicLevel (LogLevel level) |
| | Set the logging level for LoggablePeriodic.
|
| template<typename T> |
| T | WriteLog (std::string_view field, const T &data, LogLevel level=LogLevel::Normal) |
| | Publish a value to NetworkTables under the given field.
|
| template<typename T> |
| T | ReadLog (std::string_view field, const T &defaultValue={}) |
| | Read a value from NetworkTables for the given field.
|
|
template<> |
| decltype(Loggable::subscribers) ::iterator | addSubscriber (std::string_view field, const std::vector< bool > &defaultValue) |
|
template<> |
| void | WriteLogImpl (nt::Publisher *pub, const std::vector< bool > &data) |
|
template<> |
| std::vector< bool > | ReadLogImpl (nt::Subscriber *sub) |
|
|
static units::millisecond_t | GetLoggingTime () |
|
static constexpr Loggable & | GetRoot () |
|
static constexpr units::millisecond_t | LOOP_PERIOD = frc::TimedRobot::kDefaultPeriod / 2 |
| virtual void | OnLoggingStart () |
| | Hook invoked when logging is started for this object.
|
| virtual void | LoggablePeriodic () |
| | Periodic callback for logging updates.
|
| std::function< double()> | sensorLambda |
| | Lambda function to fetch sensor data.
|
| std::function< double(double)> | postProcessor |
| | Lambda function to post-process sensor data.
|
| double | prevState |
| | Previous and current sensor states.
|
|
double | currState |
Represents a processed analog controller input.
AnalogValue wraps a raw controller axis and provides optional:
- Deadband processing
- Polynomial scaling
- Moving-average filtering
This class inherits from BaseSensor<double> to integrate with the sensor abstraction framework