SwerveModule created

This commit is contained in:
aarav18
2023-01-13 18:59:50 -07:00
parent caf45c1431
commit fcd0765a95
2 changed files with 57 additions and 0 deletions
@@ -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;
@@ -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
}
}