public abstract class AbstractDriveWidget<T>
extends edu.wpi.first.shuffleboard.api.widget.SimpleAnnotatedWidget<T>
dataProperty, typedSourceProperty
Constructor and Description |
---|
AbstractDriveWidget() |
Modifier and Type | Method and Description |
---|---|
protected static javafx.scene.shape.Shape |
generateX(double width)
Generates an X-shape centered at (0, 0).
|
protected edu.wpi.first.shuffleboard.api.sources.DataSource<SpeedControllerData> |
motorSource(edu.wpi.first.shuffleboard.api.sources.DataSource<T> source,
java.lang.String motorName,
java.util.function.ToDoubleFunction<T> getter,
java.util.function.BiFunction<T,java.lang.Double,T> setter)
Creates a subsource for a specific motor in a drive base.
|
protected static void |
overrideWidgetSize(edu.wpi.first.shuffleboard.api.widget.Widget... widgets)
Overrides the intrinsic minimum dimensions of some widgets.
|
protected static javafx.scene.shape.Shape |
union(java.util.Collection<? extends javafx.scene.shape.Shape> shapes)
Performs a union of an arbitrary amount of shapes.
|
protected static javafx.scene.shape.Shape |
union(javafx.scene.shape.Shape... shapes)
Performs a union of an arbitrary amount of shapes.
|
dataProperty, typedSourceProperty
addSource, getSource, setSource, sourceProperty
exportProperties, getProperties, getSources, setTitle, titleProperty
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getDataTypes, getDescription, getName
getData, getDataType, setData
allComponents, getProperties
protected static void overrideWidgetSize(edu.wpi.first.shuffleboard.api.widget.Widget... widgets)
protected edu.wpi.first.shuffleboard.api.sources.DataSource<SpeedControllerData> motorSource(edu.wpi.first.shuffleboard.api.sources.DataSource<T> source, java.lang.String motorName, java.util.function.ToDoubleFunction<T> getter, java.util.function.BiFunction<T,java.lang.Double,T> setter)
source
- the source for the drive base datamotorName
- the motor name (eg "Left Motor" or "Right Motor")getter
- the getter (eg DifferentialDriveData::getLeftSpeed
)setter
- the setter (eg DifferentialDriveData::withLeftSpeed
)protected static javafx.scene.shape.Shape generateX(double width)
width
- the width of the X to generateprotected static javafx.scene.shape.Shape union(java.util.Collection<? extends javafx.scene.shape.Shape> shapes)
shapes
- the shapes to unionprotected static javafx.scene.shape.Shape union(javafx.scene.shape.Shape... shapes)
shapes
- the shapes to union