mirror of
https://github.com/PhotonVision/photonvision
synced 2026-06-19 00:41:41 +00:00
Remove blacklistedResIndices from HardwareConfig
Matt says this was for mmal, and we use libcamera now, so this is unnecessary now. Also, the filtering logic that used blacklistedResIndices was completely broken.
This commit is contained in:
@@ -19,8 +19,6 @@ package org.photonvision.common.configuration;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
public record HardwareConfig(
|
||||
@@ -49,8 +47,7 @@ public record HardwareConfig(
|
||||
String diskUsageCommand,
|
||||
// Device stuff
|
||||
String restartHardwareCommand,
|
||||
double vendorFOV, // -1 for unmanaged
|
||||
List<Integer> blacklistedResIndices) { // this happens before the defaults are applied)
|
||||
double vendorFOV) { // -1 for unmanaged
|
||||
|
||||
public HardwareConfig() {
|
||||
this(
|
||||
@@ -74,8 +71,7 @@ public record HardwareConfig(
|
||||
"", // gpuMemUsageCommand
|
||||
"", // diskUsageCommand
|
||||
"", // restartHardwareCommand
|
||||
-1, // vendorFOV
|
||||
Collections.emptyList()); // blacklistedResIndices
|
||||
-1); // vendorFOV
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -31,7 +31,6 @@ import java.util.List;
|
||||
import java.util.Optional;
|
||||
import java.util.stream.Collectors;
|
||||
import org.photonvision.common.configuration.CameraConfiguration;
|
||||
import org.photonvision.common.configuration.ConfigManager;
|
||||
import org.photonvision.vision.camera.CameraQuirk;
|
||||
import org.photonvision.vision.processes.VisionSourceSettables;
|
||||
|
||||
@@ -306,13 +305,6 @@ public class GenericUSBCameraSettables extends VisionSourceSettables {
|
||||
.collect(Collectors.toList());
|
||||
Collections.reverse(sortedList);
|
||||
|
||||
// On vendor cameras, respect blacklisted indices
|
||||
var indexBlacklist =
|
||||
ConfigManager.getInstance().getConfig().getHardwareConfig().blacklistedResIndices();
|
||||
for (int badIdx : indexBlacklist) {
|
||||
sortedList.remove(badIdx);
|
||||
}
|
||||
|
||||
for (VideoMode videoMode : sortedList) {
|
||||
videoModes.put(sortedList.indexOf(videoMode), videoMode);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user