Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/pullgompeilib.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:

jobs:
sync:
uses: Team-190/CI-Workflows/.github/workflows/syncgompeilib.yml@main
uses: Team-190/CI-Workflows/.github/workflows/syncgompeilib.yaml@main
with:
direction: pull
secrets:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pushgompeilib.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:

jobs:
sync:
uses: Team-190/CI-Workflows/.github/workflows/syncgompeilib.yml@main
uses: Team-190/CI-Workflows/.github/workflows/syncgompeilib.yaml@main
with:
direction: push
secrets:
Expand Down
22 changes: 0 additions & 22 deletions advantagescope_assets/Robot_Delta/config.json

This file was deleted.

Binary file removed advantagescope_assets/Robot_Delta/model_6.glb
Binary file not shown.
142 changes: 142 additions & 0 deletions advantagescope_assets/Robot_Turnover/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,142 @@
{
"name": "Turnover",
"sourceUrl": "https://frc190.onshape.com/documents/ba8a365713d40fc24cf0b54f/w/90379dd84e9a15f2f3a15787/e/f7562994bcc6d5175e8e4e30",
"disableSimplification": true,
"rotations": [
{
"axis": "x",
"degrees": 90
},
{
"axis": "z",
"degrees": 90
}
],
"position": [
0,
0,
0
],
"cameras": [],
"components": [
{
"zeroedRotations": [
{
"axis": "x",
"degrees": 90
},
{
"axis": "z",
"degrees": 90
}
],
"zeroedPosition": [
0.017463,
0.163513,
-0.371475
]
},
{
"zeroedRotations": [
{
"axis": "x",
"degrees": 90
},
{
"axis": "z",
"degrees": 90
}
],
"zeroedPosition": [
-0.043168,
0.1635125,
-0.474975
]
},
{
"zeroedRotations": [
{
"axis": "x",
"degrees": 90
},
{
"axis": "z",
"degrees": 90
}
],
"zeroedPosition": [
0.317482,
-0.090043,
-0.477114
]
},
{
"zeroedRotations": [
{
"axis": "x",
"degrees": 90
},
{
"axis": "z",
"degrees": 90
}
],
"zeroedPosition": [
0,
0,
0
]
},
{
"zeroedRotations": [
{
"axis": "x",
"degrees": 90
},
{
"axis": "z",
"degrees": 90
}
],
"zeroedPosition": [
-0.139700,
0,
-0.254000
]
},
{
"zeroedRotations": [
{
"axis": "x",
"degrees": 90
},
{
"axis": "z",
"degrees": 90
}
],
"zeroedPosition": [
0.003638,
0,
-0.335929
]
},
{
"zeroedRotations": [
{
"axis": "x",
"degrees": 90
},
{
"axis": "z",
"degrees": 90
}
],
"zeroedPosition": [
-0.292100,
0,
-0.171450
]
}
]
}
Binary file added advantagescope_assets/Robot_Turnover/model_6.glb
Binary file not shown.
100 changes: 5 additions & 95 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ plugins {
id "com.peterabeles.gversion" version "1.10"
id "io.freefair.lombok" version "8.4"
id "com.diffplug.spotless" version "6.25.0"
id "io.freefair.aspectj.post-compile-weaving" version "8.4"
id "io.freefair.aspectj.post-compile-weaving" version "8.6"
}

ext {
Expand Down Expand Up @@ -111,65 +111,11 @@ deploy {
}
}

def getGompeiVersionFromSource() {
def configFile = file("src/main/java/frc/robot/RobotConfig.java")
if (!configFile.exists()) {
logger.warn("WARNING: No RobotConfig.java class found, falling back to latest GompeiLib package")
return "2026+"
} else {
logger.info("INFO: RobotConfig.java class found")
}

def content = configFile.text

def robotMatcher = content =~ /ROBOT\s*=\s*RobotType\.(\w+);/
if (robotMatcher.find()) {
def activeRobot = robotMatcher.group(1)

def versionMatcher = content =~ /${activeRobot}\("([^"]+)"\)/
if (versionMatcher.find()) {
return versionMatcher.group(1)
}
}
return "0.0.0-SNAPSHOT"
}

def GLibRepoPath = ""

repositories {

def gprUser = project.findProperty("gpr.user")
def gprKey = project.findProperty("gpr.key")

if (!useLocalGompeiLib && gprUser != null && gprKey != null) {
// Use GitHub Packages if credentials exist
exclusiveContent {
forRepository {
maven {
name = "GompeiLibGitHubPackages"
url = uri("https://maven.pkg.github.com/Team-190/GompeiLib")
credentials {
username = gprUser
password = gprKey
}
}
}
filter {
includeGroup "edu.wpi.team190"
}
}
def gompeiLibVersion = getGompeiVersionFromSource()
GLibRepoPath = "edu.wpi.team190:gompeilib:${gompeiLibVersion}"
} else {
logger.warn("WARNING: Using local GompeiLib build.")

mavenLocal()
GLibRepoPath = "edu.wpi.team190:gompeilib:0.0.0-SNAPSHOT"
}
mavenCentral()
}

// Grab the roboRIO comment via SSH

import com.jcraft.jsch.JSch
import edu.wpi.first.gradlerio.GradleRIOPlugin
import groovy.json.JsonSlurper
Expand Down Expand Up @@ -328,12 +274,12 @@ dependencies {
implementation 'org.jgrapht:jgrapht-core:1.5.1'
implementation 'org.jgrapht:jgrapht-io:1.5.1'


implementation GLibRepoPath
// This is required for the @Tracer annotations to work at runtime
implementation 'org.aspectj:aspectjrt:1.9.21'
implementation 'org.aspectj:aspectjtools:1.9.21'
aspect GLibRepoPath

implementation project(':gompeilib')
aspect project(':gompeilib')

roborioRelease wpi.java.deps.wpilibJniRelease(wpi.platforms.roborio)
roborioRelease wpi.java.vendor.jniRelease(wpi.platforms.roborio)
Expand Down Expand Up @@ -476,39 +422,3 @@ spotless {
endWithNewline()
}
}

tasks.register('appendBuildVersion') {
doLast {
def src = useLocalGompeiLib
? "GompeiLib:local"
: ((project.hasProperty("gpr.user") && project.hasProperty("gpr.key"))
? "GompeiLib:github-packages"
: "GompeiLib:jitpack")

def dep = configurations.detachedConfiguration(
dependencies.create(GLibRepoPath)
).resolvedConfiguration.firstLevelModuleDependencies.find {
it.moduleName == "gompeilib"
}

def ver = dep?.moduleVersion ?: "unknown"
"${src}:${ver}"
def outFile = file("src/main/java/frc/robot/BuildConstants.java")
if (!outFile.exists()) throw new GradleException("BuildConstants.java not found. Run gversion first.")

def contents = outFile.text

// Replace existing VERSION field if present, otherwise append before last brace
if (contents =~ /public static final String VERSION\s*=\s*".*";/) {
contents = contents.replaceFirst(/public static final String VERSION\s*=\s*".*";/,
"public static final String VERSION = \"${src}:${ver}\";")
} else {
contents = contents.replaceFirst(/\}\s*$/, " public static final String VERSION = \"${src}:${ver}\";\n}")
}

outFile.text = contents
println "VERSION field set to ${src}:${ver}"
}
}

createVersionFile.finalizedBy appendBuildVersion
Loading
Loading