Skip to content
NukeMinecart edited this page Dec 30, 2025 · 29 revisions
drawing

BadgerLog is an annotation-based NetworkTables wrapper that contains features that SmartDashboard and the raw NetworkTables API lack.

Installation

There are a few steps when installing the BadgerLog vendordep

  1. Add a new (online) vendor dependency in VS Code.

    https://raw.githubusercontent.com/team1306/badger-log/master/vendordep.json
    
  2. Add the following to the end of the plugins block in build.gradle

    plugins {
        //... Any other plugins
        id 'io.freefair.aspectj.post-compile-weaving' version '8.14'
    }
  3. Add the following to the end of the dependencies block in build.gradle

    dependencies {
        //... Any other dependencies
        implementation 'org.aspectj:aspectjrt:1.9.24'
        aspect 'com.github.team1306:badger-log:2025.4.2'
        annotationProcessor 'com.github.team1306:badger-log:2025.4.2'
    }
  4. For simulation there are two options. The default WPILib simulation will not work correctly

    1. Running the simulate java gradle task. This will not start debugging

      ./gradlew simulateJava
      
    2. Install the Gradle For Java VSCode extension. This will start with debugging

      • To open simulation, you need to open the Gradle side menu and find the simulateJavaRelease or simulateJavaDebug Gradle task.

Initial Setup

BadgerLog.update must be called periodically (Usually Robot.robotPeriodic) for NetworkTables values to update and events to trigger.

Basic Usage

BadgerLog is meant to simplify the creating and updating of NetworkTables entries. It uses the Java annotation system to achieve this.

Fields can be annotated with @Entry to create an associated NetworkTables entry.

This is detailed more in Usage

BadgerLog also supports NetworkTables events. This is detailed extensively in Events

Clone this wiki locally