HoloLib
High-performance holonomic (X-Drive) control library for VEX V5
Loading...
Searching...
No Matches
main.h
Go to the documentation of this file.
1#ifndef _PROS_MAIN_H_
2#define _PROS_MAIN_H_
3
4#define PROS_USE_SIMPLE_NAMES
5
6#define PROS_USE_LITERALS
7
8#include "api.h"
9
10#ifdef __cplusplus
11extern "C" {
12#endif
13
14/**
15 * @brief Entry point for the simulation environment.
16 *
17 * Executed via Python tools/sim_auton.py. Use this to simulate paths
18 * visually prior to testing on the actual robot.
19 */
20void simulation(void);
21
22/**
23 * @brief Autonomous phase entry point.
24 *
25 * Runs the robot's autonomous code. This is executed once during
26 * the autonomous period of a competition.
27 */
28void autonomous(void);
29
30/**
31 * @brief Initialization phase entry point.
32 *
33 * Runs immediately upon startup. Used for sensor calibration,
34 * device initialization, etc.
35 */
36void initialize(void);
37
38/**
39 * @brief Disabled phase entry point.
40 *
41 * Runs when the robot is disabled (either by competition switch or
42 * field control). Useful to ensure motors are stopped safely.
43 */
44void disabled(void);
45
46/**
47 * @brief Competition initialization phase entry point.
48 *
49 * Runs after `initialize()`, before autonomous or opcontrol phases,
50 * but only if connected to a competition switch.
51 */
53
54/**
55 * @brief Operator control phase entry point.
56 *
57 * Runs the robot's driver control code. Contains the main loop that
58 * reads joystick values and updates the drivetrain and subsystems.
59 */
60void opcontrol(void);
61
62#ifdef __cplusplus
63}
64#endif
65
66#ifdef __cplusplus
67
68#endif
69
70#endif
void competition_initialize(void)
Competition initialization phase entry point.
void opcontrol(void)
Operator control phase entry point.
void autonomous(void)
Autonomous phase entry point.
void disabled(void)
Disabled phase entry point.
void simulation(void)
Entry point for the simulation environment.
void initialize(void)
Initialization phase entry point.