Skip to content

Commit

Permalink
Add LimelightHelpers, git warnings
Browse files Browse the repository at this point in the history
Added Limelight helpers to use against Limelight NetworkTables in a library form.

Added Git warnings for robot if the branch built is running on an "event" branch.
  • Loading branch information
garrettsummerfi3ld committed Mar 3, 2024
1 parent 494ee9c commit 97db22c
Show file tree
Hide file tree
Showing 2 changed files with 864 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/main/java/frc/robot/Robot.java
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ public class Robot extends LoggedRobot {
new Alert("No log file found! Please check the USB stick.", AlertType.WARNING);
private final Alert gitDirty =
new Alert("Git repository is dirty! Please commit or stash changes.", AlertType.WARNING);
private final Alert gitBranchMain =
new Alert("Git branch is not main! Please merge or rebase.", AlertType.WARNING);
private final Alert gitBranchEvent = new Alert("Git branch is on an event branch, commit often and push changes to GitHub", AlertType.INFO);

/**
* This function is run when the robot is first started up and should be used for any
Expand All @@ -80,6 +83,13 @@ public void robotInit() {
Logger.recordMetadata("GitDirty", "Unknown");
break;
}

if (!BuildConstants.GIT_BRANCH.equals("main")) {
gitBranchMain.set(true);
}
if (BuildConstants.GIT_BRANCH.contains("event")) {
gitBranchEvent.set(true);
}

Logger.addDataReceiver(new NT4Publisher());
if (isReal()) {
Expand Down
Loading

0 comments on commit 97db22c

Please sign in to comment.