Package com.thegongoliers.input.current
Class PDPCurrentSensor
- java.lang.Object
-
- com.thegongoliers.input.current.PDPCurrentSensor
-
- All Implemented Interfaces:
CurrentSensor
public class PDPCurrentSensor extends java.lang.Object implements CurrentSensor
-
-
Constructor Summary
Constructors Constructor Description PDPCurrentSensor(int port)
Creates a current sensor at the specified port of the main PDPPDPCurrentSensor(edu.wpi.first.wpilibj.PowerDistributionPanel pdp, int port)
Creates a current sensor at the specified port of the specified PDP
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description double
getCurrent()
Get the current detected by the sensor in Amps.
-
-
-
Constructor Detail
-
PDPCurrentSensor
public PDPCurrentSensor(int port)
Creates a current sensor at the specified port of the main PDP- Parameters:
port
- The port on the PDP to monitor
-
PDPCurrentSensor
public PDPCurrentSensor(edu.wpi.first.wpilibj.PowerDistributionPanel pdp, int port)
Creates a current sensor at the specified port of the specified PDP- Parameters:
pdp
- The PDP that contains the specified portport
- The port on the PDP to monitor
-
-
Method Detail
-
getCurrent
public double getCurrent()
Description copied from interface:CurrentSensor
Get the current detected by the sensor in Amps.- Specified by:
getCurrent
in interfaceCurrentSensor
- Returns:
- The current in Amps.
-
-