diff --git a/src/main/java/frc4388/robot/Constants.java b/src/main/java/frc4388/robot/Constants.java index d50cd10..8eb768f 100644 --- a/src/main/java/frc4388/robot/Constants.java +++ b/src/main/java/frc4388/robot/Constants.java @@ -23,6 +23,29 @@ public final class Constants { public static final int SMARTDASHBOARD_UPDATE_FRAME = 2; } + + public static final class SwerveDriveConstants { + public static final class IDs { + public static final int DRIVE_PIGEON_ID = -1; + + public static final int LEFT_FRONT_WHEEL_ID = -1; + public static final int RIGHT_FRONT_WHEEL_ID = -1; + public static final int LEFT_BACK_WHEEL_ID = -1; + public static final int RIGHT_BACK_STEER_ID = -1; + + public static final int LEFT_FRONT_STEER_ID = -1; + public static final int RIGHT_FRONT_STEER_ID = -1; + public static final int LEFT_BACK_STEER_ID = -1; + public static final int RIGHT_BACK_WHEEL_ID = -1; + + public static final int LEFT_FRONT_ENCODER_ID = -1; + public static final int RIGHT_FRONT_ENCODER_ID = -1; + public static final int LEFT_BACK_ENCODER_ID = -1; + public static final int RIGHT_BACK_ENCODER_ID = -1; + } + + + } public static final class LEDConstants { public static final int LED_SPARK_ID = 0; diff --git a/src/main/java/frc4388/robot/subsystems/SwerveModule.java b/src/main/java/frc4388/robot/subsystems/SwerveModule.java new file mode 100644 index 0000000..9867da5 --- /dev/null +++ b/src/main/java/frc4388/robot/subsystems/SwerveModule.java @@ -0,0 +1,34 @@ +// Copyright (c) FIRST and other WPILib contributors. +// Open Source Software; you can modify and/or share it under the terms of +// the WPILib BSD license file in the root directory of this project. + +package frc4388.robot.subsystems; + +import com.ctre.phoenix.motorcontrol.can.TalonFXConfiguration; +import com.ctre.phoenix.motorcontrol.can.WPI_TalonFX; +import com.ctre.phoenix.sensors.CANCoder; + +import edu.wpi.first.wpilibj2.command.SubsystemBase; +import frc4388.robot.Constants.SwerveDriveConstants; + +public class SwerveModule extends SubsystemBase { + private WPI_TalonFX driveMotor; + private WPI_TalonFX angleMotor; + private CANCoder canCoder; + + + /** Creates a new SwerveModule. */ + public SwerveModule(WPI_TalonFX driveMotor, WPI_TalonFX angleMotor, CANCoder canCoder, double offset) { + this.driveMotor = driveMotor; + this.angleMotor = angleMotor; + this.canCoder = canCoder; + + TalonFXConfiguration angleConfig = new TalonFXConfiguration(); + + } + + @Override + public void periodic() { + // This method will be called once per scheduler run + } +}