# SwerveDriveTelemetry
declaration: package: swervelib.telemetry, class: SwerveDriveTelemetry

Package swervelib.telemetry

# Class SwerveDriveTelemetry

java.lang.Object
swervelib.telemetry.SwerveDriveTelemetry

public class SwerveDriveTelemetry extends Object
Telemetry to describe the `SwerveDrive` following frc-web-components. (Which follows AdvantageKit)

## Nested Class Summary

Nested Classes
Modifier and Type
Class
Description
`static enum`
`SwerveDriveTelemetry.TelemetryVerbosity`
Verbosity of telemetry data sent back.

## Field Summary

Fields
Modifier and Type
Field
Description
`static final Alert`
`canIdWarning`
An `Alert` for if the CAN ID is greater than 40.
`static double[]`
`desiredChassisSpeeds`
Describes the desired forward, sideways and angular velocity of the robot.
`static double[]`
`desiredStates`
An array of rotation and velocity values describing the desired state of each swerve module
`static String`
`forwardDirection`
The direction the robot should be facing when the "Robot Rotation" is zero or blank.
`static final Alert`
`i2cLockupWarning`
An `Alert` for if there is an I2C lockup issue on the roboRIO.
`static boolean`
`isSimulation`
State of simulation of the Robot, used to optimize retrieval.
`static double`
`maxAngularVelocity`
The maximum achievable angular velocity of the robot.
`static double`
`maxSpeed`
The maximum achievable speed of the modules, used to adjust the size of the vectors.
`static double[]`
`measuredChassisSpeeds`
The maximum achievable angular velocity of the robot.
`static double[]`
`measuredStates`
An array of rotation and velocity values describing the measured state of each swerve module
`static int`
`moduleCount`
The number of swerve modules
`static double`
`robotRotation`
The robot's current rotation based on odometry or gyro readings
`static String`
`rotationUnit`
The units of the module rotations and robot rotation
`static final Alert`
`serialCommsIssueWarning`
NavX serial comm issue.
`static double`
`sizeFrontBack`
The distance between the front and back modules.
`static double`
`sizeLeftRight`
The distance between the left and right modules.
`static SwerveDriveTelemetry.TelemetryVerbosity`
`verbosity`
The current telemetry verbosity level.
`static double[]`
`wheelLocations`
The number of swerve modules

## Constructor Summary

Constructors
Constructor
Description
`SwerveDriveTelemetry()`

## Method Summary

Modifier and Type
Method
Description
`static void`
`updateData()`
Upload data to smartdashboard

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Field Details

### canIdWarning

public static final Alert canIdWarning
An `Alert` for if the CAN ID is greater than 40.

### i2cLockupWarning

public static final Alert i2cLockupWarning
An `Alert` for if there is an I2C lockup issue on the roboRIO.

### serialCommsIssueWarning

public static final Alert serialCommsIssueWarning
NavX serial comm issue.

### verbosity

public static SwerveDriveTelemetry.TelemetryVerbosity verbosity
The current telemetry verbosity level.

### isSimulation

public static boolean isSimulation
State of simulation of the Robot, used to optimize retrieval.

### moduleCount

public static int moduleCount
The number of swerve modules

### wheelLocations

public static double[] wheelLocations
The number of swerve modules

### measuredStates

public static double[] measuredStates
An array of rotation and velocity values describing the measured state of each swerve module

### desiredStates

public static double[] desiredStates
An array of rotation and velocity values describing the desired state of each swerve module

### robotRotation

public static double robotRotation
The robot's current rotation based on odometry or gyro readings

### maxSpeed

public static double maxSpeed
The maximum achievable speed of the modules, used to adjust the size of the vectors.

### rotationUnit

public static String rotationUnit
The units of the module rotations and robot rotation

### sizeLeftRight

public static double sizeLeftRight
The distance between the left and right modules.

### sizeFrontBack

public static double sizeFrontBack
The distance between the front and back modules.

### forwardDirection

public static String forwardDirection
The direction the robot should be facing when the "Robot Rotation" is zero or blank. This option is often useful to align with odometry data or match videos. 'up', 'right', 'down' or 'left'

### maxAngularVelocity

public static double maxAngularVelocity
The maximum achievable angular velocity of the robot. This is used to visualize the angular velocity from the chassis speeds properties.

### measuredChassisSpeeds

public static double[] measuredChassisSpeeds
The maximum achievable angular velocity of the robot. This is used to visualize the angular velocity from the chassis speeds properties.

### desiredChassisSpeeds

public static double[] desiredChassisSpeeds
Describes the desired forward, sideways and angular velocity of the robot.

## Constructor Details

### SwerveDriveTelemetry

public SwerveDriveTelemetry()

## Method Details

### updateData

public static void updateData()
Upload data to smartdashboard