blob: 756c33d144b19b70d6a12b1c28f99c1e9331cb9f (
plain)
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
|
package org.usfirst.frc.team4272.robot2016;
import edu.wpi.first.wpilibj.Timer;
import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard;
public class Autonomous {
private final Timer time = new Timer();
private final HwRobot robot;
public Autonomous(HwRobot robot) {
this.robot = robot;
time.reset();
time.start();
}
public Control run(Control c) {
if (robot.armL.get()) {
c.arm = -0.5;
} else {
c.arm = 0;
robot.armE.reset();
}
if (time.get() < 4) {
c.lDrive1 = c.rDrive1 = -0.4;
} else {
c.lDrive1 = c.rDrive1 = 0;
}
SmartDashboard.putNumber("autoTime", time.get());
return c;
}
}
|