Class SwerveInputStreamTelemetry

java.lang.Object
yams.commands3.telemetry.SwerveInputStreamTelemetry
All Implemented Interfaces:
AutoCloseable

public class SwerveInputStreamTelemetry extends Object implements AutoCloseable
Telemetry and live tuning for a SwerveInputStream, created by SwerveInputStream.withTelemetry(String, TelemetryVerbosity) and published every time the stream is read.
  • TelemetryVerbosity.LOW: the current drive mode, under SwerveInputStream/<name>.
  • TelemetryVerbosity.MID: also the stream's configuration (deadband, scales, maximum velocities, cubing, alliance and robot relative), read-only, and the rotation controller's measurement and setpoint under rotationController, in radians in the gyro's frame. Those are what heading, aim and translation only control give the controller, and are NaN while the stream isn't using it.
  • TelemetryVerbosity.HIGH: also editable copies of the configuration under Tuning/SwerveInputStream/<name>, and a Live Tuning command there that applies them to the stream every loop while it runs.

Each value is a SwerveInputStreamTelemetry.DoubleTelemetryField, SwerveInputStreamTelemetry.BooleanTelemetryField or SwerveInputStreamTelemetry.StringTelemetryField, which gives its key and whether it is tunable.

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.