Skip to content

Commit

Permalink
formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
gerth2 committed Jul 19, 2024
1 parent cac1646 commit 5cc620f
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public class LibCameraJNILoader {
private static boolean libraryLoaded = false;
private static final Logger logger = new Logger(LibCameraJNILoader.class, LogGroup.Camera);

private static File extractLibrary(String libraryName) throws IOException{
private static File extractLibrary(String libraryName) throws IOException {
// We always extract the shared object (we could hash each so, but that's a lot of work)
var arch_name = "linuxarm64";
var nativeLibName = System.mapLibraryName(libraryName);
Expand Down Expand Up @@ -68,7 +68,7 @@ public static synchronized void forceLoad() throws IOException {
// Development aid. First, try to load the library from disc if it was built locally.
File temp = new File("/home/pi/photon-libcamera-gl-driver/cmake_build/libphotonlibcamera.so");

if(!temp.exists()){
if (!temp.exists()) {
// File was not already on disc. Extract it from the jar.
temp = extractLibrary(libraryName);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
import java.util.stream.Collectors;
import org.photonvision.common.configuration.CameraConfiguration;
import org.photonvision.common.configuration.ConfigManager;
import org.photonvision.common.util.math.MathUtils;
import org.photonvision.vision.camera.CameraQuirk;
import org.photonvision.vision.processes.VisionSourceSettables;

Expand Down Expand Up @@ -95,7 +94,7 @@ public void setAllCamDefaults() {
// Common settings for all cameras to attempt to get their image
// as close as possible to what we want for image processing
softSet("image_stabilization", 0); // No image stabilization, as this will throw off odometry
softSet("power_line_frequency", 2); // Assume 60Hz USA
softSet("power_line_frequency", 2); // Assume 60Hz USA
softSet("scene_mode", 0); // no presets
softSet("exposure_metering_mode", 0);
softSet("exposure_dynamic_framerate", 0);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,11 @@
import edu.wpi.first.cscore.UsbCamera;
import edu.wpi.first.cscore.VideoException;
import edu.wpi.first.math.MathUtil;

import org.photonvision.common.configuration.CameraConfiguration;
import org.photonvision.common.util.math.MathUtils;

public class LifeCam3kCameraSettables extends GenericUSBCameraSettables {
// Lifecam only allows specific exposures. Pulled this list from
// Lifecam only allows specific exposures. Pulled this list from
// https://github.com/wpilibsuite/allwpilib/blob/main/cscore/src/main/native/linux/UsbCameraImpl.cpp#L129
private static int[] allowableExposures = {5, 10, 20, 39, 78, 156, 312, 625};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,7 @@
import edu.wpi.first.cscore.UsbCamera;
import edu.wpi.first.cscore.VideoException;
import edu.wpi.first.math.MathUtil;

import org.photonvision.common.configuration.CameraConfiguration;
import org.photonvision.common.util.math.MathUtils;

public class LifeCam3kWindowsCameraSettables extends GenericUSBCameraSettables {
public LifeCam3kWindowsCameraSettables(CameraConfiguration configuration, UsbCamera camera) {
Expand Down

0 comments on commit 5cc620f

Please sign in to comment.