-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRobot.java
74 lines (60 loc) · 1.55 KB
/
Robot.java
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
package org.usfirst.frc.team8.robot;
import edu.wpi.first.wpilibj.Compressor;
import edu.wpi.first.wpilibj.IterativeRobot;
import edu.wpi.first.wpilibj.networktables.NetworkTable;
/**
* A robot project used for testing Talon SRX features
*
* @author Jonathan Zwiebel
*
*/
public class Robot extends IterativeRobot {
SteikDrivetrainTune steik_drivetrain_tune;
static NetworkTable table;
public static NetworkTable dashboardTable;
public Robot() {
System.out.println("Constructing Robot");
steik_drivetrain_tune = new SteikDrivetrainTune(this);
System.out.println("Done Constructing Robot");
}
@Override
public void robotInit() {
Robot.table = NetworkTable.getTable("data_table");
Robot.dashboardTable = NetworkTable.getTable("RobotTable");
System.out.println("Robot Init");
}
@Override
public void autonomousInit() {
}
@Override
public void autonomousPeriodic() {
}
@Override
public void teleopInit() {
steik_drivetrain_tune.init();
System.out.println("Teleop Init");
try {
table.putString("start", "true");
table.putString("end", "false");
}
catch(Exception e) {
e.printStackTrace();
}
System.out.println("Done with Teleop Init");
}
@Override
public void teleopPeriodic() {
steik_drivetrain_tune.update();
}
@Override
public void disabledInit() {
try {
table.putString("end", "true");
table.putString("start", "false");
}
catch(Exception e) {
e.printStackTrace();
}
steik_drivetrain_tune.disabledInit();
}
}