RobotCore 1.0
WPILib port to raspberry Pi
Loading...
Searching...
No Matches
org.wpilib.tunable.TunableFloat Class Referenceabstract
Inheritance diagram for org.wpilib.tunable.TunableFloat:
org.wpilib.tunable.TunableBase org.wpilib.util.function.FloatSupplier org.wpilib.util.function.FloatConsumer

Public Member Functions

abstract void set (float value)
abstract float get ()
float getAsFloat ()
void accept (float value)
Public Member Functions inherited from org.wpilib.tunable.TunableBase
boolean isRobust ()
String getProperties ()
TunableConfig getConfig ()
boolean hasChanged ()
boolean supportsChangeNotification ()
void resetChanged ()

Static Public Member Functions

static TunableFloat create ()
static TunableFloat create (float initialValue)
static TunableFloat create (FloatSupplier getter, FloatConsumer setter)
static TunableFloat createConfig (TunableConfig config)
static TunableFloat createConfig (float initialValue, TunableConfig config)
static TunableFloat createConfig (FloatSupplier getter, FloatConsumer setter, TunableConfig config)

Protected Member Functions

 TunableFloat (TunableConfig config)
 TunableFloat (TunableConfig config, boolean supportsChangeNotification)
Protected Member Functions inherited from org.wpilib.tunable.TunableBase
 TunableBase (TunableConfig config)
 TunableBase (TunableConfig config, boolean supportsChangeNotification)
void markChanged ()

Additional Inherited Members

Protected Attributes inherited from org.wpilib.tunable.TunableBase
boolean m_changed

Detailed Description

A tunable float.

Definition at line 11 of file TunableFloat.java.

Constructor & Destructor Documentation

◆ TunableFloat() [1/2]

org.wpilib.tunable.TunableFloat.TunableFloat ( TunableConfig config)
protected

Constructs a tunable float.

Parameters
configtunable config

Definition at line 122 of file TunableFloat.java.

◆ TunableFloat() [2/2]

org.wpilib.tunable.TunableFloat.TunableFloat ( TunableConfig config,
boolean supportsChangeNotification )
protected

Constructs a tunable float.

Parameters
configtunable config
supportsChangeNotificationwhether the tunable notifies backends when it changes

Definition at line 132 of file TunableFloat.java.

Member Function Documentation

◆ accept()

void org.wpilib.tunable.TunableFloat.accept ( float value)

Performs this operation on the given argument.

Parameters
valuethe input argument

Implements org.wpilib.util.function.FloatConsumer.

Definition at line 160 of file TunableFloat.java.

◆ create() [1/3]

TunableFloat org.wpilib.tunable.TunableFloat.create ( )
static

Creates a tunable float with the initial value of 0.0.

Returns
a tunable float

Definition at line 17 of file TunableFloat.java.

◆ create() [2/3]

TunableFloat org.wpilib.tunable.TunableFloat.create ( float initialValue)
static

Creates a tunable float with the given initial value.

Parameters
initialValueinitial value
Returns
a tunable float

Definition at line 27 of file TunableFloat.java.

◆ create() [3/3]

TunableFloat org.wpilib.tunable.TunableFloat.create ( FloatSupplier getter,
FloatConsumer setter )
static

Creates a tunable float with the given getter and setter.

The getter and setter must not throw.

Parameters
gettergetter for the tunable value
settersetter for the tunable value
Returns
a tunable float

Definition at line 40 of file TunableFloat.java.

◆ createConfig() [1/3]

TunableFloat org.wpilib.tunable.TunableFloat.createConfig ( float initialValue,
TunableConfig config )
static

Creates a tunable float with the given initial value and config.

Parameters
initialValueinitial value
configtunable config
Returns
a tunable float

Definition at line 61 of file TunableFloat.java.

◆ createConfig() [2/3]

TunableFloat org.wpilib.tunable.TunableFloat.createConfig ( FloatSupplier getter,
FloatConsumer setter,
TunableConfig config )
static

Creates a tunable float with the given getter, setter, and config.

The getter and setter must not throw.

Parameters
gettergetter for the tunable value
settersetter for the tunable value
configtunable config
Returns
a tunable float

Definition at line 91 of file TunableFloat.java.

◆ createConfig() [3/3]

TunableFloat org.wpilib.tunable.TunableFloat.createConfig ( TunableConfig config)
static

Creates a tunable float with the given config and an initial value of 0.0.

Parameters
configtunable config
Returns
a tunable float

Definition at line 50 of file TunableFloat.java.

◆ get()

abstract float org.wpilib.tunable.TunableFloat.get ( )
abstract

Gets the value.

Implementations must not throw.

Returns
value

◆ getAsFloat()

float org.wpilib.tunable.TunableFloat.getAsFloat ( )

Gets a result.

Returns
a result

Implements org.wpilib.util.function.FloatSupplier.

Definition at line 155 of file TunableFloat.java.

◆ set()

abstract void org.wpilib.tunable.TunableFloat.set ( float value)
abstract

Sets the value.

Implementations must not throw.

Parameters
valuevalue

The documentation for this class was generated from the following file: