FateLogManager

object FateLogManager : OpModeManagerNotifier.Notifications

Gives every OpMode a log. It registers a FateLogBackend on Fate.registry when the OpMode is initialized and closes it when the OpMode stops.

Nothing needs setting up. The Robot Controller calls registerOpModeListener at startup, and from then on whatever robot code logs through Fate lands in the running OpMode's log. Values logged while no OpMode is running, such as between OpModes, are not written to a log.

Only the backend this class registers is ever removed, so a backend you register yourself on Fate.registry keeps working across OpModes.

Properties

Link copied to clipboard

Whether OpMode logs go to a .fate file, to connected AdvantageScope clients, or both.

Functions

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
@OnCreateEventLoop
fun registerOpModeListener(context: Context, eventLoop: FtcEventLoop)
Link copied to clipboard
fun start(fileName: String, mode: LogMode = LogMode.BOTH): FateLogBackend

Returns a backend that writes to a log file named fileName and to the live stream, when mode allows it and FlightProjector is running. In LogMode.LIVE the file is skipped while the stream is running.

Link copied to clipboard

Like start, with the current date and time ahead of fileName so no log overwrites another.