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
ConstructorsConstructorDescriptionSmartBoolean(String id, boolean value) Creates aSmartBooleanwith the element name and a default value. -
Method Summary
-
Constructor Details
-
SmartBoolean
Creates aSmartBooleanwith the element name and a default value. The value onSmartDashboardwill be reset to the default value on initialization.- Parameters:
id- the name of the boolean onSmartDashboardvalue- 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 onSmartDashboardwill be set to
-
reset
public void reset()Resets the value onSmartDashboardto the default value
-