Skip to content
Permalink
Browse files
Fixes naming issue for JNI class
  • Loading branch information
willtoth committed Jan 30, 2020
1 parent fb8314e commit 17ed75de33b58e53590a333b841297a1b11dd38a
Show file tree
Hide file tree
Showing 9 changed files with 17 additions and 17 deletions.
@@ -2,7 +2,7 @@ apply plugin: 'maven-publish'

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

def pubVersion = '0.2.0'
def pubVersion = '0.3.0'

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

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2019 REV Robotics
* Copyright (c) 2020 REV Robotics
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2018-2019 REV Robotics
* Copyright (c) 2018-2020 REV Robotics
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2019 REV Robotics
* Copyright (c) 2020 REV Robotics
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
@@ -32,14 +32,14 @@

import edu.wpi.first.wpiutil.RuntimeLoader;

public class RevJNIWrapper {
public class DistanceSensorJNIWrapper {
static boolean libraryLoaded = false;
static RuntimeLoader<RevJNIWrapper> loader = null;
static RuntimeLoader<DistanceSensorJNIWrapper> loader = null;

static {
if (!libraryLoaded) {
try {
loader = new RuntimeLoader<>("DistanceSensorDriver", RuntimeLoader.getDefaultExtractionRoot(), RevJNIWrapper.class);
loader = new RuntimeLoader<>("DistanceSensorDriver", RuntimeLoader.getDefaultExtractionRoot(), DistanceSensorJNIWrapper.class);
loader.loadLibrary();
} catch (IOException ex) {
ex.printStackTrace();
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2019 REV Robotics
* Copyright (c) 2020 REV Robotics
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
@@ -28,7 +28,7 @@

package com.revrobotics.jni;

public class VL53L0XJNI extends RevJNIWrapper {
public class VL53L0XJNI extends DistanceSensorJNIWrapper {
public static native void Init(int port, int addr);
public static native boolean GetVersion();
public static native boolean DataInit(int port, int addr);
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2018-2019 REV Robotics
* Copyright (c) 2018-2020 REV Robotics
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2018-2019 REV Robotics
* Copyright (c) 2018-2020 REV Robotics
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2018-2019 REV Robotics
* Copyright (c) 2018-2020 REV Robotics
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
@@ -1,7 +1,7 @@
{
"fileName": "REV2mDistanceSensor.json",
"name": "REV2mDistanceSensor",
"version": "0.2.0",
"version": "0.3.0",
"uuid": "9e352acd-4eec-40f7-8490-3357b5ed65ae",
"mavenUrls": [
"http://www.revrobotics.com/content/sw/max/sdk/maven/"
@@ -11,14 +11,14 @@
{
"groupId": "com.revrobotics.frc",
"artifactId": "DistanceSensor-java",
"version": "0.2.0"
"version": "0.3.0"
}
],
"jniDependencies": [
{
"groupId": "com.revrobotics.frc",
"artifactId": "DistanceSensor-driver",
"version": "0.2.0",
"version": "0.3.0",
"skipInvalidPlatforms": true,
"isJar": false,
"validPlatforms": [
@@ -30,7 +30,7 @@
{
"groupId": "com.revrobotics.frc",
"artifactId": "DistanceSensor-cpp",
"version": "0.2.0",
"version": "0.3.0",
"libName": "libDistanceSensor",
"headerClassifier": "headers",
"sharedLibrary": true,
@@ -42,7 +42,7 @@
{
"groupId": "com.revrobotics.frc",
"artifactId": "DistanceSensor-driver",
"version": "0.2.0",
"version": "0.3.0",
"libName": "libDistanceSensorDriver",
"headerClassifier": "headers",
"sharedLibrary": false,

0 comments on commit 17ed75d

Please sign in to comment.