Package com.cdarobotics.cdalib.telemetry
Class TelemetryManager
java.lang.Object
com.cdarobotics.cdalib.telemetry.TelemetryManager
Manages a set of
telemetry entries and controls which are pushed to the driver
station. Entries are grouped by tag; only entries whose tag is in the active display set (see
setDisplayTags(String...)) are shown when displayTelemetry() is called.-
Constructor Summary
ConstructorsConstructorDescriptionTelemetryManager(org.firstinspires.ftc.robotcore.external.Telemetry telemetry) Creates a manager that writes to the given telemetry backend. -
Method Summary
Modifier and TypeMethodDescriptionvoidRegisters an existing entry.voidBuilds and registers an entry with an explicit group tag.voidBuilds and registers an entry in the"default"group.voidRenders every registered entry whose tag is in the active display set, then pushes the batch to the driver station.voidremoveDisplayTags(String... tags) Removes the given tags from the set of groups shown bydisplayTelemetry().voidsetDisplayTags(String... tags) Adds the given tags to the set of groups shown bydisplayTelemetry().
-
Constructor Details
-
TelemetryManager
public TelemetryManager(org.firstinspires.ftc.robotcore.external.Telemetry telemetry) Creates a manager that writes to the given telemetry backend.- Parameters:
telemetry- the OpMode telemetry to render entries to.
-
-
Method Details
-
addEntry
Registers an existing entry. -
addEntry
Builds and registers an entry with an explicit group tag.- Parameters:
tag- the group tag for the entry.label- the label shown for the entry.supplier- supplies the entry's current value on each display.
-
addEntry
Builds and registers an entry in the"default"group.- Parameters:
label- the label shown for the entry.supplier- supplies the entry's current value on each display.
-
setDisplayTags
Adds the given tags to the set of groups shown bydisplayTelemetry(). -
removeDisplayTags
Removes the given tags from the set of groups shown bydisplayTelemetry(). -
displayTelemetry
public void displayTelemetry()Renders every registered entry whose tag is in the active display set, then pushes the batch to the driver station. Values are re-fetched from each entry's supplier as they are rendered.
-