2#include "electronic/controller.h"
3#include "electronic/distance.h"
5#include "lemlib/chassis/chassis.hpp"
6#include "liblvgl/llemu.hpp"
8#include "pros/misc.hpp"
9#include "pros/motors.hpp"
10#include "pros/rtos.hpp"
14#include "screen/selector.h"
15#include "screen/status.h"
69 pros::rtos::Task MotorNotification(
electronic.controllers.notify_motor_disconnect);
71 pros::lcd::initialize();
72 pros::Task screen_task([&]() {
75 pros::lcd::print(0,
"X: %f",
chassis.getPose().x);
76 pros::lcd::print(1,
"Y: %f",
chassis.getPose().y);
77 pros::lcd::print(2,
"Theta: %f",
chassis.getPose().theta);
79 pros::lcd::print(3,
"Lateral Sensor: %i",
lateral_sensor.get_position());
82 pros::lcd::print(6,
"Autonomous: %s",
subsystem.autonomous.autonName);
83 pros::lcd::print(7,
"Distance Position: %i",
distance_sensor.get_distance());
120 pros::rtos::Task Task(
electronic.controllers.notify_motor_disconnect);
141 screen.selector.selector();
181 if (
controller.get_digital_new_press(pros::E_CONTROLLER_DIGITAL_UP)) {
185 if (
controller.get_digital_new_press(pros::E_CONTROLLER_DIGITAL_RIGHT)) {
186 std::string name =
subsystem.drivetrain.toggleDrive();
191 if (
controller.get_digital_new_press(pros::E_CONTROLLER_DIGITAL_DOWN)) {
199 if (
controller.get_digital_new_press(pros::E_CONTROLLER_DIGITAL_A)) {
203 if (
controller.get_digital_new_press(pros::E_CONTROLLER_DIGITAL_X)) {
The Autonomous class contains classes and functions related to the robot's autonomous behavior.
static AUTON_ROUTINE auton
Sets the number of the autonomous program to use.
Represents the drivetrain of the robot.
The Intake class represents a robot intake system.
The LadyBrown class represents the robot lady brown subsystem.
The Latch class represents a latching mechanism.
The Latch class represents a latching mechanism.
Contains the declaration of the Drivetrain class.
struct RobotSubsystems subsystem
void competition_initialize()
struct Electronics electronic
struct RobotScreen screen
pros::Motor IntakeMotor(-9, pros::v5::MotorGears::blue, pros::v5::MotorUnits::degrees)
lemlib::TrackingWheel horizontal_tracking_wheel & horizontal_sensor
lemlib::Chassis chassis(drivetrain, lateral_controller, angular_controller, sensors, &throttle_curve, &steer_curve)
pros::Rotation LadyBrownRotation(8)
lemlib::TrackingWheel vertical_tracking_wheel & lateral_sensor
pros::Controller controller(pros::E_CONTROLLER_MASTER)
pros::Distance distance_sensor(10)
Robot::Controller controllers
Robot::DistanceSensor distance_sensor
Robot::status_screen status
Robot::selector_screen selector
Structure that holds instances of all robot subsystems.
Robot::Autonomous autonomous
Robot::Drivetrain drivetrain
Robot::LadyBrown ladybrown