-
Notifications
You must be signed in to change notification settings - Fork 0
/
Initialization.c
52 lines (47 loc) · 977 Bytes
/
Initialization.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
void InitializePIDControllers()
{
PIDLineFollower.Kp = 0.08;
PIDLineFollower.Ki = 0;
PIDLineFollower.Kd = 0;
PIDDescorer.Kp = 0.04;
PIDDescorer.Ki = 0.01;
PIDDescorer.Kd = 0.03;
PIDWallFollower.Kp = 0.1;
PIDWallFollower.Ki = 0;
PIDWallFollower.Kd = 0;
PIDLift.Kp = 0.50;
PIDLift.Ki = 0.04;
PIDLift.Kd = 0.02;
PIDSpatula.Kp = 0.2;
PIDSpatula.Ki = 0.00;
PIDSpatula.Kd = 0.05;
PIDDriveStraight.Kp = 0.2;
PIDDriveStraight.Ki = 0.0;
PIDDriveStraight.Kd = 0;
PIDDriveGyro.Kp = 0.65;
PIDDriveGyro.Ki = 0.0;
PIDDriveGyro.Kd = 0.5;
}
void InitializeEncoders()
{
SensorValue[BackRightQuad] = 0;
}
void InitializeLCDScreen()
{
bLCDBacklight = true;
}
void InitializeTimers()
{
ClearTimer(T1);
ClearTimer(T2);
ClearTimer(T3);
ClearTimer(T4);
}
void InitializeDebugStream()
{
writeDebugStreamLine("===============");
}
void InitializeAutonomousPotentiometer()
{
SenAutoPot = SensorValue[AutoSelector];
}