|
21 | 21 | import java.util.Collection;
|
22 | 22 | import java.util.HashMap;
|
23 | 23 | import java.util.List;
|
24 |
| -import java.util.Map; |
25 |
| -import java.util.stream.Collectors; |
26 |
| -import org.photonvision.PhotonVersion; |
27 |
| -import org.photonvision.common.hardware.Platform; |
28 |
| -import org.photonvision.common.networking.NetworkManager; |
29 |
| -import org.photonvision.common.networking.NetworkUtils; |
30 |
| -import org.photonvision.common.util.SerializationUtils; |
31 |
| -import org.photonvision.mrcal.MrCalJNILoader; |
32 |
| -import org.photonvision.raspi.LibCameraJNILoader; |
33 |
| -//import org.photonvision.jetson.JetsonMipiJNILoader; |
34 |
| -import org.photonvision.vision.calibration.UICameraCalibrationCoefficients; |
35 |
| -import org.photonvision.vision.camera.QuirkyCamera; |
36 |
| -import org.photonvision.vision.processes.VisionModule; |
37 |
| -import org.photonvision.vision.processes.VisionModuleManager; |
38 | 24 | import org.photonvision.vision.processes.VisionSource;
|
39 | 25 |
|
40 | 26 | public class PhotonConfiguration {
|
@@ -115,54 +101,6 @@ public void addCameraConfig(String name, CameraConfiguration config) {
|
115 | 101 | cameraConfigurations.put(name, config);
|
116 | 102 | }
|
117 | 103 |
|
118 |
| - // public Map<String, Object> toHashMap() { |
119 |
| - // Map<String, Object> map = new HashMap<>(); |
120 |
| - // var settingsSubmap = new HashMap<String, Object>(); |
121 |
| - |
122 |
| - // // Hack active interfaces into networkSettings |
123 |
| - // var netConfigMap = networkConfig.toHashMap(); |
124 |
| - // netConfigMap.put("networkInterfaceNames", NetworkUtils.getAllWiredInterfaces()); |
125 |
| - // netConfigMap.put("networkingDisabled", NetworkManager.getInstance().networkingIsDisabled); |
126 |
| - |
127 |
| - // settingsSubmap.put("networkSettings", netConfigMap); |
128 |
| - |
129 |
| - // var lightingConfig = new UILightingConfig(); |
130 |
| - // lightingConfig.brightness = hardwareSettings.ledBrightnessPercentage; |
131 |
| - // lightingConfig.supported = !hardwareConfig.ledPins.isEmpty(); |
132 |
| - // settingsSubmap.put("lighting", SerializationUtils.objectToHashMap(lightingConfig)); |
133 |
| - // // General Settings |
134 |
| - // var generalSubmap = new HashMap<String, Object>(); |
135 |
| - // generalSubmap.put("version", PhotonVersion.versionString); |
136 |
| - // generalSubmap.put( |
137 |
| - // "gpuAcceleration", |
138 |
| - // LibCameraJNILoader.isSupported() |
139 |
| - // ? "Zerocopy Libcamera Working" |
140 |
| - // : ""); // TODO add support for other types of GPU accel |
141 |
| - // generalSubmap.put( |
142 |
| - // "cudaAcceleration", |
143 |
| - // false //JetsonMipiJNILoader.isSupported() |
144 |
| - // ? "Jetson Cuda and mipi Working" |
145 |
| - // : ""); |
146 |
| - // generalSubmap.put("mrCalWorking", MrCalJNILoader.getInstance().isLoaded()); |
147 |
| - // generalSubmap.put("availableModels", NeuralNetworkModelManager.getInstance().getModels()); |
148 |
| - // generalSubmap.put( |
149 |
| - // "supportedBackends", NeuralNetworkModelManager.getInstance().getSupportedBackends()); |
150 |
| - // generalSubmap.put("hardwareModel", hardwareConfig.deviceName); |
151 |
| - // generalSubmap.put("hardwarePlatform", Platform.getPlatformName()); |
152 |
| - // settingsSubmap.put("general", generalSubmap); |
153 |
| - // // AprilTagFieldLayout |
154 |
| - // settingsSubmap.put("atfl", this.atfl); |
155 |
| - |
156 |
| - // map.put( |
157 |
| - // "cameraSettings", |
158 |
| - // VisionModuleManager.getInstance().getModules().stream() |
159 |
| - // .map(VisionModule::toUICameraConfig) |
160 |
| - // .map(SerializationUtils::objectToHashMap) |
161 |
| - // .collect(Collectors.toList())); |
162 |
| - // map.put("settings", settingsSubmap); |
163 |
| - |
164 |
| - // return map; |
165 |
| - // } // Comment to compile |
166 | 104 | /**
|
167 | 105 | * Delete a camera by its unique name
|
168 | 106 | *
|
|
0 commit comments