1516b Over Under 2.0
Codebase for 1516b over under season
Loading...
Searching...
No Matches
auton.h
Go to the documentation of this file.
1#pragma once
2
3#include "puncher.h"
4
5namespace Robot {
6 /**
7 * @details We use Lemlib extensively for our documentation. You can find the documentation for Lemlib at
8 * <A HREF="https://lemlib.github.io/lemlib/">Lemlib documentation</A>.
9 * @brief The \ref Autonomous class contains classes and functions related to the robot's autonomous behavior.
10 */
11 class Autonomous {
12
13 public:
14 /**
15 * @brief Sets the number of the autonomous program to use.
16 *
17 * This function allows the user to specify the autonomous program to be executed by the robot.
18 * The autonomous program number determines the specific actions and movements the robot will perform.
19 *
20 * @param auton The number of the autonomous program to use.
21 */
22 static int auton;
23
24 /**
25 * @brief Drives the robot autonomously.
26 *
27 * This function drives the robot autonomously based on the selected autonomous program.
28 * It takes a reference to a Puncher object and a boolean value indicating whether to use autonomous mode.
29 *
30 * @param puncher A reference to the Puncher object.
31 * @param autono A boolean value indicating whether to use autonomous mode.
32 */
33 void AutoDrive(Puncher &puncher, bool autono);
34
35 /**
36 * @brief Switches the autonomous program.
37 *
38 * @details Make sure to pass in a reference to the Puncher object with .
39 *
40 * This function switches the autonomous program to the next available program.
41 * It allows the user to cycle through different autonomous programs during runtime.
42 */
43 void AutonSwitcher();
44
45 private:
46 /**
47 * @brief Runs the autonomous path for the far side defensive game strategy.
48 *
49 * This function executes the autonomous path for the far side defensive game strategy.
50 * It contains the specific actions and movements required for this strategy.
51 */
52 void Auton1();
53
54 /**
55 * @brief Runs the autonomous path for the near side offensive game strategy.
56 *
57 * This function executes the autonomous path for the near side offensive game strategy.
58 * It contains the specific actions and movements required for this strategy.
59 */
60 void Auton2();
61
62 /**
63 * @brief Runs the puncher routine for the Skills Challenge.
64 *
65 * This function executes the puncher routine for the Skills Challenge.
66 * It takes a reference to a Puncher object and performs the necessary actions for the challenge.
67 *
68 * @param puncher A reference to the Puncher object.
69 */
70 void Auton3(Puncher &puncher);
71
72 };
73}
The Autonomous class contains classes and functions related to the robot's autonomous behavior.
Definition auton.h:11
void AutoDrive(Puncher &puncher, bool autono)
Drives the robot autonomously.
Definition auton.cpp:60
void Auton1()
Runs the autonomous path for the far side defensive game strategy.
Definition auton.cpp:11
static int auton
Sets the number of the autonomous program to use.
Definition auton.h:22
void Auton2()
Runs the autonomous path for the near side offensive game strategy.
Definition auton.cpp:31
void AutonSwitcher()
Switches the autonomous program.
Definition auton.cpp:82
void Auton3(Puncher &puncher)
Runs the puncher routine for the Skills Challenge.
Definition auton.cpp:51
Represents a Puncher mechanism for a robot.
Definition puncher.h:12
The Wings class represents the wings of a robot.
Definition wings.h:11
void setState(bool wingState)
Sets the state of the wings.
Definition wings.cpp:23
void run()
Runs the wings.
Definition wings.cpp:7
bool getState()
Gets the current state of the wings.
Definition wings.cpp:27
bool state
Definition wings.h:42
Contains global variables and type definitions for the Robot namespace.
Definition globals.cpp:18
pros::Controller controller
lemlib::ChassisController_t angularController
Definition globals.cpp:73
pros::Motor LeftMid
pros::Motor IntakeMotor
pros::Distance distance
pros::Motor_Group drive_
pros::Imu inertial_sensor
pros::Motor RightBack
pros::ADIDigitalOut wing2
pros::Motor_Group drive_right
pros::Motor_Group drive_left
pros::Motor RightFront
pros::ADIDigitalOut wing
pros::ADIDigitalOut pto_2
pros::ADIDigitalOut pto_1
pros::Motor RightMid
lemlib::OdomSensors_t sensors
Definition globals.cpp:52
pros::Motor LeftFront
pros::Motor PuncherMotor2
lemlib::ChassisController_t lateralController
Definition globals.cpp:62
Robot::Wings robotWings
lemlib::Chassis chassis
pros::Motor PuncherMotor
lemlib::Drivetrain_t drivetrain
Definition globals.cpp:44
pros::Motor_Group punchers
pros::Motor LeftBack
Contains all objects generated by the 1516B team - Contains all of the subsystems,...
Definition globals.cpp:17