Package com.stuypulse.stuylib.network
Class SmartBoolean
java.lang.Object
com.stuypulse.stuylib.network.SmartBoolean
- All Implemented Interfaces:
BStream
,BooleanSupplier
SmartBoolean
works as a wrapper for values on SmartDashboard
. The idea for this
class was to make getting values on SmartDashboard
easier by making them variables that
you know were initialized.-
Constructor Summary
ConstructorDescriptionSmartBoolean
(String id, boolean value) Creates aSmartBoolean
with the element name and a default value. -
Method Summary
-
Constructor Details
-
SmartBoolean
Creates aSmartBoolean
with the element name and a default value. The value onSmartDashboard
will be reset to the default value on initialization.- Parameters:
id
- the name of the boolean onSmartDashboard
value
- the default / initialization value for the value
-
-
Method Details
-
get
public boolean get() -
getDefault
public boolean getDefault()- Returns:
- the default value of the boolean
-
set
public void set(boolean value) - Parameters:
value
- what the value onSmartDashboard
will be set to
-
reset
public void reset()Resets the value onSmartDashboard
to the default value
-