mirror of
https://github.com/PhotonVision/photonvision
synced 2026-06-29 02:21:41 +00:00
feat: crosshair toggle for driver mode (#1822)
closes #1818  Here's what the added toggle looks like, I just put in the input settings. It'll also hide itself when drivermode is off.
This commit is contained in:
@@ -68,10 +68,12 @@ public class DriverModePipeline
|
||||
if (!emptyIn) {
|
||||
totalNanos += resizeImagePipe.run(inputMat).nanosElapsed;
|
||||
|
||||
var draw2dCrosshairResult = draw2dCrosshairPipe.run(Pair.of(inputMat, List.of()));
|
||||
if (settings.crosshair) {
|
||||
var draw2dCrosshairResult = draw2dCrosshairPipe.run(Pair.of(inputMat, List.of()));
|
||||
|
||||
// calculate elapsed nanoseconds
|
||||
totalNanos += draw2dCrosshairResult.nanosElapsed;
|
||||
// calculate elapsed nanoseconds
|
||||
totalNanos += draw2dCrosshairResult.nanosElapsed;
|
||||
}
|
||||
}
|
||||
|
||||
var fpsResult = calculateFPSPipe.run(null);
|
||||
@@ -92,6 +94,7 @@ public class DriverModePipeline
|
||||
|
||||
@Override
|
||||
public void release() {
|
||||
// we never actually need to give resources up since pipelinemanager only makes one of us
|
||||
// we never actually need to give resources up since pipelinemanager only makes
|
||||
// one of us
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,6 +24,7 @@ import org.photonvision.vision.processes.PipelineManager;
|
||||
@JsonTypeName("DriverModePipelineSettings")
|
||||
public class DriverModePipelineSettings extends CVPipelineSettings {
|
||||
public DoubleCouple offsetPoint = new DoubleCouple();
|
||||
public boolean crosshair = true;
|
||||
|
||||
public DriverModePipelineSettings() {
|
||||
super();
|
||||
|
||||
Reference in New Issue
Block a user