2#include "electronic/controller.h"
3#include "electronic/distance.h"
5#include "lemlib/chassis/chassis.hpp"
6#include "liblvgl/llemu.hpp"
8#include "lemlib/timer.hpp"
9#include "pros/misc.hpp"
10#include "pros/motors.hpp"
11#include "pros/rtos.hpp"
15#include "screen/selector.h"
16#include "screen/status.h"
70 pros::rtos::Task MotorNotification(
electronic.controllers.notify_motor_disconnect);
72 pros::lcd::initialize();
73 pros::Task screen_task([&]() {
76 pros::lcd::print(0,
"X: %f",
chassis.getPose().x);
77 pros::lcd::print(1,
"Y: %f",
chassis.getPose().y);
78 pros::lcd::print(2,
"Theta: %f",
chassis.getPose().theta);
80 pros::lcd::print(3,
"Lateral Sensor: %i",
lateral_sensor.get_position());
82 pros::lcd::print(5,
"Lady Brown Sensor: %i",
HookMotor.get_voltage());
83 pros::lcd::print(6,
"Autonomous: %s",
subsystem.autonomous.autonName);
84 pros::lcd::print(7,
"Distance Position: %i",
HookRotation.get_position());
129 pros::rtos::Task Task(
electronic.controllers.notify_motor_disconnect);
194 if (
controller.get_digital_new_press(pros::E_CONTROLLER_DIGITAL_LEFT)) {
195 std::string name =
subsystem.drivetrain.toggleDrive();
200 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::Rotation HookRotation(2)
pros::Motor RightMid(-15, pros::v5::MotorGears::blue, pros::v5::MotorUnits::degrees)
pros::Motor IntakeMotor(-4, pros::v5::MotorGears::blue, pros::v5::MotorUnits::degrees)
lemlib::TrackingWheel horizontal_tracking_wheel & horizontal_sensor
pros::Motor LadyBrownMotor(-10, pros::v5::MotorGears::green, pros::v5::MotorUnits::degrees)
pros::Motor RightFront(16, pros::v5::MotorGears::blue, pros::v5::MotorUnits::degrees)
lemlib::Chassis chassis(drivetrain, lateral_controller, angular_controller, sensors, &throttle_curve, &steer_curve)
pros::Motor RightBack(14, pros::v5::MotorGears::blue, pros::v5::MotorUnits::degrees)
pros::Motor HookMotor(3, pros::v5::MotorGears::green, pros::v5::MotorUnits::degrees)
pros::Motor LeftBack(-11, pros::v5::MotorGears::blue, pros::v5::MotorUnits::degrees)
pros::Motor LeftFront(-13, pros::v5::MotorGears::blue, pros::v5::MotorUnits::degrees)
lemlib::TrackingWheel vertical_tracking_wheel & lateral_sensor
pros::Controller controller(pros::E_CONTROLLER_MASTER)
pros::Motor LeftMid(12, pros::v5::MotorGears::blue, pros::v5::MotorUnits::degrees)
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