allwpilib
allwpilib copied to clipboard
Add persistent alerts API
Related to #6573. This is a version of the 6328 Alert class, which is already compatible with Elastic and FWC (and soon Shuffleboard). The expected usage is described in the class Javadocs. This API is intended only for alerts which can be declared at startup and activated/deactivated as necessary. Other use cases (i.e. alerts that are periodic or non-persistent) should be handled through other channels, like console logging.
NT publishing is handled internally via a private Sendable class, which is different than the traditional usage of Sendable. The idea is to minimize the setup required for declaring new alerts (i.e. manually publishing alerts/groups via the SmartDashboard API is unnecessary when adding a new alert).