-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.c
110 lines (81 loc) · 3.79 KB
/
main.c
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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
#pragma config(Sensor, in1, MogoPot, sensorAnalog)
#pragma config(Sensor, in2, FbarPot, sensorAnalog)
#pragma config(Sensor, in3, ArmPot, sensorAnalog)
#pragma config(Sensor, in4, GyroSensor, sensorAnalog)
#pragma config(Sensor, in5, PowerExp, sensorAnalog)
#pragma config(Sensor, in6, Line1, sensorLineFollower)
#pragma config(Sensor, in7, Line2, sensorLineFollower)
#pragma config(Sensor, in8, Line3, sensorLineFollower)
#pragma config(Sensor, dgtl1, UltraStack, sensorSONAR_cm)
#pragma config(Sensor, dgtl3, RollerButton, sensorTouch)
#pragma config(Sensor, dgtl4, QuadRight, sensorQuadEncoder)
#pragma config(Sensor, dgtl6, QuadLeft, sensorQuadEncoder)
#pragma config(Sensor, dgtl8, UltraMogo, sensorSONAR_cm)
#pragma config(Sensor, dgtl10, lLED, sensorDigitalOut)
#pragma config(Sensor, dgtl11, mLED, sensorDigitalOut)
#pragma config(Sensor, dgtl12, rLED, sensorDigitalOut)
#pragma config(Motor, port1, Mogo, tmotorVex393_HBridge, openLoop)
#pragma config(Motor, port2, FBar, tmotorVex393_MC29, openLoop, reversed)
#pragma config(Motor, port3, DriveR1, tmotorVex393_MC29, openLoop, reversed)
#pragma config(Motor, port4, ArmL, tmotorVex393_MC29, openLoop, reversed)
#pragma config(Motor, port5, DriveL2, tmotorVex393_MC29, openLoop)
#pragma config(Motor, port6, DriveR2, tmotorVex393_MC29, openLoop, reversed)
#pragma config(Motor, port7, ArmR, tmotorVex393_MC29, openLoop)
#pragma config(Motor, port8, DriveL1, tmotorVex393_MC29, openLoop)
#pragma config(Motor, port9, ArmT, tmotorVex393_MC29, openLoop)
#pragma config(Motor, port10, Roller, tmotorVex393_HBridge, openLoop)
//*!!Code automatically generated by 'ROBOTC' configuration wizard !!*//
///////////////////////////////////////////////////////////
#pragma platform(VEX2) ////////////
#pragma competitionControl(Competition) ////////////
////////////
#include "Vex_Competition_Includes.c" ////////////
///////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////
#include "Declarations.h"
#include "Essential_functions.h"
#include "alexander.h.h"
#include "LCD.h"
#include "slewrate.h"
#include "pid_master.h"
#include "/auton/autofunction.h"
#include "/auton/5pt3cones_L.h.h"
#include "/auton/5pt3cones_R.h.h"
#include "/auton/10pt3cones_L.h.h"
#include "/auton/10pt3cones_R.h.h"
#include "/auton/20pt3cones_L.h.h"
#include "/auton/20pt3cones_R.h.h"
#include "/auton/20pt3sides_L.h"
#include "/auton/20pt3sides_R.h"
#include "/auton/loader3_5pt_def_L.h"
#include "/auton/loader3_5pt_def_R.h"
#include "/auton/loader5_20pt_L.h"
#include "/auton/loader5_20pt_R.h"
#include "/auton/loader6_10pt_L.h"
#include "/auton/loader6_10pt_R.h"
#include "/auton/loader7_5pt_L.h"
#include "/auton/loader7_5pt_R.h"
#include "/auton/statblock_L.h"
#include "/auton/statblock_R.h"
#include "/auton/progskills.h"
#include "/auton/autoplace.h"
#include "/auton/autoload.h"
#include "/auton/autonomous.h"
#include "action2task.h"
#include "autostack.h"
#include "usercontrol.h"
//////////////////////////////////////////////////////////////////////////////////////////////
void pre_auton()
{
startTask(LCD);
delay(1000);//////////////////INIT SEQUENCE//////////////////
gyroInit(Gyro1, in4);
}
task autonomous()
{
autonomousbody();
}
task usercontrol()
{
usercontrolbody();
}