[wpiutil] Remove type param from ProtobufSerializable and StructSerializable (#6122)

This commit is contained in:
Joseph Eng
2023-12-31 14:36:11 -08:00
committed by GitHub
parent c34debe012
commit 938bf45fd9
27 changed files with 32 additions and 56 deletions

View File

@@ -30,8 +30,7 @@ import edu.wpi.first.util.struct.StructSerializable;
* component because it can never move sideways. Holonomic drivetrains such as swerve and mecanum
* will often have all three components.
*/
public class ChassisSpeeds
implements ProtobufSerializable<ChassisSpeeds>, StructSerializable<ChassisSpeeds> {
public class ChassisSpeeds implements ProtobufSerializable, StructSerializable {
/** Velocity along the x-axis. (Fwd is +) */
public double vxMetersPerSecond;

View File

@@ -26,8 +26,8 @@ import edu.wpi.first.util.struct.StructSerializable;
*/
public class DifferentialDriveKinematics
implements Kinematics<DifferentialDriveWheelSpeeds, DifferentialDriveWheelPositions>,
ProtobufSerializable<DifferentialDriveKinematics>,
StructSerializable<DifferentialDriveKinematics> {
ProtobufSerializable,
StructSerializable {
public final double trackWidthMeters;
public static final DifferentialDriveKinematicsProto proto =

View File

@@ -15,9 +15,7 @@ import edu.wpi.first.util.protobuf.ProtobufSerializable;
import edu.wpi.first.util.struct.StructSerializable;
/** Represents the wheel speeds for a differential drive drivetrain. */
public class DifferentialDriveWheelSpeeds
implements ProtobufSerializable<DifferentialDriveWheelSpeeds>,
StructSerializable<DifferentialDriveWheelSpeeds> {
public class DifferentialDriveWheelSpeeds implements ProtobufSerializable, StructSerializable {
/** Speed of the left side of the robot. */
public double leftMetersPerSecond;

View File

@@ -36,8 +36,8 @@ import org.ejml.simple.SimpleMatrix;
*/
public class MecanumDriveKinematics
implements Kinematics<MecanumDriveWheelSpeeds, MecanumDriveWheelPositions>,
ProtobufSerializable<MecanumDriveKinematics>,
StructSerializable<MecanumDriveKinematics> {
ProtobufSerializable,
StructSerializable {
private final SimpleMatrix m_inverseKinematics;
private final SimpleMatrix m_forwardKinematics;

View File

@@ -17,8 +17,8 @@ import java.util.Objects;
public class MecanumDriveWheelPositions
implements WheelPositions<MecanumDriveWheelPositions>,
ProtobufSerializable<MecanumDriveWheelPositions>,
StructSerializable<MecanumDriveWheelPositions> {
ProtobufSerializable,
StructSerializable {
/** Distance measured by the front left wheel. */
public double frontLeftMeters;

View File

@@ -14,9 +14,7 @@ import edu.wpi.first.units.Velocity;
import edu.wpi.first.util.protobuf.ProtobufSerializable;
import edu.wpi.first.util.struct.StructSerializable;
public class MecanumDriveWheelSpeeds
implements ProtobufSerializable<MecanumDriveWheelSpeeds>,
StructSerializable<MecanumDriveWheelSpeeds> {
public class MecanumDriveWheelSpeeds implements ProtobufSerializable, StructSerializable {
/** Speed of the front left wheel. */
public double frontLeftMetersPerSecond;

View File

@@ -21,8 +21,8 @@ import java.util.Objects;
public class SwerveModulePosition
implements Comparable<SwerveModulePosition>,
Interpolatable<SwerveModulePosition>,
ProtobufSerializable<SwerveModulePosition>,
StructSerializable<SwerveModulePosition> {
ProtobufSerializable,
StructSerializable {
/** Distance measured by the wheel of the module. */
public double distanceMeters;

View File

@@ -18,9 +18,7 @@ import java.util.Objects;
/** Represents the state of one swerve module. */
public class SwerveModuleState
implements Comparable<SwerveModuleState>,
ProtobufSerializable<SwerveModuleState>,
StructSerializable<SwerveModuleState> {
implements Comparable<SwerveModuleState>, ProtobufSerializable, StructSerializable {
/** Speed of the wheel of the module. */
public double speedMetersPerSecond;