1516b Over Under 2.0
Codebase for 1516b over under season
|
#include "api.h"
#include "robot/auton.h"
#include "globals.h"
#include "robot/drivetrain.h"
#include "robot/puncher.h"
#include "robot/intake.h"
#include "robot/utility.h"
Go to the source code of this file.
Macros | |
#define | PROS_USE_SIMPLE_NAMES |
#define | PROS_USE_LITERALS |
Functions | |
void | autonomous (void) |
void | initialize (void) |
void | disabled (void) |
void | competition_initialize (void) |
void | opcontrol (void) |
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/.
Definition in file main.h.
#define PROS_USE_LITERALS |
#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.
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).
Runs the user autonomous code. This function will be started in its own task with the default priority and stack size whenever the robot is enabled via the Field Management System or the VEX Competition Switch in the autonomous mode. Alternatively, this function may be called in initialize or opcontrol for non-competition testing purposes.
If the robot is disabled or communications is lost, the autonomous task will be stopped. Re-enabling the robot will restart the task, not re-start it from where it left off.
Definition at line 121 of file main.cpp.
References Robot::Autonomous::AutoDrive(), Robot::RobotSubsystems::autonomous, and Robot::RobotSubsystems::puncher.
void competition_initialize | ( | void | ) |
Runs after initialize(), and before autonomous when connected to the Field Management System or the VEX Competition Switch. This is intended for competition-specific initialization routines, such as an autonomous selector on the LCD.
This task will exit when the robot is enabled and autonomous or opcontrol starts.<asd></asd>
Definition at line 95 of file main.cpp.
void disabled | ( | void | ) |
void initialize | ( | void | ) |
Runs initialization code. This occurs as soon as the program is started.
All other competition modes are blocked by initialize; it is recommended to keep execution time for this mode under a few seconds.
Definition at line 59 of file main.cpp.
References Robot::Globals::chassis, Robot::Utility::displayLocation(), Robot::Utility::displayMotorVel(), and toggles().
void opcontrol | ( | void | ) |
Runs the operator control code. This function will be started in its own task with the default priority and stack size whenever the robot is enabled via the Field Management System or the VEX Competition Switch in the operator control mode.
If no competition control is connected, this function will run immediately following initialize().
If the robot is disabled or communications is lost, the operator control task will be stopped. Re-enabling the robot will restart the task, not resume it from where it left off.
Definition at line 144 of file main.cpp.
References Robot::RobotSubsystems::drivetrain, Robot::RobotSubsystems::intake, Robot::RobotSubsystems::puncher, Robot::Drivetrain::run(), Robot::Intake::run(), Robot::Wings::run(), Robot::Puncher::run(), and Robot::RobotSubsystems::wings.