This repository has been archived by the owner on Jul 9, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.h
81 lines (72 loc) · 2.12 KB
/
main.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
/**
* \file main.h
*
* Contains common definitions and header files used throughout your PROS
* project.
*
* Copyright (c) 2017-2018, Purdue University ACM SIGBots.
* All rights reserved.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
#ifndef _PROS_MAIN_H_
#define _PROS_MAIN_H_
/**
* If defined, some commonly used enums will have preprocessor macros which give
* a shorter, more convenient naming pattern. If this isn't desired, simply
* comment the following line out.
*
* For instance, E_CONTROLLER_MASTER has a shorter name: CONTROLLER_MASTER.
* E_CONTROLLER_MASTER is pedantically correct within the PROS styleguide, but
* not convienent for most student programmers.
*/
#define PROS_USE_SIMPLE_NAMES
/**
* If defined, C++ literals will be available for use. All literals are in the
* pros::literals namespace.
*
* For instance, you can do `4_mtr = 50` to set motor 4's target velocity to 50
*/
#define PROS_USE_LITERALS
#include "api.h"
/**
* You should add more #includes here
*/
//#include "okapi/api.hpp"
//#include "pros/api_legacy.h"
/**
* If you find doing pros::Motor() to be tedious and you'd prefer just to do
* Motor, you can use the namespace with the following commented out line.
*
* IMPORTANT: Only the okapi or pros namespace may be used, not both
* concurrently! The okapi namespace will export all symbols inside the pros
* namespace.
*/
// using namespace pros;
// using namespace pros::literals;
// using namespace okapi;
/**
* Prototypes for the competition control tasks are redefined here to ensure
* that they can be called from user code (i.e. calling autonomous from a
* button press in opcontrol() for testing purposes).
*/
#ifdef __cplusplus
extern "C" {
#endif
void autonomous(void);
void initialize(void);
void disabled(void);
void competition_initialize(void);
void opcontrol(void);
#ifdef __cplusplus
}
#endif
#ifdef __cplusplus
/**
* You can add C++-only headers here
*/
//#include <iostream>
#endif
#endif // _PROS_MAIN_H_