1516X High Stakes 2.0
Codebase for 1516X High Stakes season
|
The Autonomous class contains classes and functions related to the robot's autonomous behavior. More...
#include <auton.h>
Public Types | |
enum | AUTON_ROUTINE { RED_LEFT = 1 , RED_RIGHT = 2 , BLUE_LEFT = -1 , BLUE_RIGHT = -2 , SKILLS = 0 } |
Public Member Functions | |
void | AutoDrive (Intake &intake, Latch &latch, DistanceSensor &distance) |
Drives the robot autonomously. | |
Static Public Member Functions | |
static void | AutonSwitcher (int autonNum) |
Switches the autonomous program. | |
Static Public Attributes | |
static AUTON_ROUTINE | auton = RED_LEFT |
Sets the number of the autonomous program to use. | |
static std::string | autonName |
The name of the autonomous program. | |
Private Member Functions | |
void | Auton1 (Intake &intake, Latch &latch, DistanceSensor &distance) |
Runs the autonomous path for the far side defensive game strategy. | |
void | Auton2 (Intake &intake, Latch &latch, DistanceSensor &distance) |
Runs the autonomous path for the near side offensive game strategy. | |
void | Auton3 (Intake &intake, Latch &latch, DistanceSensor &distance) |
Runs the puncher routine for the Skills Challenge. | |
void | Auton4 (Intake &intake, Latch &latch, DistanceSensor &distance) |
Runs the autonomous path for the far side offensive game strategy. This function executes the autonomous path for the far side offensive game strategy. It contains the specific actions and movements required for this strategy. | |
void | Auton5 (Intake &intake, Latch &latch, DistanceSensor &distance) |
The Autonomous class contains classes and functions related to the robot's autonomous behavior.
We use Lemlib extensively for our documentation. You can find the documentation for Lemlib at Lemlib documentation.
Drives the robot autonomously.
This function drives the robot autonomously based on the selected autonomous program. It takes a reference to a Puncher object and a boolean value indicating whether to use autonomous mode.
puncher | A reference to the Puncher object. |
autono | A boolean value indicating whether to use autonomous mode. |
Definition at line 30 of file auton.cpp.
References auton, Auton1(), Auton2(), Auton3(), Auton4(), Auton5(), BLUE_LEFT, BLUE_RIGHT, RED_LEFT, RED_RIGHT, and SKILLS.
Runs the autonomous path for the far side defensive game strategy.
This function executes the autonomous path for the far side defensive game strategy. It contains the specific actions and movements required for this strategy.
Definition at line 11 of file auton.cpp.
Referenced by AutoDrive().
Runs the autonomous path for the near side offensive game strategy.
This function executes the autonomous path for the near side offensive game strategy. It contains the specific actions and movements required for this strategy.
Definition at line 14 of file auton.cpp.
Referenced by AutoDrive().
Runs the puncher routine for the Skills Challenge.
This function executes the puncher routine for the Skills Challenge. It takes a reference to a Puncher object and performs the necessary actions for the challenge.
puncher | A reference to the Puncher object. |
Definition at line 17 of file auton.cpp.
Referenced by AutoDrive().
Runs the autonomous path for the far side offensive game strategy. This function executes the autonomous path for the far side offensive game strategy. It contains the specific actions and movements required for this strategy.
Definition at line 23 of file auton.cpp.
Referenced by AutoDrive().
Executes the Skills challenge autonomous.
This function controls the robot's actions during autonomous routine 5. It takes references to the Intake
and Latch
objects as parameters.
Definition at line 25 of file auton.cpp.
Referenced by AutoDrive().
|
static |
Switches the autonomous program.
This function switches the autonomous program to the next available program. It allows the user to cycle through different autonomous programs during runtime.
Definition at line 52 of file auton.cpp.
References auton, autonName, BLUE_LEFT, BLUE_RIGHT, RED_LEFT, RED_RIGHT, and SKILLS.
|
static |
Sets the number of the autonomous program to use.
This function allows the user to specify the autonomous program to be executed by the robot. The autonomous program number determines the specific actions and movements the robot will perform.
auton | The number of the autonomous program to use. |
Definition at line 26 of file auton.h.
Referenced by AutoDrive(), and AutonSwitcher().
|
static |
The name of the autonomous program.
This variable stores the name of the autonomous program currently selected. It is handled by the switching functions and the screen.
Definition at line 33 of file auton.h.
Referenced by AutonSwitcher().