Package frc.team_8840_lib.IO.devices
Class IOPowerDistribution
java.lang.Object
frc.team_8840_lib.utils.IO.IOLayer
frc.team_8840_lib.IO.devices.IOPowerDistribution
- All Implemented Interfaces:
Loggable
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()doublegetCurrent(int channel) Returns the current of the specified PDP channeldouble[]Returns a double array of the currents of all the PDP channelsstatic IOPowerDistributionintdoubledoubledoublestatic voidinit()byte[]logPD()voidsetCurrent(double[] channel_current) voidsetSimulatedVoltage(double voltage)
-
Constructor Details
-
IOPowerDistribution
public IOPowerDistribution()
-
-
Method Details
-
init
public static void init() -
getInstance
-
getCurrent
public double getCurrent(int channel) Returns the current of the specified PDP channel- Parameters:
channel- The PDP channel to get the current of- Returns:
- The current of the specified PDP channel
-
setCurrent
public void setCurrent(double[] channel_current) -
getCurrents
public double[] getCurrents()Returns a double array of the currents of all the PDP channels- Returns:
- The currents of all the PDP channels
-
getVoltage
public double getVoltage() -
setSimulatedVoltage
public void setSimulatedVoltage(double voltage) -
getNumberOfChannels
public int getNumberOfChannels() -
getTempature
public double getTempature() -
getTotalCurrent
public double getTotalCurrent() -
close
public void close() -
getBaseName
- Specified by:
getBaseNamein interfaceLoggable- Overrides:
getBaseNamein classIOLayer
-
logPD
public byte[] logPD()
-