Skip to content

Commit 205e555

Browse files
committed
more cleanups
1 parent 673abc2 commit 205e555

File tree

7 files changed

+7
-81
lines changed

7 files changed

+7
-81
lines changed

photon-client/src/components/dashboard/tabs/AprilTagCudaTab.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ const interactiveCols = computed(() =>
2727
<pv-select
2828
v-model="currentPipelineSettings.tagFamily"
2929
label="Target family"
30-
:items="['AprilTag 36h11 (6.5in)', 'AprilTag 25h9 (6in)', 'AprilTag 16h5 (6in)']"
30+
:items="['AprilTag 36h11 (6.5in)']"
3131
:select-cols="interactiveCols"
3232
@input="(value) => useCameraSettingsStore().changeCurrentPipelineSetting({ tagFamily: value }, false)"
3333
/>

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

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -183,11 +183,7 @@ public void setAutoExposure(boolean cameraAutoExposure) {
183183
softSet("auto_exposure_bias", 0);
184184
softSet("iso_sensitivity_auto", 0); // Disable auto ISO adjustment
185185
softSet("iso_sensitivity", 0); // Manual ISO adjustment
186-
softSet("white_balance_auto_preset", 2); // Auto white-balance disabled
187-
softSet("white_balance_automatic", 0);
188-
//softSet("white_balance_temperature", whiteBalanceTemperature); // Comment to compile
189-
if(autoExposureProp != null)
190-
autoExposureProp.set(PROP_AUTO_EXPOSURE_DISABLED);
186+
if(autoExposureProp != null) autoExposureProp.set(PROP_AUTO_EXPOSURE_DISABLED);
191187

192188
// Most cameras leave exposure time absolute at the last value from their AE
193189
// algorithm.
@@ -199,10 +195,7 @@ public void setAutoExposure(boolean cameraAutoExposure) {
199195
softSet("auto_exposure_bias", 12);
200196
softSet("iso_sensitivity_auto", 1);
201197
softSet("iso_sensitivity", 1); // Manual ISO adjustment by default
202-
softSet("white_balance_auto_preset", 1); // Auto white-balance enabled
203-
softSet("white_balance_automatic", 1);
204-
if(autoExposureProp != null)
205-
autoExposureProp.set(PROP_AUTO_EXPOSURE_ENABLED);
198+
if(autoExposureProp != null) autoExposureProp.set(PROP_AUTO_EXPOSURE_ENABLED);
206199
}
207200
}
208201

@@ -220,8 +213,7 @@ public double getMaxExposureRaw() {
220213
public void setExposureRaw(double exposureRaw) {
221214
if (exposureRaw >= 0.0) {
222215
try {
223-
if(autoExposureProp != null)
224-
autoExposureProp.set(PROP_AUTO_EXPOSURE_DISABLED);
216+
if(autoExposureProp != null) autoExposureProp.set(PROP_AUTO_EXPOSURE_DISABLED);
225217

226218
int propVal = (int) MathUtil.clamp(exposureRaw, minExposure, maxExposure);
227219

@@ -247,7 +239,6 @@ public void setExposureRaw(double exposureRaw) {
247239
@Override
248240
public void setBrightness(int brightness) {
249241
try {
250-
//camera.setBrightness(brightness);
251242
softSet("brightness", brightness);
252243
this.lastBrightness = brightness;
253244
} catch (VideoException e) {
@@ -290,9 +281,8 @@ private void cacheVideoModes() {
290281

291282

292283
for (VideoMode videoMode : modes) {
293-
// Filter grey modes
294-
if (/*videoMode.pixelFormat == PixelFormat.kGray
295-
|| */ videoMode.pixelFormat == PixelFormat.kUnknown) {
284+
// Filter unknown modes
285+
if ( videoMode.pixelFormat == PixelFormat.kUnknown) {
296286
continue;
297287
}
298288

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,7 @@ public InnoOV9281CameraSettables(CameraConfiguration configuration, UsbCamera ca
2727

2828
@Override
2929
protected void setUpExposureProperties() {
30-
logger.debug("pre super setup");
3130
super.setUpExposureProperties();
32-
logger.debug("post super setup");
3331

3432
// Property limits are incorrect
3533
this.minExposure = 1;

photon-core/src/main/java/org/photonvision/vision/pipe/impl/AprilTagDetectionCudaPipe.java

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,12 @@
2929
public class AprilTagDetectionCudaPipe
3030
extends CVPipe<CVMat, List<AprilTagDetection>, AprilTagDetectionCudaPipeParams>
3131
implements Releasable {
32-
//private AprilTagDetector m_detector = new AprilTagDetector();
3332
private GpuDetectorJNI m_cudadetector = new GpuDetectorJNI();
3433
private long handle = 0;
3534

3635
public AprilTagDetectionCudaPipe() {
3736
super();
3837

39-
//m_detector.addFamily("tag16h5");
40-
//m_detector.addFamily("tag36h11");
4138
handle = m_cudadetector.createGpuDetector(640,480); // just a guess
4239
}
4340

@@ -47,10 +44,6 @@ protected List<AprilTagDetection> process(CVMat in) {
4744
return List.of();
4845
}
4946

50-
//if (m_detector == null) {
51-
// throw new RuntimeException("Apriltag detector was released!");
52-
//}
53-
5447
var ret = m_cudadetector.processimage(handle, in.getMat().getNativeObjAddr());
5548

5649
if (ret == null) {
@@ -63,11 +56,6 @@ protected List<AprilTagDetection> process(CVMat in) {
6356
@Override
6457
public void setParams(AprilTagDetectionCudaPipeParams newParams) {
6558
if (this.params == null || !this.params.equals(newParams)) {
66-
//m_detector.setConfig(newParams.detectorParams);
67-
68-
//m_detector.clearFamilies();
69-
//m_detector.addFamily(newParams.family.getNativeName());
70-
7159
if( newParams.cameraCalibrationCoefficients == null ) return;
7260

7361
final Mat cameraMatrix = newParams.cameraCalibrationCoefficients.getCameraIntrinsicsMat();
@@ -91,8 +79,6 @@ public void setParams(AprilTagDetectionCudaPipeParams newParams) {
9179

9280
@Override
9381
public void release() {
94-
//m_detector.close();
95-
//m_detector = null;
9682
m_cudadetector.destroyGpuDetector(handle);
9783
m_cudadetector = null;
9884
}

photon-core/src/main/java/org/photonvision/vision/processes/PipelineManager.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,6 @@ private void recreateUserPipeline() {
269269
new AprilTagCudaPipeline((AprilTagCudaPipelineSettings) desiredPipelineSettings);
270270
}
271271
case Aruco -> {
272-
273272
logger.debug("Creating Aruco Pipeline");
274273
currentUserPipeline = new ArucoPipeline((ArucoPipelineSettings) desiredPipelineSettings);
275274
}
Lines changed: 0 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +0,0 @@
1-
/*
2-
* Copyright (C) Photon Vision.
3-
*
4-
* This program is free software: you can redistribute it and/or modify
5-
* it under the terms of the GNU General Public License as published by
6-
* the Free Software Foundation, either version 3 of the License, or
7-
* (at your option) any later version.
8-
*
9-
* This program is distributed in the hope that it will be useful,
10-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12-
* GNU General Public License for more details.
13-
*
14-
* You should have received a copy of the GNU General Public License
15-
* along with this program. If not, see <https://www.gnu.org/licenses/>.
16-
*/
17-
18-
#include <string.h>
19-
#include <regex>
20-
21-
/*
22-
* Autogenerated file! Do not manually edit this file. This version is
23-
* regenerated any time the publish task is run, or when this file is deleted.
24-
*/
25-
26-
static const char* dev_ = "dev";
27-
28-
namespace photon {
29-
namespace PhotonVersion {
30-
const char* versionString = "dev-Unknown";
31-
const char* buildDate = "2025-1-20 10:28:10";
32-
const bool isRelease = strncmp(dev_, versionString, strlen(dev_)) != 0;
33-
}
34-
}
Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1 @@
1-
<!doctype html>
2-
<html lang="en">
3-
<head>
4-
<meta charset="UTF-8" />
5-
<link rel="icon" href="./favicon.ico" />
6-
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
7-
<title>Photon Client</title>
8-
<script type="module" crossorigin src="./assets/index-D7Gocgo9.js"></script>
9-
<link rel="stylesheet" crossorigin href="./assets/index-DZEIDu-s.css">
10-
</head>
11-
<body>
12-
<div id="app"></div>
13-
</body>
14-
</html>
1+
<p>UI has not been copied!</p>

0 commit comments

Comments
 (0)