A modularity-based library designed for use in the FIRST Robotics Competition.
Build Status
WML As FRC Vendor
-
WML Supports being included as a shared library.
-
Follow the documentation provided by FRC for adding 3rd party libraries https://docs.wpilib.org/pt/latest/docs/software/vscode-overview/3rd-party-libraries.html.
-
The vendordep JSON files come in multiple parts and all are optional. E.g
WML-Core
for the core components.WML-Rev
for Rev support (Neo Motor's). AndUDP_TransferNT
, used for point to point networking with UDP. Mainly used for communications to and from CJ-Vision platforms. -
JSON URLS
- WML-Core: https://buchel.family/repository/wml/first/WML-Core/WML-Core-Deps/latest/WML-Core-Deps-latest.json
- WML-Rev: https://buchel.family/repository/wml/first/WML-Rev/WML-Rev-Deps/latest/WML-Rev-Deps-latest.json
- UDP_TransferNT: https://buchel.family/repository/wml/first/UDP_TransferNT/UDP_TransferNT-Deps/latest/UDP_TransferNT-Deps-latest.json
-
Replace both occurrences of
latest
with a version for a specific version. E.g https://buchel.family/repository/wml/first/WML-Core/WML-Core-Deps/2021.3.2/WML-Core-Deps-2021.3.2.json -
Note that when adding the vendordeps through vscode with older versions (gradlerio
2021.2.1
) it must behttp
nothttps
. As this may cause security issues on some devices. If downloading manually by placing the vendordep json into thevendordep
folder then this does not apply.
WML As Submodule
Setting up WML in your own project
-
First you will need to 'install' the submodule to your root directory. Navigate to your root dir and install via
git submodule add https://github.com/wml-frc/WML.git
. -
Once complete you will need to apply the project to your own codebase. Every team has their own style of programming, building & deploying. But in general most will have a
build.gradle
andsettings.gradle
, and you would apply the library via appending the two.
Adding WML to your project's gradle config
- First we need to link the directories in
settings.gradle
- WML currently consists of two section (
WML-Core
&WML-Rev
) and may soom be seperated further for efficiency.
// WML
include 'WML-Core', 'WML-Rev'
project(':WML-Core').projectDir = file('WML/WML-Core')
project(':WML-Rev').projectDir = file('WML/WML-Rev')
- Inside your project file (e.g.
build.gradle
) append the libraries:
model {
components {
frcUserProgram(NativeExecutableSpec) {
// ...
binaries.all {
lib project: ':WML-Core', library: 'WML-Core', linkage: 'shared' // can also be static
lib project: ':WML-Rev', library: 'WML-Core', linkage: 'shared' // can also be static
}
// ...
}
}
testSuites {
frcUserProgramTest(GoogleTestTestSuiteSpec) {
// ...
binaries.all {
lib project: ':WML-Core', library: 'WML-Core', linkage: 'shared'
lib project: ':WML-Rev', library: 'WML-Core', linkage: 'shared'
}
// ...
}
}
}
- Note that
:WML-Rev
is not required if you are not using Rev products (Neo Motor)
Doxygen
-
You can view the generated documentation for each project via
https://buchel.family/repository/wml/first/<library>/<library>-Docs/<version>/<library>-<version>-documentation.zip
-
You can also naviage the files and docs manually via https://buchel.family/repository/wml/first/
Library examples
-
Added to the library is an example folder. More examples are planned, however, I am aware that there are not many examples currently (especially compared to the breadth of the content in the library).
-
I recommend looking at code that uses the library to get a better idea of what to do. (e.g. CurtinFRC's code -> Code)
Contributing to WML
readme written by @CJBuchel, 20/12/21