Package org.team1126.lib.tunable
Class Tunables.TunableFloat
java.lang.Object
org.team1126.lib.tunable.Tunables.TunableFloat
- Enclosing class:
Tunables
A tunable float value. Can be modified via NetworkTables.
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddListener(edu.wpi.first.util.function.FloatConsumer onChange) Adds a listener that will be invoked when the tunable's value is modified.floatget()Returns the value of the tunable.voidpoll()voidset(float value) Sets the value of the tunable.
-
Method Details
-
get
public float get()Returns the value of the tunable. -
set
public void set(float value) Sets the value of the tunable.- Parameters:
value- The new value.
-
addListener
public void addListener(edu.wpi.first.util.function.FloatConsumer onChange) Adds a listener that will be invoked when the tunable's value is modified. Will no-op if the listener isnull.- Parameters:
onChange- A consumer that is invoked when the value of the tunable is modified.
-
poll
public void poll()
-