public class PDP
extends java.lang.Object
Constructor and Description |
---|
PDP()
Creates a PDP.
|
Modifier and Type | Method and Description |
---|---|
double |
getCurrent(int port)
Gets the current on the current port.
|
int |
getMaxCurrent(int port)
Gets the max current for a specific port on this PDP.
|
edu.wpi.first.wpilibj.PowerDistributionPanel |
getPDP()
Gets the WPILib object for the PDP.
|
boolean |
isLoggingTripping()
Checks if the PDP will create log messages if a breaker might be tripping.
|
void |
setLoggingTripping(boolean b)
Sets if the PDP should create log messages if a breaker might be tripping.
|
void |
setOnBreakerTrip(int port,
java.lang.Runnable r)
Sets code to be run in the event that a certain breaker is tripped.
|
public boolean isLoggingTripping()
public void setLoggingTripping(boolean b)
b
- If the PDP should create log messages if a breaker might be tripping.public void setOnBreakerTrip(int port, java.lang.Runnable r)
port
- The breaker.r
- The code to be run.public int getMaxCurrent(int port)
port
- The port.public double getCurrent(int port)
port
- The port to check.public edu.wpi.first.wpilibj.PowerDistributionPanel getPDP()