summaryrefslogtreecommitdiff
path: root/src/org/usfirst/frc/team4272/robot2017/HwRobot.java
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@lukeshu.com>2017-04-07 10:32:31 -0400
committerLuke Shumaker <lukeshu@lukeshu.com>2017-04-07 10:32:31 -0400
commit3949e64c7707b53081a60daaf8e1118ebee41ea7 (patch)
treeab7f24fb77b02d1f9157d8137489920eddee2f3d /src/org/usfirst/frc/team4272/robot2017/HwRobot.java
parent97f0f4c548ae405d72b7b4f3bd50bdedb1426279 (diff)
add compressor inhibitor
Diffstat (limited to 'src/org/usfirst/frc/team4272/robot2017/HwRobot.java')
-rw-r--r--src/org/usfirst/frc/team4272/robot2017/HwRobot.java7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/org/usfirst/frc/team4272/robot2017/HwRobot.java b/src/org/usfirst/frc/team4272/robot2017/HwRobot.java
index 533cf9d..23e5c34 100644
--- a/src/org/usfirst/frc/team4272/robot2017/HwRobot.java
+++ b/src/org/usfirst/frc/team4272/robot2017/HwRobot.java
@@ -29,6 +29,7 @@
*/
package org.usfirst.frc.team4272.robot2017;
+import edu.wpi.first.wpilibj.Compressor;
import edu.wpi.first.wpilibj.DoubleSolenoid;
import edu.wpi.first.wpilibj.DriverStation;
import edu.wpi.first.wpilibj.Encoder;
@@ -70,6 +71,8 @@ public class HwRobot {
private final DoubleSolenoid
shifter = new DoubleSolenoid(/*PCM*/4, /*PCM*/5),
ged = new DoubleSolenoid(/*PCM*/6, /*PCM*/7);
+ private final Compressor
+ compressor = new Compressor();
// Sensors/info should be public ///////////////////////////////////////
public final Encoder lDriveE = new Encoder(/*DIO*/0,/*DIO*/1, /*reverse*/false);
public final Encoder rDriveE = new Encoder(/*DIO*/2,/*DIO*/3, /*reverse*/true);
@@ -116,6 +119,10 @@ public class HwRobot {
minBatt = batt;
SmartDashboard.putNumber("minBatt", minBatt);
+ if (c.compressorEnabled != compressor.getClosedLoopControl())
+ compressor.setClosedLoopControl(c.compressorEnabled);
+
+ SmartDashboard.putBoolean("compressorOn", compressor.enabled());
SmartDashboard.putBoolean("highGear", c.highGear);
SmartDashboard.putBoolean("gedOut", c.gedOut);
}