Skip to content

Commit

Permalink
2025 Refactor (continued)
Browse files Browse the repository at this point in the history
  • Loading branch information
BR88C committed Nov 13, 2024
1 parent d514007 commit c94d1a0
Show file tree
Hide file tree
Showing 101 changed files with 4,661 additions and 5,063 deletions.
24 changes: 22 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"edu.wpi.first.math.util.Units.*",
"(initialValue)",
"(magnitude)",
"(value)"
"(value)",
"(e)"
],
"java.server.launchMode": "Standard",
"java.test.config": [
Expand Down Expand Up @@ -39,14 +40,17 @@
"Accl",
"Accum",
"ADIS",
"Backports",
"Bezier",
"Botpose",
"Brushless",
"CANandCoder",
"Canandgyro",
"Canandmag",
"Canbus",
"CANcoder",
"Checkstyle",
"Choreo",
"ChoreoLib",
"Cnfg",
"CTRE",
"Deadband",
Expand All @@ -56,19 +60,25 @@
"DeltVel",
"Desaturate",
"Desaturated",
"Desaturating",
"Desaturation",
"Devs",
"Discretization",
"Discretize",
"Discretizing",
"Doppel",
"DTheta",
"EEPROM",
"Expdelta",
"Falsi",
"Feedforward",
"Fullscreen",
"Gradlew",
"Grav",
"GRRDashboard",
"GSON",
"Holonomic",
"Intaking",
"Integ",
"Interpolatable",
"Itor",
Expand All @@ -77,6 +87,7 @@
"Lerp",
"Motorcontrol",
"Msgpack",
"Mult",
"NetworkTables",
"NTURI",
"Odometry",
Expand All @@ -87,14 +98,21 @@
"Pubuid",
"Quasistatic",
"Ratelimit",
"Ratelimited",
"Ratelimiter",
"Ratelimits",
"ReduxLib",
"Regula",
"RevLib",
"REVPH",
"REVRobotics",
"RoboRIO",
"Sendables",
"Setpoint",
"Setpoints",
"Signif",
"Significand",
"Subnormals",
"Subuid",
"TalonFX",
"TalonSRX",
Expand All @@ -110,9 +128,11 @@
"Unsubscribers",
"URCL",
"Vbat",
"Vmax",
"WPIBlue",
"WPILib",
"WPILibJ",
"WPIMath",
"WPIRed",
"Writables"
]
Expand Down
2 changes: 1 addition & 1 deletion .wpilib/wpilib_preferences.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"enableCppIntellisense": false,
"currentLanguage": "java",
"projectYear": "2024",
"projectYear": "2025",
"teamNumber": 340
}
18 changes: 17 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
# GRRBase
A template repository for Java-based robots in the FIRST Robotics Competition.

## Code Styling
### Code Styling
All Java code follows the styling guide of [Prettier](https://prettier.io/). You can apply these rules via [Spotless](https://github.com/diffplug/spotless/tree/main) using the command `./gradlew spotlessApply`

### Highlights

- Swerve API

With support for various hardware configurations, from vendors such as CTRE, REV, and Redux Robotics, an easy-to-use and heavily configurable swerve API is included. Includes features such as high frequency odometry, a custom ratelimiter to improve driver control while also reducing wheel scrub, and built-in support for tuning the drivetrain's configuration live via NetworkTables.

- Custom Dashboard

The included dashboard, made using Svelte + Tauri, includes an autonomous mode selection panel with animated previews of auto trajectories, and can be easily extended to add season-specific features. The dashboard also includes a menu to tune properties of the robot live in conjunction with the robot-side Tunable API, reducing the hassle and time required for tasks such as PID tuning.

- Verbose Logging via Epilogue

Utilizing Epilogue, an annotation-based logging framework, custom loggers for vendor and WPILib APIs are pre-defined to transparently log relevant data from the robot's hardware without any extra setup required.

- Various other utilities
15 changes: 11 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
plugins {
id "java"
id "edu.wpi.first.GradleRIO" version "2025.0.0-alpha-2"
id "com.diffplug.spotless" version "6.23.3"
id "edu.wpi.first.GradleRIO" version "2025.1.1-beta-1"
id "com.diffplug.spotless" version "6.25.0"
}

wpi.maven.useLocal = false
Expand Down Expand Up @@ -92,8 +92,15 @@ spotless {
endWithNewline()
removeUnusedImports()
trimTrailingWhitespace()
prettier(['prettier': '2.8.8', 'prettier-plugin-java': '2.2.0'])
.config(['parser': 'java', tabWidth: 4, useTabs: false, printWidth: 140 ])
prettier(['prettier': '3.3.3', 'prettier-plugin-java': '2.6.4'])
.config([
'parser': 'java',
'plugins': ['prettier-plugin-java'],
printWidth: 120,
tabWidth: 4,
useTabs: false,
trailingComma: "none"
])
}
}

Expand Down
3 changes: 3 additions & 0 deletions src/main/deploy/example.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Files placed in this directory will be deployed to the RoboRIO into the
'deploy' directory in the home folder. Use the 'Filesystem.getDeployDirectory' wpilib function
to get a proper path relative to the deploy directory.
217 changes: 0 additions & 217 deletions src/main/java/com/choreo/lib/Choreo.java

This file was deleted.

15 changes: 0 additions & 15 deletions src/main/java/com/choreo/lib/ChoreoControlFunction.java

This file was deleted.

Loading

0 comments on commit c94d1a0

Please sign in to comment.