org.usfirst.frc.team3695.robot.commands.ButtonCommandEat   A
last analyzed

Complexity

Total Complexity 6

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Importance

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

6 Methods

Rating   Name   Duplication   Size   Complexity  
A interrupted() 0 2 1
A initialize() 0 2 1
A isFinished() 0 2 1
A end() 0 2 1
A execute() 0 1 1
A ButtonCommandEat() 0 2 1
1
package org.usfirst.frc.team3695.robot.commands;
2
3
import org.usfirst.frc.team3695.robot.Constants;
4
import org.usfirst.frc.team3695.robot.Robot;
5
import org.usfirst.frc.team3695.robot.enumeration.Position;
6
import org.usfirst.frc.team3695.robot.util.Util;
7
8
import edu.wpi.first.wpilibj.command.Command;
9
10
/**
11
 * Commands the gear flaps
12
 */
13
public class ButtonCommandEat extends Command {
14
15
    public ButtonCommandEat() {
16
        requires(Robot.SUB_MANIPULATOR);
17
    }
18
19
    protected void initialize() {
20
        Robot.SUB_MANIPULATOR.eat();
21
    }
22
23
    protected void execute() {}
24
25
    protected boolean isFinished() {
26
        return false;
27
    }
28
29
    protected void end() {
30
        Robot.SUB_MANIPULATOR.stopSpinning();
31
    }
32
33
    protected void interrupted() {
34
        end();
35
    }
36
}
37