Skip to content

Commit

Permalink
whoops
Browse files Browse the repository at this point in the history
  • Loading branch information
mcm001 committed Jan 7, 2024
1 parent 5f1db5b commit c1278cc
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 1 deletion.
16 changes: 16 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ dependencies {
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:5.8.2")

implementation wpilibTools.deps.wpilibJava("wpiutil")
testImplementation wpilibTools.deps.wpilibJava("cscore")

implementation wpilibTools.deps.wpilibOpenCvJava("frc" + wpi.frcYear.get(), wpi.versions.opencvVersion.get())

Expand Down Expand Up @@ -86,4 +87,19 @@ tasks.register('copyNativeLibrary', Sync) {
publish.dependsOn it
}


def nativeConfigName = 'wpilibNatives'
def nativeConfig = configurations.create(nativeConfigName)

def nativeTasks = wpilibTools.createExtractionTasks {
configurationName = nativeConfigName
}

nativeTasks.addToSourceSetResources(sourceSets.main)

nativeConfig.dependencies.add wpilibTools.deps.wpilib("wpiutil")
nativeConfig.dependencies.add wpilibTools.deps.wpilib("cscore")
nativeConfig.dependencies.add wpilibTools.deps.wpilibOpenCv("frc" + wpi.frcYear.get(), wpi.versions.opencvVersion.get())


apply from: "publish.gradle"
1 change: 1 addition & 0 deletions src/main/native/cpp/rknn_yolo_wrapper.cc
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
#include "yolov7.h"
#include "file_utils.h"
#include "rknn_yolo_wrapper.h"
#include "rknn_jni.h"

RknnYoloWrapper::RknnYoloWrapper() {
// Make very sure zero-inited? copied from example
Expand Down
2 changes: 1 addition & 1 deletion src/test/java/org/photonvision/rknn/RknnTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public class RknnTest {
@Test
public void testBasicBlobs() throws IOException {
// I really really hate this. Someone should fix this for me
System.load("/home/matt/Documents/GitHub/photonvision/photon-targeting/build/NativeMain/RawRuntimeLibs/linux/x86-64/shared/libopencv_java480.so");
var s = new CvSource();

// This also needs to get fixed
System.load("/home/matt/Documents/rknn/rknn_java/cmake_build/librknn_java.so");
Expand Down

0 comments on commit c1278cc

Please sign in to comment.