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

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

Complexity

Total Complexity 6

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 6
c 1
b 0
f 0
dl 0
loc 20
rs 10

6 Methods

Rating   Name   Duplication   Size   Complexity  
A interrupted() 0 2 1
A execute() 0 1 1
A ButtonCommandHook() 0 2 1
A initialize() 0 2 1
A isFinished() 0 1 1
A end() 0 2 1
1
package org.usfirst.frc.team3695.robot.commands;
2
3
import edu.wpi.first.wpilibj.DigitalInput;
4
import org.usfirst.frc.team3695.robot.OI;
5
import org.usfirst.frc.team3695.robot.Robot;
6
7
import edu.wpi.first.wpilibj.command.Command;
8
9
/** move the mast */
10
public class ButtonCommandHook extends Command {
11
    
12
    public ButtonCommandHook() {
13
        requires(Robot.SUB_HOOK);
14
    }
15
16
    protected void initialize() {
17
    	Robot.SUB_HOOK.lowerHook();
18
    }
19
20
    protected void execute() {}
21
22
    protected boolean isFinished() { return false; }
23
24
    protected void end() {
25
    	Robot.SUB_HOOK.raiseHook();
26
    }
27
28
    protected void interrupted() {
29
    	end();
30
    }
31
}
32