Files
allwpilib/wpilibcExamples/src/main/cpp/templates/templates.json
Peter Johnson dacded37e5 [hal, wpilib] Add OpMode support (#7744)
User code:
- OpModeRobot used as the robot base class
- LinearOpMode and PeriodicOpMode are provided opmode base classes
- In Java, annotations can be used to automatically register opmode classes

Additional user code functionality:
- OpMode (string) is available in addition to the overall
auto/teleop/test robot mode
- OpMode does not indicate enable (enable/disable is still separate)
- The HAL API uses integer UIDs; these are exposed at the user API level
as well for faster checks
- User code creates opmodes on startup (these have name, category,
description, etc).

DS:
- DS will present opmode selection lists for auto and teleop for
match/practice. During a match, the DS will automatically activate the
selected opmode in the corresponding match period.
- For testing, an overall mode is selected (e.g. teleop/auto/test) and a
single opmode is selected

Future work:
- Command framework support/integration
- Python annotation support
- Unit tests (needs race-free DS sim updates)
- Porting of examples

Co-authored-by: Joseph Eng <91924258+KangarooKoala@users.noreply.github.com>
2025-12-12 20:25:57 -08:00

143 lines
3.0 KiB
JSON

[
{
"name": "Command v2 Robot",
"description": "Command v2, with explanatory comments and example code.",
"tags": [
"Commandv2"
],
"foldername": "commandv2",
"gradlebase": "cpp",
"commandversion": 2
},
{
"name": "Command v2 Robot Skeleton (Advanced)",
"description": "Skeleton (stub) code for Command v2, without explanatory comments and example code.",
"tags": [
"Commandv2",
"Skeleton"
],
"foldername": "commandv2skeleton",
"gradlebase": "cpp",
"commandversion": 2
},
{
"name": "OpMode Robot",
"description": "OpMode style, with explanatory comments and example code.",
"tags": [
"OpMode"
],
"foldername": "opmode",
"gradlebase": "cpp",
"commandversion": 2
},
{
"name": "Timed Robot",
"description": "Timed style, with explanatory comments and example code.",
"tags": [
"Timed"
],
"foldername": "timed",
"gradlebase": "cpp",
"commandversion": 2
},
{
"name": "Timed Skeleton (Advanced)",
"description": "Skeleton (stub) code for TimedRobot, without explanatory comments and example code.",
"tags": [
"Timed",
"Skeleton"
],
"foldername": "timedskeleton",
"gradlebase": "cpp",
"commandversion": 2
},
{
"name": "Timeslice Robot",
"description": "Timeslice style",
"tags": [
"Timeslice"
],
"foldername": "timeslice",
"gradlebase": "cpp",
"commandversion": 2
},
{
"name": "Timeslice Skeleton (Advanced)",
"description": "Skeleton (stub) code for TimesliceRobot",
"tags": [
"Timeslice",
"Skeleton"
],
"foldername": "timesliceskeleton",
"gradlebase": "cpp",
"commandversion": 2
},
{
"name": "RobotBase Skeleton (Advanced)",
"description": "Skeleton (stub) code for RobotBase - Not recommended for competition use",
"tags": [
"RobotBase",
"Skeleton"
],
"foldername": "robotbaseskeleton",
"gradlebase": "cpp",
"commandversion": 2
},
{
"name": "Romi - Command Robot",
"description": "Romi - Command style",
"tags": [
"Commandv2",
"Romi"
],
"foldername": "commandv2",
"gradlebase": "cppromi",
"commandversion": 2,
"extravendordeps": [
"romi"
]
},
{
"name": "Romi - Timed Robot",
"description": "Romi - Timed style",
"tags": [
"Timed",
"Romi"
],
"foldername": "timed",
"gradlebase": "cppromi",
"commandversion": 2,
"extravendordeps": [
"romi"
]
},
{
"name": "XRP - Command Robot",
"description": "XRP - Command style",
"tags": [
"Commandv2",
"XRP"
],
"foldername": "commandv2",
"gradlebase": "cppxrp",
"commandversion": 2,
"extravendordeps": [
"xrp"
]
},
{
"name": "XRP - Timed Robot",
"description": "XRP - Timed style",
"tags": [
"Timed",
"XRP"
],
"foldername": "timed",
"gradlebase": "cppxrp",
"commandversion": 2,
"extravendordeps": [
"xrp"
]
}
]