Skip to content

Commit

Permalink
Run lint
Browse files Browse the repository at this point in the history
  • Loading branch information
mcm001 committed Dec 24, 2023
1 parent 22a4f5b commit a14ea48
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 9 deletions.
2 changes: 1 addition & 1 deletion photon-core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ model {
sharedLibs.each { so ->
def arch = so.targetPlatform.architecture.name
def os = so.targetPlatform.operatingSystem.name

copy {
from so.sharedLibraryFile
// We know all should be shared libs only at this point
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,34 @@
/*
* Copyright (C) Photon Vision.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/

package org.photonvision.jni;

public class CalibrationHelper {
public static class CalResult {

}
public static class CalResult {}

public static native long Create(int width, int height, long overlayMatPtr, double tolerance);

public static native long Destroy();

public static native CalResult Detect(long inputImg, long outputImg);

public static void main(String[] args) {
System.load("/home/matt/Documents/GitHub/photonvision/photon-core/build/libs/photoncoreJNI/shared/linuxx86-64/release/libphotoncorejni.so");
System.load(
"/home/matt/Documents/GitHub/photonvision/photon-core/build/libs/photoncoreJNI/shared/linuxx86-64/release/libphotoncorejni.so");
System.out.println(Create(1, 2, 3, 4));
}
}
32 changes: 28 additions & 4 deletions photon-core/src/main/native/jni/CalibrationHelperJni.cpp
Original file line number Diff line number Diff line change
@@ -1,10 +1,34 @@
/*
* Copyright (C) Photon Vision.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/

#include <org_photonvision_jni_CalibrationHelper.h>

extern "C" {

JNIEXPORT jlong JNICALL Java_org_photonvision_jni_CalibrationHelper_Create
(JNIEnv *, jclass, jint, jint, jlong, jdouble) {
return 0;
/*
* Class: org_photonvision_jni_CalibrationHelper
* Method: Create
* Signature: (IIJD)J
*/
JNIEXPORT jlong JNICALL
Java_org_photonvision_jni_CalibrationHelper_Create
(JNIEnv*, jclass, jint, jint, jlong, jdouble)
{
return 0;
}

}
} // extern "C"

0 comments on commit a14ea48

Please sign in to comment.