From a14ea485eed6febcf1703a7a9f588e94edf2851d Mon Sep 17 00:00:00 2001 From: Matt Date: Sun, 24 Dec 2023 13:23:17 -0800 Subject: [PATCH] Run lint --- photon-core/build.gradle | 2 +- .../photonvision/jni/CalibrationHelper.java | 26 ++++++++++++--- .../main/native/jni/CalibrationHelperJni.cpp | 32 ++++++++++++++++--- 3 files changed, 51 insertions(+), 9 deletions(-) diff --git a/photon-core/build.gradle b/photon-core/build.gradle index 3ff56423d4..77a9d1ccc7 100644 --- a/photon-core/build.gradle +++ b/photon-core/build.gradle @@ -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 diff --git a/photon-core/src/main/java/org/photonvision/jni/CalibrationHelper.java b/photon-core/src/main/java/org/photonvision/jni/CalibrationHelper.java index dc04dbde7d..230ca72b8e 100644 --- a/photon-core/src/main/java/org/photonvision/jni/CalibrationHelper.java +++ b/photon-core/src/main/java/org/photonvision/jni/CalibrationHelper.java @@ -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 . + */ + 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)); } } diff --git a/photon-core/src/main/native/jni/CalibrationHelperJni.cpp b/photon-core/src/main/native/jni/CalibrationHelperJni.cpp index b875a41e28..d5766cf4bd 100644 --- a/photon-core/src/main/native/jni/CalibrationHelperJni.cpp +++ b/photon-core/src/main/native/jni/CalibrationHelperJni.cpp @@ -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 . + */ + #include 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"