-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathEncoders.java
48 lines (36 loc) · 992 Bytes
/
Encoders.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
package org.usfirst.frc.team6418.robot.commands;
import edu.wpi.first.wpilibj.command.Command;
import org.usfirst.frc.team6418.robot.Robot;
/**
*
*/
public class Encoders extends Command {
public Encoders() {
// Use requires() here to declare subsystem dependencies
requires(Robot.encoderSys); //define
}
// Called just before this Command runs the first time
@Override
protected void initialize() {
}
// Called repeatedly when this Command is scheduled to run
@Override
protected void execute() {
System.out.println("I am in encoder command");
Robot.encoderSys.encoderLoop();
}
// Make this return true when this Command no longer needs to run execute()
@Override
protected boolean isFinished() {
return true;
}
// Called once after isFinished returns true
@Override
protected void end() {
}
// Called when another command which requires one or more of the same
// subsystems is scheduled to run
@Override
protected void interrupted() {
}
}