|
YAMS
Yet Another Mechanism System
|
#include <SwerveInputStreamTelemetry.hpp>
Public Types | |
| using | TelemetryVerbosity = SwerveDriveConfig::TelemetryVerbosity |
Public Member Functions | |
| SwerveInputStreamTelemetry (SwerveInputStream< NumModules > &stream, std::string_view name, TelemetryVerbosity verbosity) | |
| SwerveInputStreamTelemetry (const SwerveInputStreamTelemetry &)=delete | |
| SwerveInputStreamTelemetry & | operator= (const SwerveInputStreamTelemetry &)=delete |
| ~SwerveInputStreamTelemetry () | |
| void | UpdateTelemetry () |
| void | ApplyTuningValues () |
| std::optional< std::reference_wrapper< wpi::cmd::Command > > | GetLiveTuningCommand () |
Telemetry and live tuning for a SwerveInputStream, created by SwerveInputStream::WithTelemetry(name, verbosity) and published every time the stream is read.
While live tuning, values stay in sync both ways: a dashboard edit is applied to the stream, and a change made in code, e.g. a binding that changes the translation scale, is published to the dashboard. Invalid dashboard values are replaced with the stream's current value.
The stream owns its telemetry and creates it when first read, so the telemetry never outlives the stream or follows it to a new address.
| using yams::mechanisms::swerve::utility::SwerveInputStreamTelemetry< NumModules >::TelemetryVerbosity = SwerveDriveConfig::TelemetryVerbosity |
|
inline |
Publish telemetry for a SwerveInputStream. Use SwerveInputStream::WithTelemetry rather than creating this directly.
| stream | The SwerveInputStream to monitor and tune. Must outlive this object. |
| name | Name of the stream in NetworkTables (e.g., "drive"). |
| verbosity | TelemetryVerbosity to publish at. |
|
delete |
|
inline |
Stop publishing, canceling and removing the "Live Tuning" command.
|
inline |
Apply values edited on the dashboard to the stream, and publish changes made to the stream in code. The "Live Tuning" command calls this every loop. Does nothing below HIGH.
|
inline |
The "Live Tuning" command published to the dashboard, which applies dashboard edits while it runs.
|
delete |
|
inline |
Publish the stream's current mode and, at MEDIUM and above, its configuration. Called by SwerveInputStream::Get().