#Lib4131# A utility library for FRC 4131
This library is an addon to the WPILib libraries that are distributed by FIRST every year. It is written in and for Java, and contains a variety of useful utilities, including:
- "Pseudo" motor controllers that aren't attached to physical parts, so you can construct a
RobotDrive
with them and intercept the values they are being set to - Driver control components like XBox One controllers, Logitech Attack 3 joysticks, and TI Launchpad boards
- Base classes for components (subsystems), commands, commands that execute instantaneously, and "default commands" (commands that run constantly when a subsystem is not being used)
- Basic logging system through
Robot
class - Commands to wait for a time and log a message (useful in command groups)
These plugins are not truly intended for use by anyone except ourselves, however it is most certainly open for use by anyone. ##Setup##
- This library is not a replacement for WPILib. You must first install and configure Eclipse and the FRC plugins for the year, and have a command-based robot project created.
- Download
lib4131.jar
to your computer. - In Eclipse, right-click project > Build Path > Configure Build Path > Libraries. Add
lib4131.jar
to the list. - Open the
build.properties
file for your project in your text editor of choice. Add the following line:classpath=<wpi-path>:<nettable-path>:<lib4131-path>
where<wpi-path>
is the path toWPILib.jar
(on Windows this is usuallyC:\Users\You\wpilib\java\current\lib\WPILib.jar
),<nettable-path>
is the path toNetworkTables.jar
(C:\Users\You\wpilibj\java\current\lib\NetworkTables.jar
), and<lib4131-path>
is the path tolib4131.jar
. The paths can be absolute, or relative. The root is the project directory. - Refresh Eclipse to make sure the changes are registered.
- Write your robot code.
- Perform a WPILib Java Deploy, as you usually do, to push the code to the robot. The library will be pushed with it.