Skip to content

Commit

Permalink
Prep work for phoenix 6 (#40)
Browse files Browse the repository at this point in the history
* Prep work for phoenix 6

* Fixup

* Lint
  • Loading branch information
pjreiniger authored Jan 2, 2024
1 parent 0fa2136 commit ecd7c42
Show file tree
Hide file tree
Showing 62 changed files with 2,048 additions and 2,110 deletions.
7 changes: 4 additions & 3 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@ bazel_dep(name = "rules_java", version = "6.4.0")
bazel_dep(name = "rules_bazelrio", version = "0.0.13")
bazel_dep(name = "rules_bzlmodrio_toolchains", version = "2024-1")
bazel_dep(name = "rules_pmd", version = "6.43.0")
bazel_dep(name = "bzlmodrio-allwpilib", version = "2024.1.1-beta-1")
bazel_dep(name = "bzlmodrio-navx", version = "2024.0.1-beta-2")
bazel_dep(name = "bzlmodrio-phoenix", version = "5.32.0-beta-1")
bazel_dep(name = "bzlmodrio-allwpilib", version = "2024.1.1-beta-4")
bazel_dep(name = "bzlmodrio-navx", version = "2024.0.1-beta-4")
bazel_dep(name = "bzlmodrio-phoenix", version = "5.32.0-beta-4")
bazel_dep(name = "bzlmodrio-phoenix6", version = "24.0.0-beta-5")
bazel_dep(name = "bzlmodrio-revlib", version = "2024.0.0")

maven = use_extension("@rules_jvm_external//:extensions.bzl", "maven")
Expand Down
3,815 changes: 1,864 additions & 1,951 deletions MODULE.bazel.lock

Large diffs are not rendered by default.

30 changes: 15 additions & 15 deletions build_scripts/base_java.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,13 @@ ext.getCurrentOs = {
}

ext {
wpiVersion = '2024.1.1-beta-2'
wpiVersion = '2024.1.1-beta-4'
opencvYear = '2024'
opencvVersion = '4.8.0-1'
ctreVersion = '5.32.0-beta-1'
ctreSimVersion = "24.0.0-beta-1"
phoenix5Version = '5.32.0-beta-4'
phoenix6Version = "24.0.0-beta-5"
revVersion = '2024.0.0'
navxVersion = '2024.0.1-beta-3'
navxVersion = '2024.0.1-beta-4'

nativeOs = getCurrentOs() + getCurrentArch()
}
Expand All @@ -68,17 +68,17 @@ dependencies {
nativeDesktopZip "edu.wpi.first.wpimath:wpimath-cpp:${wpiVersion}:${nativeOs}@zip"
nativeDesktopZip "edu.wpi.first.thirdparty.frc${opencvYear}.opencv:opencv-cpp:${opencvVersion}:${nativeOs}@zip"

nativeDesktopZip "com.ctre.phoenix.sim:cci-sim:${ctreVersion}:${nativeOs}@zip"

nativeDesktopZip "com.ctre.phoenix6.sim:tools-sim:${ctreSimVersion}:${nativeOs}@zip"
nativeDesktopZip "com.ctre.phoenix6.sim:simTalonSRX:${ctreSimVersion}:${nativeOs}@zip"
nativeDesktopZip "com.ctre.phoenix6.sim:simTalonFX:${ctreSimVersion}:${nativeOs}@zip"
nativeDesktopZip "com.ctre.phoenix6.sim:simVictorSPX:${ctreSimVersion}:${nativeOs}@zip"
nativeDesktopZip "com.ctre.phoenix6.sim:simPigeonIMU:${ctreSimVersion}:${nativeOs}@zip"
nativeDesktopZip "com.ctre.phoenix6.sim:simCANCoder:${ctreSimVersion}:${nativeOs}@zip"
nativeDesktopZip "com.ctre.phoenix6.sim:simProTalonFX:${ctreSimVersion}:${nativeOs}@zip"
nativeDesktopZip "com.ctre.phoenix6.sim:simProCANcoder:${ctreSimVersion}:${nativeOs}@zip"
nativeDesktopZip "com.ctre.phoenix6.sim:simProPigeon2:${ctreSimVersion}:${nativeOs}@zip"
nativeDesktopZip "com.ctre.phoenix.sim:cci-sim:${phoenix5Version}:${nativeOs}@zip"

nativeDesktopZip "com.ctre.phoenix6.sim:tools-sim:${phoenix6Version}:${nativeOs}@zip"
nativeDesktopZip "com.ctre.phoenix6.sim:simTalonSRX:${phoenix6Version}:${nativeOs}@zip"
nativeDesktopZip "com.ctre.phoenix6.sim:simTalonFX:${phoenix6Version}:${nativeOs}@zip"
nativeDesktopZip "com.ctre.phoenix6.sim:simVictorSPX:${phoenix6Version}:${nativeOs}@zip"
nativeDesktopZip "com.ctre.phoenix6.sim:simPigeonIMU:${phoenix6Version}:${nativeOs}@zip"
nativeDesktopZip "com.ctre.phoenix6.sim:simCANCoder:${phoenix6Version}:${nativeOs}@zip"
nativeDesktopZip "com.ctre.phoenix6.sim:simProTalonFX:${phoenix6Version}:${nativeOs}@zip"
nativeDesktopZip "com.ctre.phoenix6.sim:simProCANcoder:${phoenix6Version}:${nativeOs}@zip"
nativeDesktopZip "com.ctre.phoenix6.sim:simProPigeon2:${phoenix6Version}:${nativeOs}@zip"

nativeDesktopZip "com.revrobotics.frc:REVLib-driver:${revVersion}:${nativeOs}@zip"
}
Expand Down
6 changes: 3 additions & 3 deletions build_scripts/bazel/deps/activate_dependencies.bzl
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
load("@bzlmodrio//:bzlmodrio_setup.bzl", "bzlmodrio_setup", "get_bzlmodrio_java_dependencies")
load("@bzlmodrio//private/non_bzlmod:setup_dependencies.bzl", "get_java_dependencies", "setup_dependencies")
load("@rules_jvm_external//:defs.bzl", "maven_install")

def activate_dependencies():
jupiter_version = "5.6.1"
platform_version = "1.6.1"

bzlmodrio_setup()
setup_dependencies()

maven_artifacts, maven_repositories = get_bzlmodrio_java_dependencies()
maven_artifacts, maven_repositories = get_java_dependencies()
maven_artifacts += [
"org.junit.jupiter:junit-jupiter-api:" + jupiter_version,
"org.junit.jupiter:junit-jupiter-params:" + jupiter_version,
Expand Down
6 changes: 3 additions & 3 deletions build_scripts/bazel/deps/download_external_archives.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ def download_external_archives():
# Download bzlmodRio <3
http_archive(
name = "bzlmodrio",
url = "https://github.com/bzlmodRio/bzlmodRio/archive/452decb66e79e43ed43e4debbf5d9849ecf6275f.tar.gz",
sha256 = "6ca2fbcf33da8e769587fb87a8da7736c5088ab0ac1ab4735a99914e5e5fbeda",
strip_prefix = "bzlmodRio-452decb66e79e43ed43e4debbf5d9849ecf6275f",
url = "https://github.com/bzlmodRio/bzlmodRio/archive/03b41cfcece36d7bcbb984a441803f99f3641e2e.tar.gz",
sha256 = "c9aae913cd118e79df1b4e9d1387d50f7e47e116330cc281c39e6c0089d3b09d",
strip_prefix = "bzlmodRio-03b41cfcece36d7bcbb984a441803f99f3641e2e",
)
# native.local_repository(
# name = "bzlmodrio",
Expand Down
68 changes: 41 additions & 27 deletions build_scripts/bazel/deps/maven_install.json
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
{
"__AUTOGENERATED_FILE_DO_NOT_MODIFY_THIS_FILE_MANUALLY": "THERE_IS_NO_DATA_ONLY_ZUUL",
"__INPUT_ARTIFACTS_HASH": -1965317510,
"__RESOLVED_ARTIFACTS_HASH": -1467967604,
"__INPUT_ARTIFACTS_HASH": -858297645,
"__RESOLVED_ARTIFACTS_HASH": -450393126,
"artifacts": {
"com.fasterxml.jackson.core:jackson-annotations": {
"shasums": {
"jar": "f6aa3706a875689b66cdac3334f65dfdb795ccfad4117bf072893b196ed1ec8e"
"jar": "04e21f94dcfee4b078fa5a5f53047b785aaba69d19de392f616e7a7fe5d3882f"
},
"version": "2.12.4"
"version": "2.15.2"
},
"com.fasterxml.jackson.core:jackson-core": {
"shasums": {
"jar": "3506ce47ec2604ae2d80d79505f7cb374f718060639415c07d144adadd2d68a3"
"jar": "303c99e82b1faa91a0bae5d8fbeb56f7e2adf9b526a900dd723bf140d62bd4b4"
},
"version": "2.12.4"
"version": "2.15.2"
},
"com.fasterxml.jackson.core:jackson-databind": {
"shasums": {
"jar": "e99a7b4b89074bc689aabcd9eb1f2c1318b68cc5c34979daf3e34edc558c7a01"
"jar": "0eb2fdad6e40ab8832a78c9b22f58196dd970594e8d3d5a26ead87847c4f3a96"
},
"version": "2.12.4"
"version": "2.15.2"
},
"org.apiguardian:apiguardian-api": {
"shasums": {
Expand All @@ -29,51 +29,51 @@
},
"org.ejml:ejml-cdense": {
"shasums": {
"jar": "ad06ef87a0e1b4b8152ebcbf8fa204a17a394b7cb0625c9b36f78181590ff907"
"jar": "20c96f2b25facf9014c46c6d0e0139e2c1bbec7954411e9eb1b4c53ef7eaef6d"
},
"version": "0.41"
"version": "0.43.1"
},
"org.ejml:ejml-core": {
"shasums": {
"jar": "8d36469e8414d79c875defc0af3b980525d384761c9471d15a4f365b936dd1d5"
"jar": "04136b8fabedf92c218914da3a837e27ba0aefbf924444d2aac243f77dbf208d"
},
"version": "0.41"
"version": "0.43.1"
},
"org.ejml:ejml-ddense": {
"shasums": {
"jar": "355347e9cac7e96d5d724d331a9b04bb14a8a02e1d111f1ac51c79f25d937123"
"jar": "bb3d00c111868673d35f1aca24de7fe72b970c47dc44295f510684b2be6eb7ce"
},
"version": "0.41"
"version": "0.43.1"
},
"org.ejml:ejml-dsparse": {
"shasums": {
"jar": "278dbe323a3218697d687243da1a2ff0c88800825ebba02388274542519641ed"
"jar": "5b15d7d06e88d0384ed40358127f3358cab462ad4d273da1763e9f5282ad27e1"
},
"version": "0.41"
"version": "0.43.1"
},
"org.ejml:ejml-fdense": {
"shasums": {
"jar": "0ec25b3bcd950c2ce1c7d5389f958e5507ebf9f4c7a209a2b4236a73740aa98e"
"jar": "67dc4bebaa52a9864c2028ad150444a22227792a712bbc13f5d0c1ebe836b029"
},
"version": "0.41"
"version": "0.43.1"
},
"org.ejml:ejml-fsparse": {
"shasums": {
"jar": "8ddb3bfa0de174c16e57b7b08b60d0f324a4f99e574033c4fc77508e2516ce41"
"jar": "23ef080a75893f7d1b0b2f16bd937ddbc4199a2999c246d905a55663a4d54a91"
},
"version": "0.41"
"version": "0.43.1"
},
"org.ejml:ejml-simple": {
"shasums": {
"jar": "f8989a6df897b32789d2bc590c7ddc020c8e269180150322c1e812522fce96a7"
"jar": "348acd004027e1e0719b76cac6432d368640489eb3d619508275fd37373acb0d"
},
"version": "0.41"
"version": "0.43.1"
},
"org.ejml:ejml-zdense": {
"shasums": {
"jar": "5d44c52c24e2d6e702c2f5f775707f62a71055fdbc655da21389beca4427c3f9"
"jar": "dc47e7395fb7dd3652f0f2e82566f193824ba3762fc709487e03d76bba13e070"
},
"version": "0.41"
"version": "0.43.1"
},
"org.junit.jupiter:junit-jupiter-api": {
"shasums": {
Expand Down Expand Up @@ -134,6 +134,12 @@
"jar": "58812de60898d976fb81ef3b62da05c6604c18fd4a249f5044282479fc286af2"
},
"version": "1.2.0"
},
"us.hebi.quickbuf:quickbuf-runtime": {
"shasums": {
"jar": "6b78e77b7691a8ecfc67fa7ae275dc02770c9172293852c3d60a220a541997fe"
},
"version": "1.3.2"
}
},
"dependencies": {
Expand Down Expand Up @@ -220,6 +226,8 @@
"com.fasterxml.jackson.core.filter",
"com.fasterxml.jackson.core.format",
"com.fasterxml.jackson.core.io",
"com.fasterxml.jackson.core.io.doubleparser",
"com.fasterxml.jackson.core.io.schubfach",
"com.fasterxml.jackson.core.json",
"com.fasterxml.jackson.core.json.async",
"com.fasterxml.jackson.core.sym",
Expand Down Expand Up @@ -248,7 +256,8 @@
"com.fasterxml.jackson.databind.ser.impl",
"com.fasterxml.jackson.databind.ser.std",
"com.fasterxml.jackson.databind.type",
"com.fasterxml.jackson.databind.util"
"com.fasterxml.jackson.databind.util",
"com.fasterxml.jackson.databind.util.internal"
],
"org.apiguardian:apiguardian-api": [
"org.apiguardian.api"
Expand Down Expand Up @@ -470,6 +479,9 @@
],
"org.opentest4j:opentest4j": [
"org.opentest4j"
],
"us.hebi.quickbuf:quickbuf-runtime": [
"us.hebi.quickbuf"
]
},
"repositories": {
Expand All @@ -495,7 +507,8 @@
"org.junit.platform:junit-platform-launcher",
"org.junit.platform:junit-platform-reporting",
"org.junit.platform:junit-platform-suite-api",
"org.opentest4j:opentest4j"
"org.opentest4j:opentest4j",
"us.hebi.quickbuf:quickbuf-runtime"
],
"https://frcmaven.wpi.edu/release/": [
"com.fasterxml.jackson.core:jackson-annotations",
Expand All @@ -519,7 +532,8 @@
"org.junit.platform:junit-platform-launcher",
"org.junit.platform:junit-platform-reporting",
"org.junit.platform:junit-platform-suite-api",
"org.opentest4j:opentest4j"
"org.opentest4j:opentest4j",
"us.hebi.quickbuf:quickbuf-runtime"
]
},
"version": "2"
Expand Down
11 changes: 6 additions & 5 deletions build_scripts/bazel/deps/setup_dependencies.bzl
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
load("@bzlmodrio//:bzlmodrio_dependencies.bzl", "bzlmodrio_dependencies")
load("@bzlmodrio//private/non_bzlmod:download_dependencies.bzl", "download_dependencies")

def setup_dependencies():
bzlmodrio_dependencies(
download_dependencies(
# toolchain_versions = "2024-1",
allwpilib_version = "2024.1.1-beta-1",
allwpilib_version = "2024.1.1-beta-4",
# ni_version = "2024.1.1",
# opencv_version = "2024.4.8.0-1",
revlib_version = "2024.0.0",
phoenix_version = "5.32.0-beta-1",
navx_version = "2024.0.1-beta-2",
phoenix_version = "5.32.0-beta-4",
phoenix6_version = "24.0.0-beta-5",
navx_version = "2024.0.1-beta-4",
# imgui_version = None,
# libssh_version = None,
)
7 changes: 5 additions & 2 deletions examples/create_standalone_projects.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def run():

projects = []
projects.append(ExampleConfig("rev", "Rev", ["navx_frc.json", "REVLib.json"]))
projects.append(ExampleConfig("ctre", "Ctre", ["Phoenix.json"]))
projects.append(ExampleConfig("phoenix5", "Phoenix5", ["Phoenix.json"]))
projects.append(ExampleConfig("wpi", "Wpi", []))
projects.append(
ExampleConfig(
Expand All @@ -33,7 +33,10 @@ def run():
)
projects.append(
ExampleConfig(
"ctre_swerve", "CtreSwerve", ["Phoenix.json"], "test_robot_base_swerve"
"phoenix5_swerve",
"Phoenix5Swerve",
["Phoenix.json"],
"test_robot_base_swerve",
)
)
projects.append(
Expand Down
1 change: 1 addition & 0 deletions examples/test_robot_base/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ apply from: "${rootDir}/build_scripts/base_java.gradle"

dependencies {
implementation wpilibTools.deps.wpilibJava("wpilibj")
implementation wpilibTools.deps.wpilibJava("wpiunits")
implementation wpilibTools.deps.wpilibJava("wpimath")
implementation wpilibTools.deps.wpilibJava("hal")
implementation wpilibTools.deps.wpilibJava("ntcore")
Expand Down
1 change: 1 addition & 0 deletions examples/test_robot_base_swerve/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ ext.baseId = "test_robot_base_swerve"
apply from: "${rootDir}/build_scripts/base_java.gradle"
dependencies {

implementation wpilibTools.deps.wpilibJava("wpiunits")
implementation wpilibTools.deps.wpilibJava("wpimath")
implementation wpilibTools.deps.wpilibJava("hal")
implementation wpilibTools.deps.wpilibJava("wpiutil")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ snobot_sim_java_library(
),
visibility = [
"//examples/test_robot_base_swerve:__subpackages__",
"//examples/test_robot_ctre_swerve:__subpackages__",
"//examples/test_robot_phoenix5_swerve:__subpackages__",
"//examples/test_robot_rev_swerve:__subpackages__",
],
deps = [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ snobot_sim_java_library(
),
visibility = [
"//examples/test_robot_base_swerve:__subpackages__",
"//examples/test_robot_ctre_swerve:__subpackages__",
"//examples/test_robot_phoenix5_swerve:__subpackages__",
"//examples/test_robot_rev_swerve:__subpackages__",
],
deps = [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ snobot_sim_java_library(
),
visibility = [
"//examples/test_robot_base_swerve:__subpackages__",
"//examples/test_robot_ctre_swerve:__subpackages__",
"//examples/test_robot_phoenix5_swerve:__subpackages__",
"//examples/test_robot_rev_swerve:__subpackages__",
],
deps = [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ snobot_sim_java_library(
),
visibility = [
"//examples/test_robot_base_swerve:__subpackages__",
"//examples/test_robot_ctre_swerve:__subpackages__",
"//examples/test_robot_phoenix5_swerve:__subpackages__",
"//examples/test_robot_rev_swerve:__subpackages__",
],
deps = [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ snobot_sim_java_library(
),
visibility = [
"//examples/test_robot_base_swerve:__subpackages__",
"//examples/test_robot_ctre_swerve:__subpackages__",
"//examples/test_robot_phoenix5_swerve:__subpackages__",
"//examples/test_robot_rev_swerve:__subpackages__",
],
deps = [
Expand Down
4 changes: 2 additions & 2 deletions examples/test_robot_catchall/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ dependencies {
implementation wpilibTools.deps.wpilibJava("wpilibNewCommands")

implementation "com.kauailabs.navx.frc:navx-frc-java:${navxVersion}"
implementation "com.ctre.phoenix:api-java:${ctreVersion}"
implementation "com.ctre.phoenix:wpiapi-java:${ctreVersion}"
implementation "com.ctre.phoenix:api-java:${phoenix5Version}"
implementation "com.ctre.phoenix:wpiapi-java:${phoenix5Version}"
implementation "com.revrobotics.frc:REVLib-java:${revVersion}"
implementation project(":snobot_sim_java")

Expand Down
9 changes: 0 additions & 9 deletions examples/test_robot_ctre/BUILD.bazel

This file was deleted.

9 changes: 0 additions & 9 deletions examples/test_robot_ctre_swerve/BUILD.bazel

This file was deleted.

9 changes: 9 additions & 0 deletions examples/test_robot_phoenix5/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
alias(
name = "test_robot_phoenix5",
actual = "//examples/test_robot_phoenix5/src/main/java/org/snobotv2/examples/phoenix5:Main",
)

alias(
name = "sim",
actual = "//examples/test_robot_phoenix5/src/main/java/org/snobotv2/examples/phoenix5:Main.sim",
)
Loading

0 comments on commit ecd7c42

Please sign in to comment.