Skip to content

Commit

Permalink
Scriptable autos, vision autos, new trapezoidal motion profile calcul…
Browse files Browse the repository at this point in the history
…ations
  • Loading branch information
VyaasBaskar committed Oct 8, 2024
1 parent cf9b5b9 commit 8304748
Show file tree
Hide file tree
Showing 60 changed files with 6,443 additions and 1,101 deletions.
3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -117,5 +117,6 @@
"queue": "cpp"
},
"wpilib.useWindbgX": true,
"C_Cpp.errorSquiggles": "enabled"
"C_Cpp.errorSquiggles": "enabled",
"wpilib.skipTests": true
}
54 changes: 35 additions & 19 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,16 @@ plugins {

// Define my targets (RoboRIO) and artifacts (deployable files)
deploy {
println "Setting up deploy targets and artifacts..."
targets {
roborio(getTargetTypeClass('RoboRIO')) {
team = project.frc.getTeamNumber()
debug = project.frc.getDebugOrDefault(false)

println "Deploy team # set to ${team}."
println "Debug set to ${debug} (disabled by default).\n"


artifacts {
frcCpp(getArtifactTypeClass('FRCNativeArtifact')) {
}
Expand All @@ -28,22 +33,27 @@ deploy {
def deployArtifact = deploy.targets.roborio.artifacts.frcCpp

// Set this to true to enable desktop support.
def includeDesktopSupport = false
def includeDesktopSupport = true

// Set to true to run simulation in debug mode
wpi.cpp.debugSimulation = true
wpi.cpp.debugSimulation = false

// Default enable simgui
wpi.sim.addGui().defaultEnabled = true
wpi.sim.addGui().defaultEnabled = false
// Enable DS but not by default
wpi.sim.addDriverstation()

model {
components {
frcUserProgram(NativeExecutableSpec) {
println "Configuring frcUserProgram..."
targetPlatform wpi.platforms.roborio
if (includeDesktopSupport) {
targetPlatform wpi.platforms.desktop
binaries.all {
cppCompiler.args << '-DNOMINMAX'
println "Applied compiler argument NOMINMAX to allow for compilation on Windows platform."
}
}

sources.cpp {
Expand Down Expand Up @@ -71,22 +81,28 @@ model {
wpi.cpp.deps.wpilib(it)
}
}
// Uncomment and configure test suites if needed
// testSuites {
// frcUserProgramTest(GoogleTestTestSuiteSpec) {
// testing $.components.frcUserProgram
// sources.cpp {
// source {
// srcDir 'src/test/cpp'
// include '**/*.cpp'
// }
// }
// wpi.cpp.enableExternalTasks(it)
// wpi.cpp.vendor.cpp(it)
// wpi.cpp.deps.wpilib(it)
// wpi.cpp.deps.googleTest(it)
// }
// }

testSuites {
frcUserProgramTest(GoogleTestTestSuiteSpec) {
testing $.components.frcUserProgram

println "Configuring frcUserProgramTest..."
sources.cpp {
source {
srcDir 'src/test/cpp'
include '**/*.cpp'
}
}
binaries.all {
cppCompiler.args << '-DNOMINMAX'
println "Applied compiler argument NOMINMAX to allow for compilation on Windows platform."
}
wpi.cpp.enableExternalTasks(it)
wpi.cpp.vendor.cpp(it)
wpi.cpp.deps.wpilib(it)
wpi.cpp.deps.googleTest(it)
}
}
}

spotless {
Expand Down
Loading

0 comments on commit 8304748

Please sign in to comment.