Class SwerveModuleTelemetry

java.lang.Object
yams.core.telemetry.SwerveModuleTelemetry

public class SwerveModuleTelemetry extends Object
Swerve module telemetry.

Publishes the module's raw absolute encoder angle (without offsets applied) and current SwerveModuleVelocity to NetworkTables and/or a WPILib DataLog, and wires the drive/azimuth SmartMotorControllers' own telemetry under the same module subtable.

This class is managed internally by SwerveModule. You do not normally instantiate it directly; instead configure telemetry through SwerveModuleConfig.withTelemetry(String, SwerveModuleTelemetryConfig) or SwerveModuleConfig.withTelemetry(String, yams.core.telemetry.enums.TelemetryVerbosity) before constructing the module.

  • Constructor Details

  • Method Details

    • setupTelemetry

      public void setupTelemetry(String mechName, SwerveModule module)
      Setup telemetry for the module.
      Parameters:
      mechName - Telemetry name of the parent SwerveDrive.
      module - SwerveModule to use for telemetry.
    • publish

      public void publish(SwerveModule module)
      Publish telemetry to NetworkTables and DataLog.
      Parameters:
      module - SwerveModule to publish telemetry from.
    • close

      public void close()
      Close and unpublish telemetry.