mirror of
https://github.com/Team4388/2023WayOfTheRobot.git
synced 2026-06-09 00:37:59 -06:00
SwerveModule created
This commit is contained in:
@@ -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
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user