Skip to content

Commit

Permalink
Fix build on nightly
Browse files Browse the repository at this point in the history
  • Loading branch information
spacey-sooty committed Jun 10, 2024
1 parent d5e8995 commit 863778b
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 21 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -158,3 +158,7 @@ bin/


# End of https://www.gitignore.io/api/c++,java,linux,macos,gradle,windows,visualstudiocode

# clangd
/.cache
compile_commands.json
12 changes: 6 additions & 6 deletions URCL.json
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
{
"fileName": "URCL.json",
"name": "URCL",
"version": "2024.0.1",
"version": "2024.1.0",
"frcYear": "2024",
"uuid": "84246d17-a797-4d1e-bd9f-c59cd8d2477c",
"mavenUrls": [
"https://raw.githubusercontent.com/Mechanical-Advantage/URCL/2024.0.1"
"https://raw.githubusercontent.com/Mechanical-Advantage/URCL/2024.1.0"
],
"jsonUrl": "https://raw.githubusercontent.com/Mechanical-Advantage/URCL/maven/URCL.json",
"javaDependencies": [
{
"groupId": "org.littletonrobotics.urcl",
"artifactId": "URCL-java",
"version": "2024.0.1"
"version": "2024.1.0"
}
],
"jniDependencies": [
{
"groupId": "org.littletonrobotics.urcl",
"artifactId": "URCL-driver",
"version": "2024.0.1",
"version": "2024.1.0",
"skipInvalidPlatforms": true,
"isJar": false,
"validPlatforms": [
Expand All @@ -34,7 +34,7 @@
{
"groupId": "org.littletonrobotics.urcl",
"artifactId": "URCL-cpp",
"version": "2024.0.1",
"version": "2024.1.0",
"libName": "URCL",
"headerClassifier": "headers",
"sharedLibrary": false,
Expand All @@ -49,7 +49,7 @@
{
"groupId": "org.littletonrobotics.urcl",
"artifactId": "URCL-driver",
"version": "2024.0.1",
"version": "2024.1.0",
"libName": "URCLDriver",
"headerClassifier": "headers",
"sharedLibrary": false,
Expand Down
2 changes: 1 addition & 1 deletion publish.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apply plugin: 'maven-publish'

ext.licenseFile = files("$rootDir/LICENSE.txt")

def pubVersion = '2024.0.1'
def pubVersion = '2024.1.0'

def outputsFolder = file("$buildDir/outputs")

Expand Down
24 changes: 10 additions & 14 deletions src/main/java/org/littletonrobotics/urcl/URCLJNI.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
package org.littletonrobotics.urcl;

import java.io.IOException;
import java.lang.System;
import java.nio.ByteBuffer;
import java.util.concurrent.atomic.AtomicBoolean;

Expand All @@ -18,7 +19,6 @@
*/
public class URCLJNI {
static boolean libraryLoaded = false;
static RuntimeLoader<URCLJNI> loader = null;

/**
* Helper class for determining whether or not to load the driver on static
Expand All @@ -29,7 +29,7 @@ public static class Helper {

/**
* Get whether to load the driver on static init.
*
*
* @return true if the driver will load on static init
*/
public static boolean getExtractOnStaticLoad() {
Expand All @@ -38,7 +38,7 @@ public static boolean getExtractOnStaticLoad() {

/**
* Set whether to load the driver on static init.
*
*
* @param load the new value
*/
public static void setExtractOnStaticLoad(boolean load) {
Expand All @@ -49,9 +49,7 @@ public static void setExtractOnStaticLoad(boolean load) {
static {
if (Helper.getExtractOnStaticLoad()) {
try {
loader = new RuntimeLoader<>("URCLDriver", RuntimeLoader.getDefaultExtractionRoot(),
URCLJNI.class);
loader.loadLibrary();
RuntimeLoader.loadLibrary("URCLDriver");
} catch (IOException ex) {
ex.printStackTrace();
System.exit(1);
Expand All @@ -62,32 +60,30 @@ public static void setExtractOnStaticLoad(boolean load) {

/**
* Force load the library.
*
*
* @throws java.io.IOException thrown if the native library cannot be found
*/
public static synchronized void forceLoad() throws IOException {
if (libraryLoaded) {
return;
}
loader = new RuntimeLoader<>("URCLDriver", RuntimeLoader.getDefaultExtractionRoot(),
URCLJNI.class);
loader.loadLibrary();
RuntimeLoader.loadLibrary("URCLDriver");
libraryLoaded = true;
}

/** Start logging. */
public static native void start();

/**
/**
* Get the shared buffer with persistent data.
*
*
* @return The shared buffer
*/
public static native ByteBuffer getPersistentBuffer();

/**
/**
* Get the shared buffer with periodic data.
*
*
* @return The shared buffer
*/
public static native ByteBuffer getPeriodicBuffer();
Expand Down

0 comments on commit 863778b

Please sign in to comment.