Skip to content

Commit

Permalink
Bump edu.wpi.first.GradleRIO from 2023.4.3 to 2024.1.1 (#66)
Browse files Browse the repository at this point in the history
* Bump edu.wpi.first.GradleRIO from 2023.4.3 to 2024.1.1

Bumps edu.wpi.first.GradleRIO from 2023.4.3 to 2024.1.1.

---
updated-dependencies:
- dependency-name: edu.wpi.first.GradleRIO
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by:  Isaac Turner <spacey_sooty@outlook.com>

* revlib 2024

* bump pheonix

* add phoenix 6

* migrated to phoenix 6

* ran wpiformat

---------

Signed-off-by:  Isaac Turner <spacey_sooty@outlook.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Isaac Turner <spacey_sooty@outlook.com>
  • Loading branch information
dependabot[bot] and spacey-sooty authored Jan 11, 2024
1 parent a71ee32 commit ae2486d
Show file tree
Hide file tree
Showing 12 changed files with 808 additions and 1,066 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
plugins {
id "cpp"
id "google-test-test-suite"
id "edu.wpi.first.GradleRIO" version "2023.4.3"
id "edu.wpi.first.GradleRIO" version "2024.1.1"
}

// Define my targets (RoboRIO) and artifacts (deployable files)
Expand Down
51 changes: 29 additions & 22 deletions src/main/include/RobotMap.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@

#pragma once

#include <ctre/Phoenix.h>
#include <ctre/phoenix/motorcontrol/can/WPI_TalonFX.h>
#include <frc/Compressor.h>
#include <frc/DoubleSolenoid.h>
#include <frc/XboxController.h>
Expand All @@ -15,6 +13,10 @@

#include <string>

#include <ctre/phoenix6/CANcoder.hpp>
#include <ctre/phoenix6/Pigeon2.hpp>
#include <ctre/phoenix6/TalonFX.hpp>

#include "Wombat.h"

struct RobotMap {
Expand All @@ -26,18 +28,23 @@ struct RobotMap {
Controllers controllers;

struct SwerveBase {
CANCoder frontLeftCancoder{19};
CANCoder frontRightCancoder{17};
CANCoder backLeftCancoder{16};
CANCoder backRightCancoder{18};
ctre::phoenix6::hardware::CANcoder frontLeftCancoder{19};
ctre::phoenix6::hardware::CANcoder frontRightCancoder{17};
ctre::phoenix6::hardware::CANcoder backLeftCancoder{16};
ctre::phoenix6::hardware::CANcoder backRightCancoder{18};

WPI_Pigeon2* gyro = new WPI_Pigeon2(20, "Drivebase");
wpi::array<WPI_TalonFX*, 4> turnMotors{
new WPI_TalonFX(7, "Drivebase"), new WPI_TalonFX(5, "Drivebase"),
new WPI_TalonFX(1, "Drivebase"), new WPI_TalonFX(3, "Drivebase")};
wpi::array<WPI_TalonFX*, 4> driveMotors{
new WPI_TalonFX(9, "Drivebase"), new WPI_TalonFX(6, "Drivebase"),
new WPI_TalonFX(2, "Drivebase"), new WPI_TalonFX(4, "Drivebase")};
ctre::phoenix6::hardware::Pigeon2* gyro =
new ctre::phoenix6::hardware::Pigeon2(20, "Drivebase");
wpi::array<ctre::phoenix6::hardware::TalonFX*, 4> turnMotors{
new ctre::phoenix6::hardware::TalonFX(7, "Drivebase"),
new ctre::phoenix6::hardware::TalonFX(5, "Drivebase"),
new ctre::phoenix6::hardware::TalonFX(1, "Drivebase"),
new ctre::phoenix6::hardware::TalonFX(3, "Drivebase")};
wpi::array<ctre::phoenix6::hardware::TalonFX*, 4> driveMotors{
new ctre::phoenix6::hardware::TalonFX(9, "Drivebase"),
new ctre::phoenix6::hardware::TalonFX(6, "Drivebase"),
new ctre::phoenix6::hardware::TalonFX(2, "Drivebase"),
new ctre::phoenix6::hardware::TalonFX(4, "Drivebase")};

wpi::array<wom::SwerveModuleConfig, 4> moduleConfigs{
wom::SwerveModuleConfig{
Expand Down Expand Up @@ -124,15 +131,15 @@ struct RobotMap {
{0.9, 0.9, 0.9}};

// current limiting and setting idle mode of modules to brake mode
SwerveBase() {
for (size_t i = 0; i < 4; i++) {
turnMotors[i]->ConfigSupplyCurrentLimit(
SupplyCurrentLimitConfiguration(true, 15, 15, 0));
driveMotors[i]->SetNeutralMode(NeutralMode::Brake);
turnMotors[i]->SetNeutralMode(NeutralMode::Brake);
driveMotors[i]->SetInverted(true);
}
}
// SwerveBase() {
// for (size_t i = 0; i < 4; i++) {
// turnMotors[i]->ConfigSupplyCurrentLimit(
// SupplyCurrentLimitConfiguration(true, 15, 15, 0));
// driveMotors[i]->SetNeutralMode(NeutralMode::Brake);
// turnMotors[i]->SetNeutralMode(NeutralMode::Brake);
// driveMotors[i]->SetInverted(true);
// }
//}
};
SwerveBase swerveBase;
};
Loading

0 comments on commit ae2486d

Please sign in to comment.