Test Failed
Pull Request — master (#132)
by John
03:47 queued 14s
created

org.usfirst.frc.team3695.robot.commands.ButtonCommandHitTheDeck   A

Complexity

Total Complexity 7

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 27
rs 10
wmc 7

6 Methods

Rating   Name   Duplication   Size   Complexity  
A end() 0 1 1
A initialize() 0 2 1
A interrupted() 0 2 1
A execute() 0 4 2
A ButtonCommandHitTheDeck() 0 2 1
A isFinished() 0 1 1
1
package org.usfirst.frc.team3695.robot.commands;
2
3
import edu.wpi.first.wpilibj.command.Command;
4
import org.usfirst.frc.team3695.robot.Robot;
5
6
/**
7
 * toggles the state of the clamp
8
 */
9
public class ButtonCommandHitTheDeck extends Command {
10
	
11
	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...
12
	
13
    public ButtonCommandHitTheDeck() {
14
        requires(Robot.SUB_MAST);
15
    }
16
    
17
    protected void initialize() {
18
    	Robot.SUB_MAST.setOverride(true);
19
    	//isFinished = Robot.SUB_MAST.goToMiddle();
20
    }
21
22
    protected void execute() {
23
    	isFinished = Robot.SUB_MAST.dropIt();
24
    	if (isFinished) 
25
			end();
26
    }
27
28
    protected boolean isFinished() { return isFinished; }
29
30
    protected void end() {
31
    	
32
    }
33
34
    protected void interrupted() {
35
    	end();
36
    }
37
}
38