Skip to content

Commit

Permalink
Changed motor controller to SparkFlex
Browse files Browse the repository at this point in the history
  • Loading branch information
ProgrammingSR committed Jan 9, 2024
1 parent c677ac3 commit 7eee9bb
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 13 deletions.
14 changes: 7 additions & 7 deletions src/main/java/frc/robot/subsystems/SwerveModule.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@

import com.ctre.phoenix.sensors.CANCoder;
import com.ctre.phoenix.sensors.SensorTimeBase;
import com.revrobotics.CANSparkMax;
import com.revrobotics.CANSparkMax.IdleMode;
import com.revrobotics.CANSparkMaxLowLevel.MotorType;
import com.revrobotics.CANSparkFlex;
import com.revrobotics.CANSparkBase.IdleMode;
import com.revrobotics.CANSparkLowLevel.MotorType;

import edu.wpi.first.math.controller.PIDController;
import edu.wpi.first.math.geometry.Rotation2d;
Expand All @@ -19,8 +19,8 @@

/** Add your docs here. */
public class SwerveModule {
private final CANSparkMax m_driveMotor;
private final CANSparkMax m_turningMotor;
private final CANSparkFlex m_driveMotor;
private final CANSparkFlex m_turningMotor;

private final CANCoder m_turningEncoder;

Expand Down Expand Up @@ -48,8 +48,8 @@ public SwerveModule(
int turningEncoderPort,
boolean driveMotorReversed,
double turningEncoderOffset) {
m_driveMotor = new CANSparkMax(driveMotorPort, MotorType.kBrushless);
m_turningMotor = new CANSparkMax(turningMotorPort, MotorType.kBrushless);
m_driveMotor = new CANSparkFlex(driveMotorPort, MotorType.kBrushless);
m_turningMotor = new CANSparkFlex(turningMotorPort, MotorType.kBrushless);
m_turningEncoder = new CANCoder(turningEncoderPort);

// converts default units to meters per second
Expand Down
13 changes: 7 additions & 6 deletions vendordeps/REVLib.json
Original file line number Diff line number Diff line change
@@ -1,24 +1,25 @@
{
"fileName": "REVLib.json",
"name": "REVLib",
"version": "2023.1.3",
"version": "2024.2.0",
"frcYear": "2024",
"uuid": "3f48eb8c-50fe-43a6-9cb7-44c86353c4cb",
"mavenUrls": [
"https://maven.revrobotics.com/"
],
"jsonUrl": "https://software-metadata.revrobotics.com/REVLib-2023.json",
"jsonUrl": "https://software-metadata.revrobotics.com/REVLib-2024.json",
"javaDependencies": [
{
"groupId": "com.revrobotics.frc",
"artifactId": "REVLib-java",
"version": "2023.1.3"
"version": "2024.2.0"
}
],
"jniDependencies": [
{
"groupId": "com.revrobotics.frc",
"artifactId": "REVLib-driver",
"version": "2023.1.3",
"version": "2024.2.0",
"skipInvalidPlatforms": true,
"isJar": false,
"validPlatforms": [
Expand All @@ -36,7 +37,7 @@
{
"groupId": "com.revrobotics.frc",
"artifactId": "REVLib-cpp",
"version": "2023.1.3",
"version": "2024.2.0",
"libName": "REVLib",
"headerClassifier": "headers",
"sharedLibrary": false,
Expand All @@ -54,7 +55,7 @@
{
"groupId": "com.revrobotics.frc",
"artifactId": "REVLib-driver",
"version": "2023.1.3",
"version": "2024.2.0",
"libName": "REVLibDriver",
"headerClassifier": "headers",
"sharedLibrary": false,
Expand Down

0 comments on commit 7eee9bb

Please sign in to comment.