-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added ControlSystem subsystem to handle compressor, PDP
- Loading branch information
1 parent
8ebb57e
commit 51d4ccf
Showing
2 changed files
with
38 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
src/org/usfirst/frc/team4737/robot/subsystems/ControlSystem.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
package org.usfirst.frc.team4737.robot.subsystems; | ||
|
||
import edu.wpi.first.wpilibj.Compressor; | ||
import edu.wpi.first.wpilibj.PowerDistributionPanel; | ||
import edu.wpi.first.wpilibj.command.Subsystem; | ||
|
||
/** | ||
* | ||
*/ | ||
public class ControlSystem extends Subsystem { | ||
|
||
private Compressor compressor; | ||
public PowerDistributionPanel pdp; | ||
|
||
public ControlSystem() { | ||
compressor = new Compressor(0); | ||
pdp = new PowerDistributionPanel(); | ||
|
||
// Enable the compressor | ||
enableCompressor(); | ||
} | ||
|
||
public void initDefaultCommand() { | ||
// Set the default command for a subsystem here. | ||
// setDefaultCommand(new MySpecialCommand()); | ||
} | ||
|
||
public void enableCompressor() { | ||
compressor.setClosedLoopControl(true); | ||
} | ||
|
||
public void disableCompressor() { | ||
compressor.setClosedLoopControl(false); | ||
} | ||
|
||
} |