Getting Started with OkapiLib¶
This documentation is for OkapiLib version 3.x.x, and might be inaccurate for versions 4.x.x and above. Documentation for the latest version can be found here.
The latest version of this tutorial can be found here.
OkapiLib is installed in all new PROS projects by default. If you are unsure if OkapiLib is
installed, you can check the output of
pros conduct info-project. Additionally, OkapiLib’s
header files reside in
include/okapi. Once you know that OkapiLib is installed, you can start
using it by uncommenting OkapiLib’s API header include statement in the file
(line 4 below):
1 2 3 4 5
/** * You should add more #includes here */ #include "okapi/api.hpp" //#include "pros/api_legacy.h"
Then, in file
src/opcontrol.cpp, remove the statement
using namespace pros::literals (if it exists).
That’s it! Take a look at the other tutorials to get a better understanding of the tools Okapilib has.