diff options
Diffstat (limited to 'src/org/usfirst/frc/team4272/robot2017/HwRobot.java')
-rw-r--r-- | src/org/usfirst/frc/team4272/robot2017/HwRobot.java | 7 |
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); } |