Class PipelineManager
java.lang.Object
org.photonvision.vision.processes.PipelineManager
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
protected final Calibrate3dPipeline
static final int
protected final DriverModePipeline
static final Comparator<CVPipelineSettings>
protected final List<CVPipelineSettings>
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionaddPipeline
(PipelineType type) addPipeline
(PipelineType type, String nickname) void
changePipelineType
(int newType) int
duplicatePipeline
(int index) Duplicate a pipeline at a given indexGet the currently active pipeline.int
Gets the index of the currently active pipelineGet the currently active pipelines settingsboolean
Returns whether driver mode is active.getPipelineNickname
(int index) Get the settings for a pipeline by index.Gets a list of nicknames for all user pipelinesgetPipelineSettings
(int index) Get the settings for a pipeline by index.int
Grab the currently requested pipeline index.int
removePipeline
(int index) void
renameCurrentPipeline
(String newName) void
setCalibrationMode
(boolean wantsCalibration) Enters or exits calibration mode based on the parameter.void
setDriverMode
(boolean state) Enters or exits driver mode based on the parameter.void
setIndex
(int index)
-
Field Details
-
DRIVERMODE_INDEX
public static final int DRIVERMODE_INDEX- See Also:
-
CAL_3D_INDEX
public static final int CAL_3D_INDEX- See Also:
-
userPipelineSettings
-
calibration3dPipeline
-
driverModePipeline
-
PipelineSettingsIndexComparator
-
-
Constructor Details
-
PipelineManager
-
-
Method Details
-
getPipelineSettings
Get the settings for a pipeline by index.- Parameters:
index
- Index of pipeline whose settings need getting.- Returns:
- The gotten settings of the pipeline whose index was provided.
-
getPipelineNickname
Get the settings for a pipeline by index.- Parameters:
index
- Index of pipeline whose nickname needs getting.- Returns:
- the nickname of the pipeline whose index was provided.
-
getPipelineNicknames
Gets a list of nicknames for all user pipelines- Returns:
- The list of nicknames for all user pipelines
-
getCurrentPipelineIndex
public int getCurrentPipelineIndex()Gets the index of the currently active pipeline- Returns:
- The index of the currently active pipeline
-
getCurrentPipeline
Get the currently active pipeline.- Returns:
- The currently active pipeline.
-
getCurrentPipelineSettings
Get the currently active pipelines settings- Returns:
- The currently active pipelines settings
-
getRequestedIndex
public int getRequestedIndex()Grab the currently requested pipeline index. The VisionRunner may not have changed over to this pipeline yet. -
setCalibrationMode
public void setCalibrationMode(boolean wantsCalibration) Enters or exits calibration mode based on the parameter.
Exiting returns to the last used user pipeline.- Parameters:
wantsCalibration
- True to enter calibration mode, false to exit calibration mode.
-
setDriverMode
public void setDriverMode(boolean state) Enters or exits driver mode based on the parameter.
Exiting returns to the last used user pipeline.- Parameters:
state
- True to enter driver mode, false to exit driver mode.
-
getDriverMode
public boolean getDriverMode()Returns whether driver mode is active.- Returns:
- Whether driver mode is active.
-
addPipeline
-
addPipeline
-
setIndex
public void setIndex(int index) -
removePipeline
public int removePipeline(int index) -
renameCurrentPipeline
-
duplicatePipeline
public int duplicatePipeline(int index) Duplicate a pipeline at a given index- Parameters:
index
- the index of the target pipeline- Returns:
- The new index
-
changePipelineType
public void changePipelineType(int newType)
-