@@ -115,54 +115,54 @@ public void addCameraConfig(String name, CameraConfiguration config) {
115
115
cameraConfigurations .put (name , config );
116
116
}
117
117
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
- }
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
166
/**
167
167
* Delete a camera by its unique name
168
168
*
0 commit comments