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

isFinished()   A

Complexity

Conditions 1

Size

Total Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 2
rs 10
cc 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.OI;
5
import org.usfirst.frc.team3695.robot.Robot;
6
import org.usfirst.frc.team3695.robot.util.Util;
7
8
/** Toggle PID */
9
public class ButtonCommandKillPID extends Command {
10
11
    public ButtonCommandKillPID() {
12
        requires(Robot.SUB_DRIVE);
13
    }
14
15
    protected void initialize() {
16
        Robot.SUB_DRIVE.setPIDF(0,0,0,0);
17
    }
18
19
    protected void execute() { }
20
21
    protected boolean isFinished() {
22
        return false;
23
    }
24
25
    protected void end() {
26
        Robot.SUB_DRIVE.setPIDF(Util.getAndSetDouble("P", 1),
27
                Util.getAndSetDouble("I", 1),
28
                Util.getAndSetDouble("D", 1),
29
                Util.getAndSetDouble("F", 1));
30
    }
31
32
    protected void interrupted() {}
33
}
34