Completed
Push — master ( 0672dd...74c8db )
by John
33s
created

initialize()   A

Complexity

Conditions 1

Size

Total Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 3
rs 10
cc 1
1
package org.usfirst.frc.team3695.robot.commands;
2
3
import edu.wpi.first.wpilibj.DigitalInput;
4
import edu.wpi.first.wpilibj.DriverStation;
5
6
import org.usfirst.frc.team3695.robot.Robot;
7
import org.usfirst.frc.team3695.robot.enumeration.Position;
8
9
import edu.wpi.first.wpilibj.command.Command;
10
11
/**
12
 * toggles the state of the clamp
13
 */
14
public class CyborgCommandGoToMid extends Command {
15
	
16
	Boolean isFinished;
0 ignored issues
show
Comprehensibility introduced by
Fields and methods should not have conflicting names like isFinished. While this is technically legal it can lead to misunderstandings and problems with serialization.
Loading history...
17
	
18
    public CyborgCommandGoToMid() {
19
        requires(Robot.SUB_MAST);
20
    }
21
22
    protected void initialize() {
23
    	DriverStation.reportWarning("MOVING TO MID POSITION", false);
24
    	isFinished = true;
25
    }
26
27
    protected void execute() {
28
    	if (!isFinished) {
29
    		isFinished = Robot.SUB_MAST.goToMiddle();
30
    	}
31
    }
32
33
    protected boolean isFinished() {
34
    	DriverStation.reportWarning("AT MID POSITION", false);
35
    	return isFinished; 
36
	}
37
38
    protected void end() {}
39
40
    protected void interrupted() {
41
    	end();
42
    }
43
}
44