![]() |
1516X Push Back 1.0
1516X's robot code for the 2025-2026 VEX Robotics Competition
|
#include "main.h"
#include "lemlib/api.hpp"
#include "lemlib/chassis/chassis.hpp"
#include "lemlib/chassis/trackingWheel.hpp"
#include "liblvgl/llemu.hpp"
#include "pros/misc.h"
Go to the source code of this file.
Functions | |
pros::Controller | controller (CONTROLLER_MASTER) |
pros::MotorGroup | rightMotors ({-11, 2, 1}) |
pros::MotorGroup | leftMotors ({-16, 14,-13}) |
pros::IMU | imu (3) |
pros::Rotation | horizontal_tracking_sensor (12) |
pros::Rotation | vertical_tracking_sensor (15) |
lemlib::ControllerSettings | lateral_controller (10, 0, 3, 3, 1, 100, 3, 500, 20) |
lemlib::ControllerSettings | angular_controller (2, 0, 10, 3, 1, 100, 3, 500, 0) |
lemlib::Chassis | chassis (drivetrain, lateral_controller, angular_controller, sensors) |
void | initialize () |
void | disabled () |
void | competition_initialize () |
void | autonomous () |
void | opcontrol () |
Variables | |
lemlib::Drivetrain drivetrain & | leftMotors |
lemlib::TrackingWheel horizontal_tracking_wheel & | horizontal_tracking_sensor |
lemlib::TrackingWheel vertical_tracking_wheel & | vertical_tracking_sensor |
lemlib::OdomSensors sensors & | vertical_tracking_wheel |
lemlib::ControllerSettings angular_controller | ( | 2 | , |
0 | , | ||
10 | , | ||
3 | , | ||
1 | , | ||
100 | , | ||
3 | , | ||
500 | , | ||
0 | ) |
Referenced by chassis().
void autonomous | ( | ) |
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 104 of file main.cpp.
lemlib::Chassis chassis | ( | drivetrain | , |
lateral_controller | , | ||
angular_controller | , | ||
sensors | ) |
References angular_controller(), and lateral_controller().
Referenced by initialize(), and opcontrol().
void competition_initialize | ( | ) |
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.
Definition at line 91 of file main.cpp.
pros::Controller controller | ( | CONTROLLER_MASTER | ) |
Referenced by opcontrol().
void disabled | ( | ) |
pros::Rotation horizontal_tracking_sensor | ( | 12 | ) |
pros::IMU imu | ( | 3 | ) |
void initialize | ( | ) |
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 58 of file main.cpp.
References chassis().
lemlib::ControllerSettings lateral_controller | ( | 10 | , |
0 | , | ||
3 | , | ||
3 | , | ||
1 | , | ||
100 | , | ||
3 | , | ||
500 | , | ||
20 | ) |
Referenced by chassis().
pros::MotorGroup leftMotors | ( | {-16, 14,-13} | ) |
void opcontrol | ( | ) |
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 122 of file main.cpp.
References chassis(), and controller().
pros::MotorGroup rightMotors | ( | {-11, 2, 1} | ) |
pros::Rotation vertical_tracking_sensor | ( | 15 | ) |
lemlib::TrackingWheel horizontal_tracking_wheel& horizontal_tracking_sensor |
lemlib::TrackingWheel vertical_tracking_wheel& vertical_tracking_sensor |