![]() |
1516X Push Back 1.0
1516X's robot code for the 2025-2026 VEX Robotics Competition
|
#include "globals.h"#include "pros/distance.hpp"#include "lemlib/chassis/chassis.hpp"#include "pros/adi.hpp"#include "pros/optical.hpp"#include "pros/vision.hpp"#include "colorSort.h"#include "IntakeAntiJam.h"#include "Chassis.h"Go to the source code of this file.
Functions | |
| pros::Controller | controller (pros::E_CONTROLLER_MASTER) |
| pros::MotorGroup | rightMotors ({17, 19, -18}, pros::MotorGears::blue) |
| pros::MotorGroup | leftMotors ({-12, 13, -14}, pros::MotorGears::blue) |
| pros::Imu | imu (16) |
| pros::Rotation | horizontal_tracking_sensor (-15) |
| pros::Rotation | vertical_tracking_sensor (9) |
| lemlib::ControllerSettings | lateral_controller (lateralKP, lateralKI, lateralKD, 3, 1, 50, 3, 200, 0) |
| lemlib::ControllerSettings | angular_controller (angularKP, angularKI, angularKD, 3, 1, 50, 3, 100, 0) |
| lemlib::ExpoDriveCurve | throttle_curve (10, 20, 1.012) |
| lemlib::ExpoDriveCurve | steer_curve (10, 20, 1) |
| Chassis | chassis (drivebase, lateral_controller, angular_controller, sensors, &throttle_curve, &steer_curve) |
| pros::Motor | intakeMotor (-1, pros::v5::MotorGears::blue) |
| pros::Motor | storageMotor (2, pros::v5::MotorGears::blue) |
| pros::Motor | outtakeMotor (3, pros::MotorGears::blue) |
| pros::Distance | rightDistance (6) |
| pros::Distance | leftDistance (5) |
| pros::Distance | frontDistance (8) |
| pros::Distance | backDistance (7) |
| pros::adi::Pneumatics | intake_lift ('A', false) |
| pros::adi::Pneumatics | hood ('B', false) |
| pros::adi::Pneumatics | matchloader ('C', false) |
| pros::adi::Pneumatics | descore ('D', true) |
| pros::adi::Pneumatics | mid_descore ('E', false) |
| pros::Optical | color_sensor (10) |
| pros::Vision | vision_sensor (18) |
| IntakeAntiJam | jamManager (intakeMotor, outtakeMotor, storageMotor, 55) |
Variables | |
| lemlib::Drivetrain drivebase & | leftMotors |
| const float | horizontal_offset = (-1.18588887482 -1.2351177609)/2 |
| const float | vertical_offset = (-0.414862637269 + 0.0661399466844)/2 |
| lemlib::TrackingWheel horizontal_tracking_wheel & | horizontal_tracking_sensor |
| lemlib::TrackingWheel vertical_tracking_wheel & | vertical_tracking_sensor |
| lemlib::OdomSensors sensors & | vertical_tracking_wheel |
| const float | lateralKP = 9 |
| const float | lateralKI = 0.001 |
| const float | lateralKD = 72 |
| const float | angularKP = 3.07 |
| const float | angularKI = 0.0015 |
| const float | angularKD = 26.5 |
| Color | allianceColor = Color::RED |
| bool | color_sort_enable = false |
| bool | midgoal_first = false |
| int | ramp_up_time = 0 |
| int | low_ramp_down_time = 0 |
| bool | antiJamEnabled = false |
| bool | liveReplay = false |
| pros::Distance backDistance | ( | 7 | ) |
Referenced by calculateGlobalPosition(), distance_sensor_disconnect_warning(), distanceReset(), distanceReset(), and MCL::MonteCarlo().
| Chassis chassis | ( | drivebase | , |
| lateral_controller | , | ||
| angular_controller | , | ||
| sensors | , | ||
| & | throttle_curve, | ||
| & | steer_curve ) |
References angular_controller(), lateral_controller(), steer_curve(), and throttle_curve().
Referenced by awp_auton(), calculateGlobalPosition(), carry_auton(), crossBarrier(), distanceReset(), distanceReset(), initialize(), left_auton_split(), left_rush(), MCL::MonteCarlo(), opcontrol(), relativeMotion(), right_7_hood(), right_7_wing(), right_auton_split(), right_rush(), score_longgoal_auton(), score_midgoal_auton(), and skills_auton().
| pros::Optical color_sensor | ( | 10 | ) |
Referenced by get_color().
| pros::Controller controller | ( | pros::E_CONTROLLER_MASTER | ) |
Referenced by alignToGoal(), distance_sensor_disconnect_warning(), motor_disconnect_warning(), opcontrol(), and temp_warning().
| pros::adi::Pneumatics descore | ( | 'D' | , |
| true | ) |
Referenced by left_auton_split(), left_rush(), opcontrol(), right_7_wing(), right_auton_split(), right_rush(), and skills_auton().
| pros::Distance frontDistance | ( | 8 | ) |
| pros::adi::Pneumatics hood | ( | 'B' | , |
| false | ) |
Referenced by intake(), intake_stop(), right_7_hood(), score_longgoal(), and score_longgoal_auton().
| pros::Rotation horizontal_tracking_sensor | ( | - | 15 | ) |
| pros::Imu imu | ( | 16 | ) |
Referenced by crossBarrier(), and opcontrol().
| pros::adi::Pneumatics intake_lift | ( | 'A' | , |
| false | ) |
Referenced by auton_check(), intake_stop(), outtake(), and skills_auton().
| pros::Motor intakeMotor | ( | - | 1, |
| pros::v5::MotorGears::blue | ) |
Referenced by init_motor_dashboard(), and jamManager().
| IntakeAntiJam jamManager | ( | intakeMotor | , |
| outtakeMotor | , | ||
| storageMotor | , | ||
| 55 | ) |
References intakeMotor(), outtakeMotor(), and storageMotor().
Referenced by antiJamTask(), awp_auton(), intake(), intake_stop(), opcontrol(), outtake(), score_longgoal(), score_longgoal_auton(), score_midgoal(), score_midgoal_auton(), and skills_auton().
| pros::Distance leftDistance | ( | 5 | ) |
Referenced by calculateGlobalPosition(), distance_sensor_disconnect_warning(), distanceReset(), distanceReset(), and MCL::MonteCarlo().
| pros::MotorGroup leftMotors | ( | {-12, 13, -14} | , |
| pros::MotorGears::blue | ) |
| pros::adi::Pneumatics matchloader | ( | 'C' | , |
| false | ) |
Referenced by crossBarrier(), matchload_state(), and opcontrol().
| pros::adi::Pneumatics mid_descore | ( | 'E' | , |
| false | ) |
Referenced by left_auton_split(), and opcontrol().
| pros::Motor outtakeMotor | ( | 3 | , |
| pros::MotorGears::blue | ) |
Referenced by init_motor_dashboard(), jamManager(), and opcontrol().
| pros::Distance rightDistance | ( | 6 | ) |
Referenced by calculateGlobalPosition(), distance_sensor_disconnect_warning(), distanceReset(), distanceReset(), and MCL::MonteCarlo().
| pros::MotorGroup rightMotors | ( | {17, 19, -18} | , |
| pros::MotorGears::blue | ) |
Referenced by alignToGoal(), crossBarrier(), init_motor_dashboard(), opcontrol(), and temp_warning().
| lemlib::ExpoDriveCurve steer_curve | ( | 10 | , |
| 20 | , | ||
| 1 | ) |
Referenced by chassis().
| pros::Motor storageMotor | ( | 2 | , |
| pros::v5::MotorGears::blue | ) |
Referenced by init_motor_dashboard(), jamManager(), and opcontrol().
| lemlib::ExpoDriveCurve throttle_curve | ( | 10 | , |
| 20 | , | ||
| 1. | 012 ) |
Referenced by chassis().
| pros::Rotation vertical_tracking_sensor | ( | 9 | ) |
| pros::Vision vision_sensor | ( | 18 | ) |
Referenced by alignToGoal(), and calibrate_vision().
| Color allianceColor = Color::RED |
Definition at line 103 of file globals.cpp.
Referenced by alliance_btn_event_handler(), awp_auton(), colorSort(), colorSortFn(), left_auton_split(), left_rush(), opcontrol(), right_7_hood(), right_7_wing(), right_auton_split(), right_rush(), score_longgoal(), score_longgoal_auton(), and score_midgoal_auton().
| const float angularKD = 26.5 |
Definition at line 44 of file globals.cpp.
Referenced by angular_controller().
| const float angularKI = 0.0015 |
Definition at line 44 of file globals.cpp.
Referenced by angular_controller().
| const float angularKP = 3.07 |
Definition at line 44 of file globals.cpp.
Referenced by angular_controller().
| bool antiJamEnabled = false |
Definition at line 108 of file globals.cpp.
Referenced by opcontrol().
| bool color_sort_enable = false |
Definition at line 104 of file globals.cpp.
Referenced by skills_auton().
| const float horizontal_offset = (-1.18588887482 -1.2351177609)/2 |
Definition at line 31 of file globals.cpp.
| lemlib::TrackingWheel horizontal_tracking_wheel& horizontal_tracking_sensor |
Definition at line 38 of file globals.cpp.
| const float lateralKD = 72 |
Definition at line 44 of file globals.cpp.
Referenced by lateral_controller().
| const float lateralKI = 0.001 |
Definition at line 44 of file globals.cpp.
Referenced by lateral_controller().
| const float lateralKP = 9 |
Definition at line 44 of file globals.cpp.
Referenced by lateral_controller().
| lemlib::Drivetrain drivebase & leftMotors |
Definition at line 17 of file globals.cpp.
Referenced by alignToGoal(), crossBarrier(), init_motor_dashboard(), opcontrol(), and temp_warning().
| bool liveReplay = false |
Definition at line 109 of file globals.cpp.
Referenced by opcontrol().
| int low_ramp_down_time = 0 |
Definition at line 107 of file globals.cpp.
| bool midgoal_first = false |
Definition at line 105 of file globals.cpp.
Referenced by opcontrol().
| int ramp_up_time = 0 |
Definition at line 106 of file globals.cpp.
| const float vertical_offset = (-0.414862637269 + 0.0661399466844)/2 |
Definition at line 32 of file globals.cpp.
| lemlib::TrackingWheel vertical_tracking_wheel& vertical_tracking_sensor |
Definition at line 39 of file globals.cpp.
| lemlib::OdomSensors sensors& vertical_tracking_wheel |
Definition at line 41 of file globals.cpp.