mirror of
https://github.com/PhotonVision/photonvision
synced 2026-06-19 00:41:41 +00:00
Update Java Simulation Examples (#913)
Removes apriltagExample and simposeest, replacing them with swervedriveposeestsim --------- Co-authored-by: Matt <matthew.morley.ca@gmail.com>
This commit is contained in:
7
photonlib-cpp-examples/README.md
Normal file
7
photonlib-cpp-examples/README.md
Normal file
@@ -0,0 +1,7 @@
|
||||
## PhotonLib C++ Examples
|
||||
|
||||
### Running examples
|
||||
|
||||
For instructions on how to run these examples locally, see [Running Examples](https://docs.photonvision.org/en/latest/docs/contributing/photonvision/build-instructions.html#running-examples).
|
||||
|
||||
---
|
||||
@@ -27,9 +27,11 @@ spotless {
|
||||
}
|
||||
}
|
||||
|
||||
apply from: "examples.gradle"
|
||||
|
||||
// Task that depends on the build task for every example
|
||||
task buildAllExamples { task ->
|
||||
new File('examples.txt').eachLine { line ->
|
||||
exampleFolderNames.each { line ->
|
||||
task.dependsOn(line + ":build")
|
||||
}
|
||||
}
|
||||
|
||||
14
photonlib-cpp-examples/examples.gradle
Normal file
14
photonlib-cpp-examples/examples.gradle
Normal file
@@ -0,0 +1,14 @@
|
||||
// These should be the only 2 non-project subdirectories in the examples folder
|
||||
// I could check for (it)/build.gradle to exist, but w/e
|
||||
def EXCLUDED_DIRS = ["bin", "build"]
|
||||
|
||||
// List all non-hidden directories not in EXCUDED_DIRS
|
||||
ext.exampleFolderNames = file("${rootDir}")
|
||||
.listFiles()
|
||||
.findAll {
|
||||
return (it.isDirectory()
|
||||
&& !it.isHidden()
|
||||
&& !(it.name in EXCLUDED_DIRS) && !it.name.startsWith(".")
|
||||
&& it.toPath().resolve("build.gradle").toFile().exists())
|
||||
}
|
||||
.collect { it.name }
|
||||
@@ -1,4 +0,0 @@
|
||||
aimandrange
|
||||
getinrange
|
||||
aimattarget
|
||||
apriltagExample
|
||||
@@ -1 +1,3 @@
|
||||
new File('examples.txt').eachLine { line -> include line }
|
||||
apply from: "examples.gradle"
|
||||
|
||||
exampleFolderNames.each { line -> include line }
|
||||
|
||||
Reference in New Issue
Block a user