Skip to content
This repository was archived by the owner on Sep 14, 2019. It is now read-only.

Commit f07bf9a

Browse files
committed
made method to get if using VPIDs or not
1 parent 76b2237 commit f07bf9a

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

Robot2018/src/org/usfirst/frc/team199/Robot2018/commands/PIDTurn.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,9 @@ protected void initialize() {
188188
System.out.println("Turn to point: " + turnToPoint);
189189

190190
turnController.disable();
191-
dt.enableVelocityPIDs();
191+
if (dt.isVPIDUsed()) {
192+
dt.enableVelocityPIDs();
193+
}
192194
System.out.println("initialize2s");
193195
// dt.resetAHRS();
194196
System.out.println("after reset");

Robot2018/src/org/usfirst/frc/team199/Robot2018/subsystems/Drivetrain.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,10 @@ public void initDefaultCommand() {
9090
setDefaultCommand(new TeleopDrive());
9191
}
9292

93+
public boolean isVPIDUsed() {
94+
return Robot.getBool("Teleop velocity PID", false);
95+
}
96+
9397
public PIDSourceAverage getDistEncAvg() {
9498
return distEncAvg;
9599
}

Robot2018/src/org/usfirst/frc/team199/Robot2018/subsystems/DrivetrainInterface.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ public interface DrivetrainInterface {
66

77
public void initDefaultCommand();
88

9+
public boolean isVPIDUsed();
10+
911
/**
1012
* Returns the getRate() of the left encoder
1113
*

0 commit comments

Comments
 (0)