Package org.team1126.lib.tunable
Class TunableTable
java.lang.Object
org.team1126.lib.tunable.TunableTable
A TunableTable represents a nested table of tunable values in the NetworkTables tree.
-
Method Summary
Modifier and TypeMethodDescription<T> TAdds an object to be tuned.Gets a table that can be used to add nested tunable values under a specified path.Adds a tunable boolean value to the table.Adds a tunable boolean value to the table.Adds a tunable double value to the table.value(String name, double defaultValue, DoubleConsumer onChange) Adds a tunable double value to the table.Adds a tunable float value to the table.Adds a tunable float value to the table.Adds a tunable integer value to the table.value(String name, int defaultValue, IntConsumer onChange) Adds a tunable integer value to the table.Adds a tunable string value to the table.Adds a tunable string value to the table.
-
Method Details
-
getNested
Gets a table that can be used to add nested tunable values under a specified path.- Parameters:
name- The name of the table. Must be unique.
-
add
Adds an object to be tuned. The specified object must implementTunables.Tunable, or have a registeredTunables.TunableHandlerin order for it to be added.- Type Parameters:
T- The object's class.- Parameters:
name- The name for the tunable. Must be unique.obj- The object to be tuned.- Returns:
- The provided object.
-
value
Adds a tunable boolean value to the table.- Parameters:
name- The name for the tunable value. Must be unique.defaultValue- The default value of the tunable (e.g. a programmed constant).
-
value
public Tunables.TunableBoolean value(String name, boolean defaultValue, edu.wpi.first.util.function.BooleanConsumer onChange) Adds a tunable boolean value to the table.- Parameters:
name- The name for the tunable value. Must be unique.defaultValue- The default value of the tunable (e.g. a programmed constant).onChange- A consumer that is invoked when the value of the tunable is modified.
-
value
Adds a tunable integer value to the table.- Parameters:
name- The name for the tunable value. Must be unique.defaultValue- The default value of the tunable (e.g. a programmed constant).
-
value
Adds a tunable integer value to the table.- Parameters:
name- The name for the tunable value. Must be unique.defaultValue- The default value of the tunable (e.g. a programmed constant).onChange- A consumer that is invoked when the value of the tunable is modified.
-
value
Adds a tunable float value to the table.- Parameters:
name- The name for the tunable value. Must be unique.defaultValue- The default value of the tunable (e.g. a programmed constant).
-
value
public Tunables.TunableFloat value(String name, float defaultValue, edu.wpi.first.util.function.FloatConsumer onChange) Adds a tunable float value to the table.- Parameters:
name- The name for the tunable value. Must be unique.defaultValue- The default value of the tunable (e.g. a programmed constant).onChange- A consumer that is invoked when the value of the tunable is modified.
-
value
Adds a tunable double value to the table.- Parameters:
name- The name for the tunable value. Must be unique.defaultValue- The default value of the tunable (e.g. a programmed constant).
-
value
Adds a tunable double value to the table.- Parameters:
name- The name for the tunable value. Must be unique.defaultValue- The default value of the tunable (e.g. a programmed constant).onChange- A consumer that is invoked when the value of the tunable is modified.
-
value
Adds a tunable string value to the table.- Parameters:
name- The name for the tunable value. Must be unique.defaultValue- The default value of the tunable (e.g. a programmed constant).
-
value
Adds a tunable string value to the table.- Parameters:
name- The name for the tunable value. Must be unique.defaultValue- The default value of the tunable (e.g. a programmed constant).onChange- A consumer that is invoked when the value of the tunable is modified.
-