1516b Over Under 2.0
Codebase for 1516b over under season
|
This file contains the main code for the robot's operation. More...
#include "main.h"
#include <ostream>
#include "api.h"
#include "pros/apix.h"
#include "pros/serial.h"
Go to the source code of this file.
Classes | |
struct | Robot::RobotSubsystems |
Structure that holds instances of all robot subsystems. More... | |
Namespaces | |
namespace | Robot |
Contains all objects generated by the 1516B team - Contains all of the subsystems, methods, and global objects. | |
Functions | |
void | toggles () |
void | initialize () |
void | disabled () |
void | competition_initialize () |
void | autonomous () |
void | opcontrol () |
Variables | |
struct Robot::RobotSubsystems | Robot::subsystem |
This file contains the main code for the robot's operation.
Definition in file main.cpp.
void autonomous | ( | void | ) |
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.
void toggles | ( | ) |
A callback function for LLEMU's center button.
When this callback is fired, it will toggle line 2 of the LCD text between "I was pressed!" and nothing.
Definition at line 48 of file main.cpp.
References Robot::RobotSubsystems::autonomous, Robot::RobotSubsystems::drivetrain, Robot::RobotSubsystems::puncher, and Robot::Utility::toggleSubsystemOptions().
Referenced by initialize().