main.h file

Contents

Contains common definitions and header files used throughout your PROS project.

This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.

Functions

void autonomous(void)
You should add more #includes here.
void initialize(void)
void disabled(void)
void competition_initialize(void)
void opcontrol(void)

Defines

#define PROS_USE_SIMPLE_NAMES
If defined, some commonly used enums will have preprocessor macros which give a shorter, more convenient naming pattern.
#define PROS_USE_LITERALS
If defined, C++ literals will be available for use.

Function documentation

void autonomous(void)

You should add more #includes here.

If you find doing pros::Motor() to be tedious and you'd prefer just to do Motor, you can use the namespace with the following commented out line.

IMPORTANT: Only the okapi or pros namespace may be used, not both concurrently! The okapi namespace will export all symbols inside the pros namespace. Prototypes for the competition control tasks are redefined here to ensure that they can be called from user code (i.e. calling autonomous from a button press in opcontrol() for testing purposes).

Define documentation

#define PROS_USE_SIMPLE_NAMES

If defined, some commonly used enums will have preprocessor macros which give a shorter, more convenient naming pattern.

If this isn't desired, simply comment the following line out.

For instance, E_CONTROLLER_MASTER has a shorter name: CONTROLLER_MASTER. E_CONTROLLER_MASTER is pedantically correct within the PROS styleguide, but not convenient for most student programmers.

#define PROS_USE_LITERALS

If defined, C++ literals will be available for use.

All literals are in the pros::literals namespace.

For instance, you can do 4_mtr = 50 to set motor 4's target velocity to 50