Skip to content

Commit daaa05f

Browse files
committed
commented out unsued methods
1 parent 810d3ad commit daaa05f

File tree

6 files changed

+53
-54
lines changed

6 files changed

+53
-54
lines changed

photon-core/src/main/java/org/photonvision/common/configuration/PhotonConfiguration.java

Lines changed: 48 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -115,54 +115,54 @@ public void addCameraConfig(String name, CameraConfiguration config) {
115115
cameraConfigurations.put(name, config);
116116
}
117117

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
166166
/**
167167
* Delete a camera by its unique name
168168
*

photon-core/src/main/java/org/photonvision/common/logging/PvCSCoreLogger.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public static PvCSCoreLogger getInstance() {
3434
private Logger logger;
3535

3636
private PvCSCoreLogger() {
37-
CameraServerJNI.setLogger(this::logMsg, 5); // 7 RJS
37+
CameraServerJNI.setLogger(this::logMsg, 7); // 7 RJS
3838
this.logger = new Logger(getClass(), LogGroup.CSCore);
3939
}
4040

photon-core/src/main/java/org/photonvision/vision/camera/USBCameras/GenericUSBCameraSettables.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ public void setAutoExposure(boolean cameraAutoExposure) {
185185
softSet("iso_sensitivity", 0); // Manual ISO adjustment
186186
softSet("white_balance_auto_preset", 2); // Auto white-balance disabled
187187
softSet("white_balance_automatic", 0);
188-
softSet("white_balance_temperature", whiteBalanceTemperature);
188+
//softSet("white_balance_temperature", whiteBalanceTemperature); // Comment to compile
189189
if(autoExposureProp != null)
190190
autoExposureProp.set(PROP_AUTO_EXPOSURE_DISABLED);
191191

photon-core/src/main/java/org/photonvision/vision/camera/USBCameras/USBCameraSource.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ public USBCameraSource(CameraConfiguration config) {
8686
if (getCameraConfiguration().cameraQuirks.hasQuirks()) {
8787

8888
logger.info("Quirky camera detected: " + getCameraConfiguration().cameraQuirks.baseName);
89-
} else logger.info("no quirks for:" + config.usbVID + ":" + config.usbPID + ":" + config.baseName + ".");
89+
}
9090

9191
var cameraBroken = getCameraConfiguration().cameraQuirks.hasQuirk(CameraQuirk.CompletelyBroken);
9292

photon-server/photonvision_config_from_2024.3.1/models/labels_v5.txt

Lines changed: 0 additions & 1 deletion
This file was deleted.

photon-server/src/main/resources/web/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
<link rel="icon" href="./favicon.ico" />
66
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
77
<title>Photon Client</title>
8-
<script type="module" crossorigin src="./assets/index-CWiAPZmp.js"></script>
9-
<link rel="stylesheet" crossorigin href="./assets/index-BhHu1ehN.css">
8+
<script type="module" crossorigin src="./assets/index-D7Gocgo9.js"></script>
9+
<link rel="stylesheet" crossorigin href="./assets/index-DZEIDu-s.css">
1010
</head>
1111
<body>
1212
<div id="app"></div>

0 commit comments

Comments
 (0)