Package org.hyperonline.hyperlib.vision
Class TargetWithHeightConnector
- java.lang.Object
-
- org.hyperonline.hyperlib.vision.AbstractVisionConnector<TargetWithHeightResult>
-
- org.hyperonline.hyperlib.vision.TargetWithHeightConnector
-
- All Implemented Interfaces:
VisionConnector
public class TargetWithHeightConnector extends AbstractVisionConnector<TargetWithHeightResult>
NetworkTables Connector for an AbstractTargetProcessor of TargetWithHeightResult
-
-
Field Summary
-
Fields inherited from class org.hyperonline.hyperlib.vision.AbstractVisionConnector
m_foundTarget, m_lastResult, m_lastResultTimestamp, m_table, m_xAbs, m_xError, m_yAbs, m_yError
-
-
Constructor Summary
Constructors Constructor Description TargetWithHeightConnector(java.lang.String subTableName, edu.wpi.first.networktables.NetworkTableInstance inst)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TargetWithHeightResult
getDefaultValue()
edu.wpi.first.wpilibj.PIDSource
heightPID()
Get a PID source that returns the height of the target.protected void
next(edu.wpi.first.networktables.NetworkTable table, java.lang.String key, edu.wpi.first.networktables.NetworkTableEntry entry, edu.wpi.first.networktables.NetworkTableValue value, int flags)
evaluate and process the results in NetworkTables to my lastResultvoid
publish()
publish VisionResult values to corresponding NetworkTable Entries should be overriden and supered by any children of type T extends VisionResultprotected TargetWithHeightResult
retrieve()
retrieve a TargetWithHeightResult from NetworkTable Entries-
Methods inherited from class org.hyperonline.hyperlib.vision.AbstractVisionConnector
getLastResult, subscribe, unsubscribe, updateResult, xPID, yPID
-
-
-
-
Method Detail
-
retrieve
protected TargetWithHeightResult retrieve()
retrieve a TargetWithHeightResult from NetworkTable Entries- Overrides:
retrieve
in classAbstractVisionConnector<TargetWithHeightResult>
- Returns:
- {TargetWithHeightResult}
-
publish
public void publish()
publish VisionResult values to corresponding NetworkTable Entries should be overriden and supered by any children of type T extends VisionResult- Specified by:
publish
in interfaceVisionConnector
- Overrides:
publish
in classAbstractVisionConnector<TargetWithHeightResult>
-
heightPID
public edu.wpi.first.wpilibj.PIDSource heightPID()
Get a PID source that returns the height of the target.- Returns:
- A PID source returning the height of the target.
-
getDefaultValue
public TargetWithHeightResult getDefaultValue()
- Specified by:
getDefaultValue
in classAbstractVisionConnector<TargetWithHeightResult>
- Returns:
- {T}
-
next
protected void next(edu.wpi.first.networktables.NetworkTable table, java.lang.String key, edu.wpi.first.networktables.NetworkTableEntry entry, edu.wpi.first.networktables.NetworkTableValue value, int flags)
evaluate and process the results in NetworkTables to my lastResult- Specified by:
next
in classAbstractVisionConnector<TargetWithHeightResult>
- Parameters:
table
- NetworkTable to get values fromkey
- Key of the entry that triggered the Listenerentry
- Entry that was updatedvalue
- the new Valueflags
- Listener flags (created, updated, removed, etc)
-
-