Skip to content

FlashLib in FRC

Tom Tzook edited this page Aug 29, 2017 · 14 revisions

From the start, FlashLib was meant to support FRC teams, but was never intended to replace WPILib. We wanted to provided an extended and more enhanced support and development enviornment allowing users to easily create advanced algorithms and robots.

WPILib Integration

To allow teams to use both WPILib and FlashLib, we designed the library to function in individual parts, so that it is possible to use only a part of FlashLib. That means that systems provided by both libraries won't intersect, but rather allow users to choose which of the two they wish to use.

Systems like the Robot Scheduling System and the Communication Management System are available in both libraries with different implementations, each with its own advantages and disadvantages. It is advised to try each of the systems in order to decide which is preferable for you.

There are 2 basic types of initializations of FlashLib for FRC:

  • Full: When using the full version of FlashLib, all FRC features are available and certain WPILib systems are replaced. This is the prefered mode when you wish to take full advantage of FlashLib. But the WPILib scheduling system should not be used.
  • Limited: When using the limited version of FlashLib, it is necessary to manually initialize wanted features in FlashLib. This allows the possible to choose what to initialize. This is the prefered mode for those who prefer WPILib bu want several tools from FlashLib.

IO

FlashLib does not provide any input-output capabilities with electronic components for the RoboRIO, meaning it is still necessary to use WPILib. However, to allow integration with motion algorithms and systems in FlashLib, speed controller wrappers are available. Use those wrapper if you wish to take advantage of built-in algorithms and systems.

Dashboard

Both FlashLib and WPILib provide dashboard for operators: Flashboard and SmartDashboard respectively. When initializing FlashLib, it is possible to select whether you wish to use Flashboard. So it is very simple to decide which dashboard you wish to use, but using both is always possible.

Communications

While FlashLib provides the Communication Management System, WPILib has its NetworkTables. The two do not intersect which means they both can be used at the same time. It is even possible to convert FlashLib Sendables to WPILib Tables.

Scheduler

When initializing FlashLib, it is possible to decide whether to use the Scheduling system. Since systems from both libraries provide similar service, choosing which is based on comfort and performance. Although it is possible to convert between Action and Command, convering between System and Subsystem cannot be done. Using both Schedulers is not a advisable and you should choose which is better for you before starting to write your program.