Main Page
Namespaces
Classes
Files
File List
File Members
src
ros_lib
init.cpp
Go to the documentation of this file.
1
13
#include "main.h"
14
15
/*
16
*
17
*
18
* NO GLOBAL OBJECT DEFINITIONS!
19
*
20
* DO NOT globally define either structs or objects.
21
* See issue: https://github.com/purduesigbots/pros/issues/48
22
*
23
* Instead, put all objects/structs inside functions.
24
*
25
*
26
*/
27
28
/*
29
* Runs pre-initialization code. This function will be started in kernel mode one time while the
30
* VEX Cortex is starting up. As the scheduler is still paused, most API functions will fail.
31
*
32
* The purpose of this function is solely to set the default pin modes (pinMode()) and port
33
* states (digitalWrite()) of limit switches, push buttons, and solenoids. It can also safely
34
* configure a UART port (usartOpen()) but cannot set up an LCD (lcdInit()).
35
*/
36
void
initializeIO
() {
37
// this is needed to configure the debug serial connection for rosserial.
38
usartInit(uart2, 57600, SERIAL_8N1);
39
}
40
41
/*
42
* Runs user initialization code. This function will be started in its own task with the default
43
* priority and stack size once when the robot is starting up. It is possible that the VEXnet
44
* communication link may not be fully established at this time, so reading from the VEX
45
* Joystick may fail.
46
*
47
* This function should initialize most sensors (gyro, encoders, ultrasonics), LCDs, global
48
* variables, and IMEs.
49
*
50
* This function must exit relatively promptly, or the operatorControl() and autonomous() tasks
51
* will not start. An autonomous mode selection menu like the pre_auton() in other environments
52
* can be implemented in this task if desired.
53
*/
54
void
initialize
() {
55
}
initialize
void initialize()
Definition:
init.cpp:54
initializeIO
void initializeIO()
Definition:
init.cpp:36
rosserial_vex_cortex
Author(s): Cannon
autogenerated on Fri Jun 7 2019 22:03:06