Class TuneValue
java.lang.Object
frc.spectrumLib.telemetry.TuneValue
A number that can be changed from a dashboard at runtime without redeploying, for tuning gains,
speeds and other constants. Only in
TuningMode; otherwise it is its default and nothing
is published. For a value that should survive a deploy, use a frc.spectrumLib.params
param instead.
Backed by AdvantageKit's LoggedNetworkNumber (in 2026 it read SmartDashboard
directly), so the value is a logged input: a replayed match sees exactly the values the robot was
tuned to at every moment. Published under /Tuning/<name>.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetName()Dashboard key under which this value is published and read.Returns aDoubleSupplierthat callsupdate()each time it is queried.doublegetValue()Current value, refreshed on each call toupdate().update()Reads the current value and caches it locally.
-
Constructor Details
-
TuneValue
Creates a TuneValue, publishingdefaultValueif tuning mode is on.- Parameters:
name- dashboard keydefaultValue- initial value
-
-
Method Details
-
update
-
getSupplier
Returns aDoubleSupplierthat callsupdate()each time it is queried.- Returns:
- a supplier backed by this TuneValue
-
getValue
public double getValue()Current value, refreshed on each call toupdate(). -
getName
Dashboard key under which this value is published and read.
-