From 5ba69e1af1695392ea2dbb8f5130d07bb8ea1266 Mon Sep 17 00:00:00 2001 From: Lenny Abbas <56853476+LennyAbbas@users.noreply.github.com> Date: Mon, 17 Jan 2022 12:20:55 -0800 Subject: [PATCH] [examples] Updated type in Java SwerveModule (#3928) Changed turnOutput from var to double in SwerveModule. It doesn't make sense for driveOutput and turnOutput to have different types so they should both be doubles. --- .../swervecontrollercommand/subsystems/SwerveModule.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wpilibjExamples/src/main/java/edu/wpi/first/wpilibj/examples/swervecontrollercommand/subsystems/SwerveModule.java b/wpilibjExamples/src/main/java/edu/wpi/first/wpilibj/examples/swervecontrollercommand/subsystems/SwerveModule.java index fd4c0b702d..3e55e34d8f 100644 --- a/wpilibjExamples/src/main/java/edu/wpi/first/wpilibj/examples/swervecontrollercommand/subsystems/SwerveModule.java +++ b/wpilibjExamples/src/main/java/edu/wpi/first/wpilibj/examples/swervecontrollercommand/subsystems/SwerveModule.java @@ -98,7 +98,7 @@ public class SwerveModule { m_drivePIDController.calculate(m_driveEncoder.getRate(), state.speedMetersPerSecond); // Calculate the turning motor output from the turning PID controller. - final var turnOutput = + final double turnOutput = m_turningPIDController.calculate(m_turningEncoder.get(), state.angle.getRadians()); // Calculate the turning motor output from the turning PID controller.