Class SwerveDriveTelemetry
java.lang.Object
yams.core.telemetry.SwerveDriveTelemetry
Publishes
SwerveDrive telemetry to NetworkTables and DataLog, and applies live tuning values.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumBoolean telemetry field forSwerveDrives.static enumDouble telemetry field forSwerveDrives.static enumStruct array telemetry field forSwerveDrives.static enumStruct telemetry field forSwerveDrives. -
Constructor Summary
ConstructorsConstructorDescriptionCreate SwerveDrive telemetry for logging in NetworkTables and DataLog. -
Method Summary
Modifier and TypeMethodDescriptionvoidapplyTuningValues(SwerveDrive drive) Apply the tuning values fromNetworkTableto theSwerveDrivevoidclose()Close and unpublish telemetry.voidpublish(SwerveDrive drive) Publish telemetry to NetworkTables and DataLogvoidsetupTelemetry(SwerveDrive drive) Setup telemetry for the drive.voidstopTuning(SwerveDrive drive) Stop applying a tuning voltage, as when the tuning command ends, and hold every wheel still where it is with its closed loop controller.
-
Constructor Details
-
SwerveDriveTelemetry
Create SwerveDrive telemetry for logging in NetworkTables and DataLog.- Parameters:
config-SwerveDriveTelemetryConfigselecting what to publish.
-
-
Method Details
-
setupTelemetry
Setup telemetry for the drive.- Parameters:
drive-SwerveDriveto use for telemetry.
-
publish
Publish telemetry to NetworkTables and DataLog- Parameters:
drive-SwerveDriveto publish telemetry from.
-
applyTuningValues
Apply the tuning values fromNetworkTableto theSwerveDrive- Parameters:
drive-SwerveDriveto control.- Throws:
IllegalStateException- if auto-align is enabled and a gyro angular velocity scale factor is configured withSwerveDriveConfig.withGyroAngularVelocityScaleFactor(double)but no gyro supplier was set withSwerveDriveConfig.withGyro(java.util.function.Supplier).
-
stopTuning
Stop applying a tuning voltage, as when the tuning command ends, and hold every wheel still where it is with its closed loop controller.- Parameters:
drive-SwerveDrivebeing tuned.
-
close
public void close()Close and unpublish telemetry.
-