FtcTelemetry

object FtcTelemetry : OnCreateEventLoop, OpModeManagerNotifier.Notifications

Connects Telemetry to the FTC OpMode lifecycle, with no other part of NextFTC involved.

Sloth finds this object and calls onCreateEventLoop when the Robot Controller creates its event loop. From then on every OpMode gets a WPILogBackend (if FtcTelemetryConfig.logToFile), a NT4Backend (if FtcTelemetryConfig.liveServer) and a DriverStationBackend (if FtcTelemetryConfig.driverStation) registered on Telemetry.registry before its init, and closed after it stops. The server also needs isServerEnabled, which the "Enable/Disable NextFTC Telemetry Server" OpModes switch, so it can be turned off for competition. The server outlives the OpModes, so a dashboard stays connected between them, and is stopped when the Robot Controller app is destroyed.

Properties

Link copied to clipboard
open val adjacencyRule: AdjacencyRule<OnCreateEventLoop, Graph<OnCreateEventLoop>>
Link copied to clipboard

The settings used for each OpMode.

Link copied to clipboard

Whether the NetworkTables server may run, saved on the Robot Controller so it holds across app restarts. The server runs when this and FtcTelemetryConfig.liveServer are both true. Change it with setServerEnabled, or the "Enable/Disable NextFTC Telemetry Server" OpModes.

Functions

Link copied to clipboard
open override fun onCreateEventLoop(context: Context, ftcEventLoop: FtcEventLoop)
Link copied to clipboard
open override fun onOpModePostStop(opMode: OpMode?)
Link copied to clipboard
open override fun onOpModePreInit(opMode: OpMode?)
Link copied to clipboard
open override fun onOpModePreStart(opMode: OpMode?)
Link copied to clipboard

Turns the NetworkTables server on or off, and saves the choice so it holds across app restarts.

Link copied to clipboard

Sends the values logged since the last update to the Driver Station, like telemetry.update() but only for the lines this library added. A LinearOpMode has to call it (or telemetry.update()) every loop, because the SDK only updates after each loop of an iterative OpMode. It does nothing when FtcTelemetryConfig.driverStation is off.