Package com.marslib.util
Class LogUploader
java.lang.Object
com.marslib.util.LogUploader
Utility class to automatically upload WPILog files to a GitHub repository's Releases. It avoids
disrupting robot loop timings by running on a separate daemon thread.
-
Method Summary
Modifier and TypeMethodDescriptionstatic edu.wpi.first.wpilibj2.command.CommandGenerates a structural Command to physically copy any FRC internal match logs directly onto the tethered USB stick, subsequently purging the RIO to guarantee high storage overhead.static voidsetLogDirs(Path... dirs) Overrides the directories scanned for logs.static voidsetPatToken(String token) Overrides the PAT token for testing.static voidAttempts to scan for and upload log files if the cooldown has elapsed and conditions are met.
-
Method Details
-
setLogDirs
Overrides the directories scanned for logs. Used for unit testing. -
setPatToken
Overrides the PAT token for testing. -
tryUploadLogsAsync
public static void tryUploadLogsAsync()Attempts to scan for and upload log files if the cooldown has elapsed and conditions are met. This should be called from disabledPeriodic(). -
getUsbOffloadCommand
public static edu.wpi.first.wpilibj2.command.Command getUsbOffloadCommand()Generates a structural Command to physically copy any FRC internal match logs directly onto the tethered USB stick, subsequently purging the RIO to guarantee high storage overhead. Useful for offline competition events where Wi-Fi upload drops entirely.
-